diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-03-26 17:06:09 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-04-11 19:20:27 -0700 |
commit | 2b519f55f60125c1a753916c301b328c803f013c (patch) | |
tree | 3c66bbf76df1d2eed7a8de1cd37aeec4340316f3 | |
parent | 3e9075af56297f4d35ec1c66e3c2c8eb56f8dc59 (diff) | |
download | cmogstored-2b519f55f60125c1a753916c301b328c803f013c.tar.gz |
Since the queueing system is proven by now and we're more familiar with how things work in a multi-threaded environment, these checks are now redundant.
-rw-r--r-- | cmogstored.h | 1 | ||||
-rw-r--r-- | fdmap.c | 1 | ||||
-rw-r--r-- | fdmap.h | 7 |
3 files changed, 2 insertions, 7 deletions
diff --git a/cmogstored.h b/cmogstored.h index f844c56..2f77f40 100644 --- a/cmogstored.h +++ b/cmogstored.h @@ -260,7 +260,6 @@ struct mog_fd { enum mog_fd_type fd_type; enum mog_queue_state queue_state; int fd; - int in_queue; SIMPLEQ_ENTRY(mog_fd) active_fd; union { struct mog_accept accept; @@ -97,7 +97,6 @@ void mog_fdmap_requeue(struct mog_queue *quit_queue) case MOG_FD_TYPE_HTTP: case MOG_FD_TYPE_HTTPGET: mfd->queue_state = MOG_QUEUE_STATE_NEW; - assert((mfd->in_queue = 0) == 0 && "in_queue check"); mog_activeq_insert(quit_queue, mfd); mog_nr_active_at_quit++; default: @@ -14,15 +14,13 @@ static inline struct mog_fd * mog_fd_of(void *as_obj) /* used to validate a mog_fd is never in two queues at once */ static inline void mog_fd_check_in(struct mog_fd *mfd) { - assert(mog_sync_add_and_fetch(&mfd->in_queue, 1) == 1 && - "in_queue counter off (check in)"); + /* currently unused */ } /* used to validate a mog_fd is never in two queues at once */ static inline void mog_fd_check_out(struct mog_fd *mfd) { - assert(mog_sync_sub_and_fetch(&mfd->in_queue, 1) == 0 && - "in_queue counter off (check out)"); + /* currently unused */ } static inline struct mog_fd * mog_fd_init(int fd, enum mog_fd_type fd_type) @@ -32,7 +30,6 @@ static inline struct mog_fd * mog_fd_init(int fd, enum mog_fd_type fd_type) mfd->fd = fd; mfd->fd_type = fd_type; mfd->queue_state = MOG_QUEUE_STATE_NEW; - assert((mfd->in_queue = 0) == 0 && "in_queue check"); return mfd; } |