]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/wait.h
Merge branches 'release', 'cpuidle-2.6.25' and 'idle' into release
[linux-2.6-omap-h63xx.git] / include / linux / wait.h
index 1f4fb0a81ecdba3c29717458bbd0e772df0ffb95..33a2aa9e02f2ba93f9bad51a351dd30919251a7a 100644 (file)
@@ -162,6 +162,22 @@ wait_queue_head_t *FASTCALL(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
+ */
+#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 __wait_event(wq, condition)                                    \
 do {                                                                   \
        DEFINE_WAIT(__wait);                                            \