diff options
Diffstat (limited to 'ioq.c')
-rw-r--r-- | ioq.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -41,6 +41,7 @@ bool mog_ioq_ready(struct mog_ioq *ioq, struct mog_fd *client_mfd) ioq->cur--; mog_ioq_current = ioq; } else { + client_mfd->ioq_blocked = 1; SIMPLEQ_INSERT_TAIL(&ioq->ioq_head, client_mfd, ioqent); } @@ -88,3 +89,12 @@ void mog_ioq_destroy(struct mog_ioq *ioq) { CHECK(int, 0, pthread_mutex_destroy(&ioq->mtx)); } + +bool mog_ioq_unblock(struct mog_fd *mfd) +{ + if (mfd->ioq_blocked == 0) + return false; + + mfd->ioq_blocked = 0; + return true; +} |