Lines Matching refs:count

36 	__u64 count;  member
59 if (ULLONG_MAX - ctx->count < n) in eventfd_signal()
60 n = ULLONG_MAX - ctx->count; in eventfd_signal()
61 ctx->count += n; in eventfd_signal()
121 u64 count; in eventfd_poll() local
125 count = ctx->count; in eventfd_poll()
127 if (count > 0) in eventfd_poll()
129 if (count == ULLONG_MAX) in eventfd_poll()
131 if (ULLONG_MAX - 1 > count) in eventfd_poll()
139 *cnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count; in eventfd_ctx_do_read()
140 ctx->count -= *cnt; in eventfd_ctx_do_read()
194 if (ctx->count > 0) in eventfd_ctx_read()
200 if (ctx->count > 0) { in eventfd_ctx_read()
226 static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count, in eventfd_read() argument
233 if (count < sizeof(cnt)) in eventfd_read()
242 static ssize_t eventfd_write(struct file *file, const char __user *buf, size_t count, in eventfd_write() argument
250 if (count < sizeof(ucnt)) in eventfd_write()
258 if (ULLONG_MAX - ctx->count > ucnt) in eventfd_write()
264 if (ULLONG_MAX - ctx->count > ucnt) { in eventfd_write()
280 ctx->count += ucnt; in eventfd_write()
296 (unsigned long long)ctx->count); in eventfd_show_fdinfo()
391 struct file *eventfd_file_create(unsigned int count, int flags) in eventfd_file_create() argument
409 ctx->count = count; in eventfd_file_create()
420 SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags) in SYSCALL_DEFINE2() argument
430 file = eventfd_file_create(count, flags); in SYSCALL_DEFINE2()
445 SYSCALL_DEFINE1(eventfd, unsigned int, count) in SYSCALL_DEFINE1() argument
447 return sys_eventfd2(count, 0); in SYSCALL_DEFINE1()