hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/linux/eventfd.h
....@@ -14,7 +14,6 @@
1414 #include <linux/err.h>
1515 #include <linux/percpu-defs.h>
1616 #include <linux/percpu.h>
17
-#include <linux/sched.h>
1817
1918 /*
2019 * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining
....@@ -43,10 +42,13 @@
4342 __u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, unsigned mask);
4443 int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait,
4544 __u64 *cnt);
45
+void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt);
4646
47
-static inline bool eventfd_signal_allowed(void)
47
+DECLARE_PER_CPU(int, eventfd_wake_count);
48
+
49
+static inline bool eventfd_signal_count(void)
4850 {
49
- return !current->in_eventfd_signal;
51
+ return this_cpu_read(eventfd_wake_count);
5052 }
5153
5254 #else /* CONFIG_EVENTFD */
....@@ -61,7 +63,7 @@
6163 return ERR_PTR(-ENOSYS);
6264 }
6365
64
-static inline int eventfd_signal(struct eventfd_ctx *ctx, int n)
66
+static inline int eventfd_signal(struct eventfd_ctx *ctx, __u64 n)
6567 {
6668 return -ENOSYS;
6769 }
....@@ -83,9 +85,14 @@
8385 return -ENOSYS;
8486 }
8587
86
-static inline bool eventfd_signal_allowed(void)
88
+static inline bool eventfd_signal_count(void)
8789 {
88
- return true;
90
+ return false;
91
+}
92
+
93
+static inline void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt)
94
+{
95
+
8996 }
9097
9198 #endif