summaryrefslogtreecommitdiff
path: root/libusb/libusb.h
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2009-10-28 20:33:49 +0545
committerDaniel Drake <dsd@gentoo.org>2009-11-07 10:46:09 +0000
commit4783008b7e711de9cb31631e60dda995f44068de (patch)
tree41eb729442f7df6da2ef58469b8dc7cd43e6d326 /libusb/libusb.h
parent9b120c2b3735566533c179aa8ca758fe45899a38 (diff)
downloadlibusb-4783008b7e711de9cb31631e60dda995f44068de.tar.gz
Use timerfd for timeout handling
Use a new file descriptor from the timerfd system calls to handle timeouts. On supported systems, this means that there is less hassle figuring out when the poll() timeout should be, since libusb_get_next_timeout() will always return 0 and the timeout events will be triggered as regular activity on the file descriptor set. Add API function libusb_pollfds_handle_timeouts() to detect whether you're on a platform with the timing headache, and flesh out the surrounding documentation.
Diffstat (limited to 'libusb/libusb.h')
-rw-r--r--libusb/libusb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h
index 1126380..67f248c 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -1182,6 +1182,7 @@ int libusb_wait_for_event(libusb_context *ctx, struct timeval *tv);
int libusb_handle_events_timeout(libusb_context *ctx, struct timeval *tv);
int libusb_handle_events(libusb_context *ctx);
int libusb_handle_events_locked(libusb_context *ctx, struct timeval *tv);
+int libusb_pollfds_handle_timeouts(libusb_context *ctx);
int libusb_get_next_timeout(libusb_context *ctx, struct timeval *tv);
/** \ingroup poll