mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 11:13:56 +08:00
sched/wait: Collapse __wait_event_interruptible()
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.396949919@infradead.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
ddc1994b82
commit
f13f4c41c9
@ -277,21 +277,8 @@ do { \
|
|||||||
})
|
})
|
||||||
|
|
||||||
#define __wait_event_interruptible(wq, condition, ret) \
|
#define __wait_event_interruptible(wq, condition, ret) \
|
||||||
do { \
|
___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, ret, \
|
||||||
DEFINE_WAIT(__wait); \
|
schedule())
|
||||||
\
|
|
||||||
for (;;) { \
|
|
||||||
prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
|
|
||||||
if (condition) \
|
|
||||||
break; \
|
|
||||||
if (signal_pending(current)) { \
|
|
||||||
ret = -ERESTARTSYS; \
|
|
||||||
break; \
|
|
||||||
} \
|
|
||||||
schedule(); \
|
|
||||||
} \
|
|
||||||
finish_wait(&wq, &__wait); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wait_event_interruptible - sleep until a condition gets true
|
* wait_event_interruptible - sleep until a condition gets true
|
||||||
|
Loading…
Reference in New Issue
Block a user