X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Flinux%2Fwait.h;h=1e1bf9f963a947fc686125d0a2809ad63b8a13ed;hb=8dfaf05682ebb9be8aaf29538f1acf89d885ef44;hp=d69ac4ecc88b9c0d6ff4d5f97cf0fa9d89b5fcdc;hpb=f5dcb68086ba2e033b2af32b0da0c7a7c7872a09;p=karo-tx-linux.git diff --git a/include/linux/wait.h b/include/linux/wait.h index d69ac4ecc88b..1e1bf9f963a9 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -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)