aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavide Libenzi <davidel@xmailserver.org>2009-03-31 18:24:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 11:59:20 -0400
commitc0da37753695e010776ccf2200a5731e0f88a9f3 (patch)
tree4bcc83b718a284808d01929b662ee95fb0c49e8b /include
parent4ede816ac36e027db5fe0051ad9c73f76db63772 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/wait.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 0d2eeb03a718..5d631c17eaee 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -158,21 +158,17 @@ wait_queue_head_t *bit_waitqueue(void *, int);
158#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) 158#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL)
159#define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1) 159#define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1)
160 160
161#ifdef CONFIG_DEBUG_LOCK_ALLOC
162/* 161/*
163 * macro to avoid include hell 162 * Wakeup macros to be used to report events to the targets.
164 */ 163 */
165#define wake_up_nested(x, s) \ 164#define wake_up_poll(x, m) \
166do { \ 165 __wake_up(x, TASK_NORMAL, 1, (void *) (m))
167 unsigned long flags; \ 166#define wake_up_locked_poll(x, m) \
168 \ 167 __wake_up_locked_key((x), TASK_NORMAL, (void *) (m))
169 spin_lock_irqsave_nested(&(x)->lock, flags, (s)); \ 168#define wake_up_interruptible_poll(x, m) \
170 wake_up_locked(x); \ 169 __wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m))
171 spin_unlock_irqrestore(&(x)->lock, flags); \ 170#define wake_up_interruptible_sync_poll(x, m) \
172} while (0) 171 __wake_up_sync_key((x), TASK_INTERRUPTIBLE, 1, (void *) (m))
173#else
174#define wake_up_nested(x, s) wake_up(x)
175#endif
176 172
177#define __wait_event(wq, condition) \ 173#define __wait_event(wq, condition) \
178do { \ 174do { \