]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/wait.h
Merge tag 'md/4.2' of git://neil.brown.name/md
[karo-tx-linux.git] / include / linux / wait.h
index d69ac4ecc88b9c0d6ff4d5f97cf0fa9d89b5fcdc..1e1bf9f963a947fc686125d0a2809ad63b8a13ed 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)