about summary refs log tree commit homepage
path: root/activeq.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-07-11 22:08:08 +0000
committerEric Wong <normalperson@yhbt.net>2012-07-12 01:05:09 +0000
commitb19f9e707ab1ebea748ccc9dcf2d8d6cadf4e616 (patch)
treed89812f2fe154655a959b031a0d2dac25b24d565 /activeq.h
parent49df2ac41136e8ab9b0fe01fbb46c0aefb924eb1 (diff)
downloadcmogstored-b19f9e707ab1ebea748ccc9dcf2d8d6cadf4e616.tar.gz
Epoll/kqueue descriptors are safely usable for this task given
the the ability to use one-shot notifications (which is
independent of level-triggering, even).
Diffstat (limited to 'activeq.h')
-rw-r--r--activeq.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/activeq.h b/activeq.h
index 7da9038..0262ba2 100644
--- a/activeq.h
+++ b/activeq.h
@@ -3,13 +3,7 @@
  * License: GPLv3 or later (see COPYING for details)
  */
 
-/*
- * This silently inserts the mfd into the active queue without guaranteeing
- */
-static inline void mog_activeq_insert(struct mog_queue *q, struct mog_fd *mfd)
+static inline void mog_activeq_push(struct mog_queue *q, struct mog_fd *mfd)
 {
-        mog_fd_check_in(mfd);
-        CHECK(int, 0, pthread_mutex_lock(&q->activeq_lock));
-        SIMPLEQ_INSERT_TAIL(&q->activeq_head, mfd, active_fd);
-        CHECK(int, 0, pthread_mutex_unlock(&q->activeq_lock));
+        mog_idleq_push(q, mfd, MOG_QEV_RW);
 }