summaryrefslogtreecommitdiff
path: root/libusb/libusbi.h
diff options
context:
space:
mode:
Diffstat (limited to 'libusb/libusbi.h')
-rw-r--r--libusb/libusbi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index c94c5a2..2d2f71a 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -317,6 +317,10 @@ struct libusb_context {
struct list_head list;
};
+/* Update the following macro if new event sources are added */
+#define usbi_pending_events(ctx) \
+ ((ctx)->device_close || (ctx)->fd_notify || !list_empty(&(ctx)->hotplug_msgs))
+
#ifdef USBI_TIMERFD_AVAILABLE
#define usbi_using_timerfd(ctx) ((ctx)->timerfd >= 0)
#else