projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d4e56c
)
new helper: wait_event_killable_exclusive()
author
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 19 Jul 2016 07:04:34 +0000
(
03:04
-0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 19 Jul 2016 07:08:07 +0000
(
03:08
-0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/wait.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/wait.h
b/include/linux/wait.h
index 27d7a0ab5da3edf217e60d767c10c65d3e3c52a0..c3ff74d764faad094e7f00dcd025ddb568a6382d 100644
(file)
--- a/
include/linux/wait.h
+++ b/
include/linux/wait.h
@@
-600,6
+600,19
@@
do { \
__ret; \
})
+#define __wait_event_killable_exclusive(wq, condition) \
+ ___wait_event(wq, condition, TASK_KILLABLE, 1, 0, \
+ schedule())
+
+#define wait_event_killable_exclusive(wq, condition) \
+({ \
+ int __ret = 0; \
+ might_sleep(); \
+ if (!(condition)) \
+ __ret = __wait_event_killable_exclusive(wq, condition); \
+ __ret; \
+})
+
#define __wait_event_freezable_exclusive(wq, condition) \
___wait_event(wq, condition, TASK_INTERRUPTIBLE, 1, 0, \