about summary refs log tree commit homepage
path: root/queue_kqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'queue_kqueue.c')
-rw-r--r--queue_kqueue.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/queue_kqueue.c b/queue_kqueue.c
index 92d5bac..6d2da43 100644
--- a/queue_kqueue.c
+++ b/queue_kqueue.c
@@ -79,6 +79,17 @@ struct mog_fd * mog_idleq_wait(struct mog_queue *q, int timeout)
         return NULL;
 }
 
+struct mog_fd * mog_idleq_wait_intr(struct mog_queue *q, int timeout)
+{
+        struct mog_fd *mfd;
+
+        /* this is racy, using a self-pipe covers the race */
+        mog_intr_enable();
+        mfd = mog_idleq_wait(q, timeout);
+        mog_intr_disable();
+        return mfd;
+}
+
 MOG_NOINLINE static void
 kevent_add_error(struct mog_queue *q, struct mog_fd *mfd)
 {