mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 20:37:27 +00:00
epoll keyed wakeups: introduce new *_poll() wakeup macros
Introduce new wakeup macros that allow passing an event mask to the wakeup targets. They exactly mimic their non-_poll() counterpart, with the added event mask passing capability. I did add only the ones currently requested, avoiding the _nr() and _all() for the moment. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: William Lee Irwin III <wli@movementarian.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4ede816ac3
commit
c0da377536
@ -158,21 +158,17 @@ wait_queue_head_t *bit_waitqueue(void *, int);
|
||||
#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL)
|
||||
#define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1)
|
||||
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
/*
|
||||
* macro to avoid include hell
|
||||
* Wakeup macros to be used to report events to the targets.
|
||||
*/
|
||||
#define wake_up_nested(x, s) \
|
||||
do { \
|
||||
unsigned long flags; \
|
||||
\
|
||||
spin_lock_irqsave_nested(&(x)->lock, flags, (s)); \
|
||||
wake_up_locked(x); \
|
||||
spin_unlock_irqrestore(&(x)->lock, flags); \
|
||||
} while (0)
|
||||
#else
|
||||
#define wake_up_nested(x, s) wake_up(x)
|
||||
#endif
|
||||
#define wake_up_poll(x, m) \
|
||||
__wake_up(x, TASK_NORMAL, 1, (void *) (m))
|
||||
#define wake_up_locked_poll(x, m) \
|
||||
__wake_up_locked_key((x), TASK_NORMAL, (void *) (m))
|
||||
#define wake_up_interruptible_poll(x, m) \
|
||||
__wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m))
|
||||
#define wake_up_interruptible_sync_poll(x, m) \
|
||||
__wake_up_sync_key((x), TASK_INTERRUPTIBLE, 1, (void *) (m))
|
||||
|
||||
#define __wait_event(wq, condition) \
|
||||
do { \
|
||||
|
Loading…
Reference in New Issue
Block a user