OSDN Git Service

Merge tag 'md/4.2' of git://neil.brown.name/md
[uclinux-h8/linux.git] / include / linux / wait.h
index d69ac4e..1e1bf9f 100644 (file)
@@ -358,6 +358,19 @@ do {                                                                       \
        __ret;                                                          \
 })
 
+#define __wait_event_exclusive_cmd(wq, condition, cmd1, cmd2)          \
+       (void)___wait_event(wq, condition, TASK_UNINTERRUPTIBLE, 1, 0,  \
+                           cmd1; schedule(); cmd2)
+/*
+ * Just like wait_event_cmd(), except it sets exclusive flag
+ */
+#define wait_event_exclusive_cmd(wq, condition, cmd1, cmd2)            \
+do {                                                                   \
+       if (condition)                                                  \
+               break;                                                  \
+       __wait_event_exclusive_cmd(wq, condition, cmd1, cmd2);          \
+} while (0)
+
 #define __wait_event_cmd(wq, condition, cmd1, cmd2)                    \
        (void)___wait_event(wq, condition, TASK_UNINTERRUPTIBLE, 0, 0,  \
                            cmd1; schedule(); cmd2)