]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
libxl: libxl__ev_fd_callback: Document perhaps-no-retry semantics
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 15 Oct 2018 13:58:54 +0000 (14:58 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Tue, 30 Oct 2018 17:03:27 +0000 (17:03 +0000)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Anthony PERARD <anthony.perard@citrix.com>
tools/libxl/libxl_internal.h

index 43947b1b0774d0b97506f995a9fce5ae02997372..153566acd06f4f10744b52a3bc86799959fdcbac 100644 (file)
@@ -232,6 +232,14 @@ typedef void libxl__ev_fd_callback(libxl__egc *egc, libxl__ev_fd *ev,
    * It is not permitted to listen for the same or overlapping events
    * on the same fd using multiple different libxl__ev_fd's.
    *
+   * Note that (depending on the underlying event loop implementation)
+   * it is possible that a the fd callback system is `level triggered'
+   * or `event triggered'.  That is, the callback may be called only
+   * once for each transition from not ready to ready.  So the
+   * callback must generally contain a loop which exhausts the fd,
+   * rather than relying on being called again if the fd is still
+   * ready.
+   *
    * (Spurious wakeups, and spurious bits set in revents, are
    * suppressed by the libxl event core.)
    */