diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-07-11 22:08:08 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-07-12 01:05:09 +0000 |
commit | b19f9e707ab1ebea748ccc9dcf2d8d6cadf4e616 (patch) | |
tree | d89812f2fe154655a959b031a0d2dac25b24d565 /activeq.h | |
parent | 49df2ac41136e8ab9b0fe01fbb46c0aefb924eb1 (diff) | |
download | cmogstored-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.h | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -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); } |