Lines Matching defs:count
37 * value of the __u64 being written is added to "count" and a
38 * wakeup is performed on "wqh". A read(2) will return the "count"
39 * value to userspace, and will reset "count" to zero. The kernel
40 * side eventfd_signal() also, adds to the "count" counter and
43 __u64 count;
65 if (ULLONG_MAX - ctx->count < n)
66 n = ULLONG_MAX - ctx->count;
67 ctx->count += n;
136 u64 count;
141 * All writes to ctx->count occur within ctx->wqh.lock. This read
153 * count = ctx->count
157 * ctx->count += n
167 * count = ctx->count (INVALID!)
169 * ctx->count += n
178 count = READ_ONCE(ctx->count);
180 if (count > 0)
182 if (count == ULLONG_MAX)
184 if (ULLONG_MAX - 1 > count)
194 *cnt = ((ctx->flags & EFD_SEMAPHORE) && ctx->count) ? 1 : ctx->count;
195 ctx->count -= *cnt;
238 if (!ctx->count) {
247 if (ctx->count)
272 static ssize_t eventfd_write(struct file *file, const char __user *buf, size_t count,
280 if (count < sizeof(ucnt))
288 if (ULLONG_MAX - ctx->count > ucnt)
294 if (ULLONG_MAX - ctx->count > ucnt) {
310 ctx->count += ucnt;
325 seq_printf(m, "eventfd-count: %16llx\n",
326 (unsigned long long)ctx->count);
412 static int do_eventfd(unsigned int count, int flags)
431 ctx->count = count;
456 SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
458 return do_eventfd(count, flags);
461 SYSCALL_DEFINE1(eventfd, unsigned int, count)
463 return do_eventfd(count, 0);