| .. | .. |
|---|
| 14 | 14 | #include <linux/err.h> |
|---|
| 15 | 15 | #include <linux/percpu-defs.h> |
|---|
| 16 | 16 | #include <linux/percpu.h> |
|---|
| 17 | | -#include <linux/sched.h> |
|---|
| 18 | 17 | |
|---|
| 19 | 18 | /* |
|---|
| 20 | 19 | * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining |
|---|
| .. | .. |
|---|
| 44 | 43 | int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait, |
|---|
| 45 | 44 | __u64 *cnt); |
|---|
| 46 | 45 | |
|---|
| 47 | | -static inline bool eventfd_signal_allowed(void) |
|---|
| 46 | +DECLARE_PER_CPU(int, eventfd_wake_count); |
|---|
| 47 | + |
|---|
| 48 | +static inline bool eventfd_signal_count(void) |
|---|
| 48 | 49 | { |
|---|
| 49 | | - return !current->in_eventfd_signal; |
|---|
| 50 | + return this_cpu_read(eventfd_wake_count); |
|---|
| 50 | 51 | } |
|---|
| 51 | 52 | |
|---|
| 52 | 53 | #else /* CONFIG_EVENTFD */ |
|---|
| .. | .. |
|---|
| 83 | 84 | return -ENOSYS; |
|---|
| 84 | 85 | } |
|---|
| 85 | 86 | |
|---|
| 86 | | -static inline bool eventfd_signal_allowed(void) |
|---|
| 87 | +static inline bool eventfd_signal_count(void) |
|---|
| 87 | 88 | { |
|---|
| 88 | | - return true; |
|---|
| 89 | + return false; |
|---|
| 89 | 90 | } |
|---|
| 90 | 91 | |
|---|
| 91 | 92 | #endif |
|---|