diff options
Diffstat (limited to 'ioq.c')
-rw-r--r-- | ioq.c | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -91,13 +91,7 @@ bool mog_ioq_ready(struct mog_ioq *ioq, struct mog_fd *mfd) good = ioq->cur > 0; if (good) { - /* - * assume the worst when we are the last one to - * acquire a free slot - */ - if (--ioq->cur == 0) - ioq_set_contended(ioq); - + --ioq->cur; mog_ioq_current = ioq; } else { TRACE(CMOGSTORED_IOQ_BLOCKED(mfd->fd)); @@ -131,13 +125,8 @@ void mog_ioq_next(struct mog_ioq *check_ioq) if (mog_ioq_current->cur <= mog_ioq_current->max) { /* wake up any waiters */ mfd = SIMPLEQ_FIRST(&mog_ioq_current->ioq_head); - if (mfd) { + if (mfd) SIMPLEQ_REMOVE_HEAD(&mog_ioq_current->ioq_head, ioqent); - - /* if there's another head, we're still contended */ - if (SIMPLEQ_FIRST(&mog_ioq_current->ioq_head)) - ioq_set_contended(mog_ioq_current); - } } else { /* mog_ioq_adjust was called and lowered our capacity */ mog_ioq_current->cur--; |