diff options
author | Peter Zijlstra <peterz@infradead.org> | 2013-10-02 05:22:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-04 04:14:46 -0400 |
commit | 854267f4384243b19c03a2942e84f06f2beb0952 (patch) | |
tree | 99d2a0597ce1283376e0d55096f647efb4b821a5 /include/linux/wait.h | |
parent | 41a1431b178c3b731d6dfc40b987528b333dd93e (diff) |
sched/wait: Collapse __wait_event()
Reduce macro complexity by using the new ___wait_event() helper.
No change in behaviour, identical generated code.
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20131002092528.254863348@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/wait.h')
-rw-r--r-- | include/linux/wait.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index 29d0249e03ab..68e3a628e157 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -224,17 +224,8 @@ __out: ; \ | |||
224 | } while (0) | 224 | } while (0) |
225 | 225 | ||
226 | #define __wait_event(wq, condition) \ | 226 | #define __wait_event(wq, condition) \ |
227 | do { \ | 227 | ___wait_event(wq, condition, TASK_UNINTERRUPTIBLE, 0, \ |
228 | DEFINE_WAIT(__wait); \ | 228 | ___wait_nop_ret, schedule()) |
229 | \ | ||
230 | for (;;) { \ | ||
231 | prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \ | ||
232 | if (condition) \ | ||
233 | break; \ | ||
234 | schedule(); \ | ||
235 | } \ | ||
236 | finish_wait(&wq, &__wait); \ | ||
237 | } while (0) | ||
238 | 229 | ||
239 | /** | 230 | /** |
240 | * wait_event - sleep until a condition gets true | 231 | * wait_event - sleep until a condition gets true |