Lines Matching refs:cnt
137 static void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt) in eventfd_ctx_do_read() argument
139 *cnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count; in eventfd_ctx_do_read()
140 ctx->count -= *cnt; in eventfd_ctx_do_read()
157 __u64 *cnt) in eventfd_ctx_remove_wait_queue() argument
162 eventfd_ctx_do_read(ctx, cnt); in eventfd_ctx_remove_wait_queue()
164 if (*cnt != 0 && waitqueue_active(&ctx->wqh)) in eventfd_ctx_remove_wait_queue()
168 return *cnt != 0 ? 0 : -EAGAIN; in eventfd_ctx_remove_wait_queue()
186 ssize_t eventfd_ctx_read(struct eventfd_ctx *ctx, int no_wait, __u64 *cnt) in eventfd_ctx_read() argument
192 *cnt = 0; in eventfd_ctx_read()
216 eventfd_ctx_do_read(ctx, cnt); in eventfd_ctx_read()
231 __u64 cnt; in eventfd_read() local
233 if (count < sizeof(cnt)) in eventfd_read()
235 res = eventfd_ctx_read(ctx, file->f_flags & O_NONBLOCK, &cnt); in eventfd_read()
239 return put_user(cnt, (__u64 __user *) buf) ? -EFAULT : sizeof(cnt); in eventfd_read()