.. | .. |
---|
14 | 14 | #include <linux/err.h> |
---|
15 | 15 | #include <linux/percpu-defs.h> |
---|
16 | 16 | #include <linux/percpu.h> |
---|
| 17 | +#include <linux/sched.h> |
---|
17 | 18 | |
---|
18 | 19 | /* |
---|
19 | 20 | * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining |
---|
.. | .. |
---|
39 | 40 | struct eventfd_ctx *eventfd_ctx_fdget(int fd); |
---|
40 | 41 | struct eventfd_ctx *eventfd_ctx_fileget(struct file *file); |
---|
41 | 42 | __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n); |
---|
| 43 | +__u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, unsigned mask); |
---|
42 | 44 | int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait, |
---|
43 | 45 | __u64 *cnt); |
---|
44 | 46 | |
---|
45 | | -DECLARE_PER_CPU(int, eventfd_wake_count); |
---|
46 | | - |
---|
47 | | -static inline bool eventfd_signal_count(void) |
---|
| 47 | +static inline bool eventfd_signal_allowed(void) |
---|
48 | 48 | { |
---|
49 | | - return this_cpu_read(eventfd_wake_count); |
---|
| 49 | + return !current->in_eventfd_signal; |
---|
50 | 50 | } |
---|
51 | 51 | |
---|
52 | 52 | #else /* CONFIG_EVENTFD */ |
---|
.. | .. |
---|
66 | 66 | return -ENOSYS; |
---|
67 | 67 | } |
---|
68 | 68 | |
---|
| 69 | +static inline int eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, |
---|
| 70 | + unsigned mask) |
---|
| 71 | +{ |
---|
| 72 | + return -ENOSYS; |
---|
| 73 | +} |
---|
| 74 | + |
---|
69 | 75 | static inline void eventfd_ctx_put(struct eventfd_ctx *ctx) |
---|
70 | 76 | { |
---|
71 | 77 | |
---|
.. | .. |
---|
77 | 83 | return -ENOSYS; |
---|
78 | 84 | } |
---|
79 | 85 | |
---|
80 | | -static inline bool eventfd_signal_count(void) |
---|
| 86 | +static inline bool eventfd_signal_allowed(void) |
---|
81 | 87 | { |
---|
82 | | - return false; |
---|
| 88 | + return true; |
---|
83 | 89 | } |
---|
84 | 90 | |
---|
85 | 91 | #endif |
---|