hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/linux/wait_bit.h
....@@ -305,6 +305,19 @@
305305 __ret; \
306306 })
307307
308
+#define __wait_var_event_interruptible(var, condition) \
309
+ ___wait_var_event(var, condition, TASK_INTERRUPTIBLE, 0, 0, \
310
+ schedule())
311
+
312
+#define wait_var_event_interruptible(var, condition) \
313
+({ \
314
+ int __ret = 0; \
315
+ might_sleep(); \
316
+ if (!(condition)) \
317
+ __ret = __wait_var_event_interruptible(var, condition); \
318
+ __ret; \
319
+})
320
+
308321 /**
309322 * clear_and_wake_up_bit - clear a bit and wake up anyone waiting on that bit
310323 *