diff options
author | 2013-10-02 11:22:33 +0200 | |
---|---|---|
committer | 2013-10-04 10:16:25 +0200 | |
commit | 35a2af94c7ce7130ca292c68b1d27fcfdb648f6b (patch) | |
tree | 10b28670fb387984751de104913db9408ade8741 /include/linux/tty.h | |
parent | sched/wait: Collapse __wait_event_hrtimeout() (diff) | |
download | linux-35a2af94c7ce7130ca292c68b1d27fcfdb648f6b.tar.gz linux-35a2af94c7ce7130ca292c68b1d27fcfdb648f6b.tar.bz2 linux-35a2af94c7ce7130ca292c68b1d27fcfdb648f6b.zip |
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>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 6e803291028f..633cac77f9f9 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -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)) |