mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: add note about event file descriptors on Windows
When using GNULIB with Winsock, libvirt will never see the normal HANDLE objects, instead GNULIB guarantees that libvirt gets a C runtime file descriptor. The GNULIB poll impl also expects to get C runtime file descriptors rather than HANDLE objects. Document this behaviour so that it is clear to applications providing event loop implementations if they need Windows portability. Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -67,6 +67,10 @@ typedef void (*virEventHandleCallback)(int watch, int fd, int events, void *opaq
|
||||
* listen for specific events. The same file handle can be registered
|
||||
* multiple times provided the requested event sets are non-overlapping
|
||||
*
|
||||
* @fd will always be a C runtime file descriptor. On Windows
|
||||
* the _get_osfhandle() method can be used if a HANDLE is required
|
||||
* instead.
|
||||
*
|
||||
* If the opaque user data requires free'ing when the handle
|
||||
* is unregistered, then a 2nd callback can be supplied for
|
||||
* this purpose. This callback needs to be invoked from a clean stack.
|
||||
|
||||
Reference in New Issue
Block a user