• Home
  • Raw
  • Download

Lines Matching refs:count

40 	__u64 count;  member
64 if (ULLONG_MAX - ctx->count < n) in eventfd_signal()
65 n = ULLONG_MAX - ctx->count; in eventfd_signal()
66 ctx->count += n; in eventfd_signal()
115 u64 count; in eventfd_poll() local
157 count = READ_ONCE(ctx->count); in eventfd_poll()
159 if (count > 0) in eventfd_poll()
161 if (count == ULLONG_MAX) in eventfd_poll()
163 if (ULLONG_MAX - 1 > count) in eventfd_poll()
171 *cnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count; in eventfd_ctx_do_read()
172 ctx->count -= *cnt; in eventfd_ctx_do_read()
204 static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count, in eventfd_read() argument
212 if (count < sizeof(ucnt)) in eventfd_read()
217 if (ctx->count > 0) in eventfd_read()
223 if (ctx->count > 0) { in eventfd_read()
251 static ssize_t eventfd_write(struct file *file, const char __user *buf, size_t count, in eventfd_write() argument
259 if (count < sizeof(ucnt)) in eventfd_write()
267 if (ULLONG_MAX - ctx->count > ucnt) in eventfd_write()
273 if (ULLONG_MAX - ctx->count > ucnt) { in eventfd_write()
289 ctx->count += ucnt; in eventfd_write()
305 (unsigned long long)ctx->count); in eventfd_show_fdinfo()
391 static int do_eventfd(unsigned int count, int flags) in do_eventfd() argument
409 ctx->count = count; in do_eventfd()
421 SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags) in SYSCALL_DEFINE2() argument
423 return do_eventfd(count, flags); in SYSCALL_DEFINE2()
426 SYSCALL_DEFINE1(eventfd, unsigned int, count) in SYSCALL_DEFINE1() argument
428 return do_eventfd(count, 0); in SYSCALL_DEFINE1()