Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24.4 /include/linux/wait.h

Filename:/include/linux/wait.h
Lines Added:16
Lines Deleted:0
Also changed in: (Previous) 2.6.24.2  2.6.24-git22  2.6.24-git21  2.6.24-git20  2.6.24.1  2.6.24-git19 
(Following) 2.6.24.5  2.6.24.6  2.6.24.7  2.6.25-rc7  2.6.25-rc8  2.6.25-rc9 

Location
[  2.6.24.4
  [  include
    [  linux
       o  wait.h

Patch

diff --git a/include/linux/wait.h b/include/linux/wait.h
index 0e68628..8eb6420 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -161,6 +161,22 @@ wait_queue_head_t *FASTCALL(bit_waitqueue(void *, int));
 #define   wake_up_locked(x)      __wake_up_locked((x), TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE)
 #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);                  \


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.