[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 6/6] libxl: events: Document and enforce actual callbacks restriction
On Thu, 2014-11-27 at 18:27 +0000, Ian Jackson wrote: > libxl_event_register_callbacks cannot reasonably be called while libxl > is busy (has outstanding operations and/or enabled events). > > This is because the previous spec implied (although not entirely > clearly) that event hooks would not be called for existing fd and > timeout interests. There is thus no way to reliably ensure that libxl > would get told about fds and timeouts which it became interested in > beforehand. > > So there have to be no such fds or timeouts, which means that the > callbacks must only be registered or changed when the ctx is idle. > > Document this restriction, and enforce it with a pair of asserts. > > (It would be nicer, perhaps, to say that the application may not call > libxl_osevent_register_hooks other than right after creating the ctx. > But there are existing callers, including libvirt, who do it later - > even after doing major operations such as domain creation.) > > Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |