mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-19 21:32:02 +00:00
sched/wait: Make the __wait_event*() interface more friendly
Change all __wait_event*() implementations to match the corresponding wait_event*() signature for convenience. In particular this does away with the weird 'ret' logic. Since there are __wait_event*() users this requires we update them too. Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20131002092529.042563462@infradead.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
ebdc195f2e
commit
35a2af94c7
5 changed files with 73 additions and 81 deletions
|
@ -672,14 +672,14 @@ static inline void tty_wait_until_sent_from_close(struct tty_struct *tty,
|
|||
#define wait_event_interruptible_tty(tty, wq, condition) \
|
||||
({ \
|
||||
int __ret = 0; \
|
||||
if (!(condition)) { \
|
||||
__wait_event_interruptible_tty(tty, wq, condition, __ret); \
|
||||
} \
|
||||
if (!(condition)) \
|
||||
__ret = __wait_event_interruptible_tty(tty, wq, \
|
||||
condition); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define __wait_event_interruptible_tty(tty, wq, condition, ret) \
|
||||
___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, ret, \
|
||||
#define __wait_event_interruptible_tty(tty, wq, condition) \
|
||||
___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \
|
||||
tty_unlock(tty); \
|
||||
schedule(); \
|
||||
tty_lock(tty))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue