about summary refs log tree commit homepage
path: root/queue_epoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'queue_epoll.c')
-rw-r--r--queue_epoll.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/queue_epoll.c b/queue_epoll.c
index c2a7159..bc7b513 100644
--- a/queue_epoll.c
+++ b/queue_epoll.c
@@ -102,7 +102,7 @@ struct mog_queue * mog_queue_new(void)
 }
 
 static struct mog_fd *
-epoll_event_check(int rc, struct epoll_event *event, bool cancellable)
+epoll_event_check(int rc, struct epoll_event *event)
 {
         struct mog_fd *mfd;
 
@@ -119,9 +119,6 @@ epoll_event_check(int rc, struct epoll_event *event, bool cancellable)
                 /* rc could be > 1 if the kernel is broken :P */
                 die_errno("epoll_wait() failed with (%d)", rc);
 
-        if (cancellable)
-                mog_testcancel();
-
         return NULL;
 }
 
@@ -137,12 +134,12 @@ struct mog_fd * mog_idleq_wait(struct mog_queue *q, int timeout)
         bool cancellable = timeout != 0;
 
         if (cancellable)
-                mog_testcancel();
+                mog_thr_test_quit();
 
         /* epoll_wait is a cancellation point since glibc 2.4 */
         rc = epoll_wait(q->queue_fd, &event, 1, timeout);
 
-        return epoll_event_check(rc, &event, cancellable);
+        return epoll_event_check(rc, &event);
 }
 
 struct mog_fd * mog_idleq_wait_intr(struct mog_queue *q, int timeout)
@@ -151,7 +148,7 @@ struct mog_fd * mog_idleq_wait_intr(struct mog_queue *q, int timeout)
         struct epoll_event event;
 
         rc = epoll_pwait(q->queue_fd, &event, 1, timeout, &mog_emptyset);
-        return epoll_event_check(rc, &event, false);
+        return epoll_event_check(rc, &event);
 }
 
 MOG_NOINLINE static void