]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/wait.h
sched/wait: Collapse __wait_event()
[karo-tx-linux.git] / include / linux / wait.h
index 29d0249e03ababd8cffdb944e15536344382649e..68e3a628e1578440928cde498dd357ec7b0447d5 100644 (file)
@@ -224,17 +224,8 @@ __out:     ;                                                               \
 } while (0)
 
 #define __wait_event(wq, condition)                                    \
-do {                                                                   \
-       DEFINE_WAIT(__wait);                                            \
-                                                                       \
-       for (;;) {                                                      \
-               prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE);    \
-               if (condition)                                          \
-                       break;                                          \
-               schedule();                                             \
-       }                                                               \
-       finish_wait(&wq, &__wait);                                      \
-} while (0)
+       ___wait_event(wq, condition, TASK_UNINTERRUPTIBLE, 0,           \
+                     ___wait_nop_ret, schedule())
 
 /**
  * wait_event - sleep until a condition gets true