Lines Matching full:condition

265 #define ___wait_cond_timeout(condition)						\  argument
267 bool __cond = (condition); \
284 * to wrap the condition.
291 #define ___wait_event(wq_head, condition, state, exclusive, ret, cmd) \ argument
301 if (condition) \
315 #define __wait_event(wq_head, condition) \ argument
316 (void)___wait_event(wq_head, condition, TASK_UNINTERRUPTIBLE, 0, 0, \
320 * wait_event - sleep until a condition gets true
322 * @condition: a C expression for the event to wait for
325 * @condition evaluates to true. The @condition is checked each time
329 * change the result of the wait condition.
331 #define wait_event(wq_head, condition) \ argument
334 if (condition) \
336 __wait_event(wq_head, condition); \
339 #define __io_wait_event(wq_head, condition) \ argument
340 (void)___wait_event(wq_head, condition, TASK_UNINTERRUPTIBLE, 0, 0, \
346 #define io_wait_event(wq_head, condition) \ argument
349 if (condition) \
351 __io_wait_event(wq_head, condition); \
354 #define __wait_event_freezable(wq_head, condition) \ argument
355 ___wait_event(wq_head, condition, TASK_INTERRUPTIBLE, 0, 0, \
359 * wait_event_freezable - sleep (or freeze) until a condition gets true
361 * @condition: a C expression for the event to wait for
364 * to system load) until the @condition evaluates to true. The
365 * @condition is checked each time the waitqueue @wq_head is woken up.
368 * change the result of the wait condition.
370 #define wait_event_freezable(wq_head, condition) \ argument
374 if (!(condition)) \
375 __ret = __wait_event_freezable(wq_head, condition); \
379 #define __wait_event_timeout(wq_head, condition, timeout) \ argument
380 ___wait_event(wq_head, ___wait_cond_timeout(condition), \
385 * wait_event_timeout - sleep until a condition gets true or a timeout elapses
387 * @condition: a C expression for the event to wait for
391 * @condition evaluates to true. The @condition is checked each time
395 * change the result of the wait condition.
398 * 0 if the @condition evaluated to %false after the @timeout elapsed,
399 * 1 if the @condition evaluated to %true after the @timeout elapsed,
400 * or the remaining jiffies (at least 1) if the @condition evaluated
403 #define wait_event_timeout(wq_head, condition, timeout) \ argument
407 if (!___wait_cond_timeout(condition)) \
408 __ret = __wait_event_timeout(wq_head, condition, timeout); \
412 #define __wait_event_freezable_timeout(wq_head, condition, timeout) \ argument
413 ___wait_event(wq_head, ___wait_cond_timeout(condition), \
421 #define wait_event_freezable_timeout(wq_head, condition, timeout) \ argument
425 if (!___wait_cond_timeout(condition)) \
426 __ret = __wait_event_freezable_timeout(wq_head, condition, timeout); \
430 #define __wait_event_exclusive_cmd(wq_head, condition, cmd1, cmd2) \ argument
431 (void)___wait_event(wq_head, condition, TASK_UNINTERRUPTIBLE, 1, 0, \
436 #define wait_event_exclusive_cmd(wq_head, condition, cmd1, cmd2) \ argument
438 if (condition) \
440 __wait_event_exclusive_cmd(wq_head, condition, cmd1, cmd2); \
443 #define __wait_event_cmd(wq_head, condition, cmd1, cmd2) \ argument
444 (void)___wait_event(wq_head, condition, TASK_UNINTERRUPTIBLE, 0, 0, \
448 * wait_event_cmd - sleep until a condition gets true
450 * @condition: a C expression for the event to wait for
455 * @condition evaluates to true. The @condition is checked each time
459 * change the result of the wait condition.
461 #define wait_event_cmd(wq_head, condition, cmd1, cmd2) \ argument
463 if (condition) \
465 __wait_event_cmd(wq_head, condition, cmd1, cmd2); \
468 #define __wait_event_interruptible(wq_head, condition) \ argument
469 ___wait_event(wq_head, condition, TASK_INTERRUPTIBLE, 0, 0, \
473 * wait_event_interruptible - sleep until a condition gets true
475 * @condition: a C expression for the event to wait for
478 * @condition evaluates to true or a signal is received.
479 * The @condition is checked each time the waitqueue @wq_head is woken up.
482 * change the result of the wait condition.
485 * signal and 0 if @condition evaluated to true.
487 #define wait_event_interruptible(wq_head, condition) \ argument
491 if (!(condition)) \
492 __ret = __wait_event_interruptible(wq_head, condition); \
496 #define __wait_event_interruptible_timeout(wq_head, condition, timeout) \ argument
497 ___wait_event(wq_head, ___wait_cond_timeout(condition), \
502 * wait_event_interruptible_timeout - sleep until a condition gets true or a timeout elapses
504 * @condition: a C expression for the event to wait for
508 * @condition evaluates to true or a signal is received.
509 * The @condition is checked each time the waitqueue @wq_head is woken up.
512 * change the result of the wait condition.
515 * 0 if the @condition evaluated to %false after the @timeout elapsed,
516 * 1 if the @condition evaluated to %true after the @timeout elapsed,
517 * the remaining jiffies (at least 1) if the @condition evaluated
521 #define wait_event_interruptible_timeout(wq_head, condition, timeout) \ argument
525 if (!___wait_cond_timeout(condition)) \
527 condition, timeout); \
531 #define __wait_event_hrtimeout(wq_head, condition, timeout, state) \ argument
544 __ret = ___wait_event(wq_head, condition, state, 0, 0, \
557 * wait_event_hrtimeout - sleep until a condition gets true or a timeout elapses
559 * @condition: a C expression for the event to wait for
563 * @condition evaluates to true or a signal is received.
564 * The @condition is checked each time the waitqueue @wq_head is woken up.
567 * change the result of the wait condition.
569 * The function returns 0 if @condition became true, or -ETIME if the timeout
572 #define wait_event_hrtimeout(wq_head, condition, timeout) \ argument
576 if (!(condition)) \
577 __ret = __wait_event_hrtimeout(wq_head, condition, timeout, \
583 * wait_event_interruptible_hrtimeout - sleep until a condition gets true or a timeout elapses
585 * @condition: a C expression for the event to wait for
589 * @condition evaluates to true or a signal is received.
590 * The @condition is checked each time the waitqueue @wq is woken up.
593 * change the result of the wait condition.
595 * The function returns 0 if @condition became true, -ERESTARTSYS if it was
598 #define wait_event_interruptible_hrtimeout(wq, condition, timeout) \ argument
602 if (!(condition)) \
603 __ret = __wait_event_hrtimeout(wq, condition, timeout, \
608 #define __wait_event_interruptible_exclusive(wq, condition) \ argument
609 ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 1, 0, \
612 #define wait_event_interruptible_exclusive(wq, condition) \ argument
616 if (!(condition)) \
617 __ret = __wait_event_interruptible_exclusive(wq, condition); \
621 #define __wait_event_killable_exclusive(wq, condition) \ argument
622 ___wait_event(wq, condition, TASK_KILLABLE, 1, 0, \
625 #define wait_event_killable_exclusive(wq, condition) \ argument
629 if (!(condition)) \
630 __ret = __wait_event_killable_exclusive(wq, condition); \
635 #define __wait_event_freezable_exclusive(wq, condition) \ argument
636 ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 1, 0, \
639 #define wait_event_freezable_exclusive(wq, condition) \ argument
643 if (!(condition)) \
644 __ret = __wait_event_freezable_exclusive(wq, condition); \
649 * wait_event_idle - wait for a condition without contributing to system load
651 * @condition: a C expression for the event to wait for
654 * @condition evaluates to true.
655 * The @condition is checked each time the waitqueue @wq_head is woken up.
658 * change the result of the wait condition.
661 #define wait_event_idle(wq_head, condition) \ argument
664 if (!(condition)) \
665 ___wait_event(wq_head, condition, TASK_IDLE, 0, 0, schedule()); \
669 * wait_event_idle_exclusive - wait for a condition with contributing to system load
671 * @condition: a C expression for the event to wait for
674 * @condition evaluates to true.
675 * The @condition is checked each time the waitqueue @wq_head is woken up.
682 * change the result of the wait condition.
685 #define wait_event_idle_exclusive(wq_head, condition) \ argument
688 if (!(condition)) \
689 ___wait_event(wq_head, condition, TASK_IDLE, 1, 0, schedule()); \
692 #define __wait_event_idle_timeout(wq_head, condition, timeout) \ argument
693 ___wait_event(wq_head, ___wait_cond_timeout(condition), \
698 * wait_event_idle_timeout - sleep without load until a condition becomes true or a timeout elapses
700 * @condition: a C expression for the event to wait for
704 * @condition evaluates to true. The @condition is checked each time
708 * change the result of the wait condition.
711 * 0 if the @condition evaluated to %false after the @timeout elapsed,
712 * 1 if the @condition evaluated to %true after the @timeout elapsed,
713 * or the remaining jiffies (at least 1) if the @condition evaluated
716 #define wait_event_idle_timeout(wq_head, condition, timeout) \ argument
720 if (!___wait_cond_timeout(condition)) \
721 __ret = __wait_event_idle_timeout(wq_head, condition, timeout); \
725 #define __wait_event_idle_exclusive_timeout(wq_head, condition, timeout) \ argument
726 ___wait_event(wq_head, ___wait_cond_timeout(condition), \
731 …* wait_event_idle_exclusive_timeout - sleep without load until a condition becomes true or a timeo…
733 * @condition: a C expression for the event to wait for
737 * @condition evaluates to true. The @condition is checked each time
745 * change the result of the wait condition.
748 * 0 if the @condition evaluated to %false after the @timeout elapsed,
749 * 1 if the @condition evaluated to %true after the @timeout elapsed,
750 * or the remaining jiffies (at least 1) if the @condition evaluated
753 #define wait_event_idle_exclusive_timeout(wq_head, condition, timeout) \ argument
757 if (!___wait_cond_timeout(condition)) \
758 __ret = __wait_event_idle_exclusive_timeout(wq_head, condition, timeout);\
765 #define __wait_event_interruptible_locked(wq, condition, exclusive, fn) \ argument
775 } while (!(condition)); \
783 * wait_event_interruptible_locked - sleep until a condition gets true
785 * @condition: a C expression for the event to wait for
788 * @condition evaluates to true or a signal is received.
789 * The @condition is checked each time the waitqueue @wq is woken up.
792 * unlocked while sleeping but @condition testing is done while lock
800 * change the result of the wait condition.
803 * signal and 0 if @condition evaluated to true.
805 #define wait_event_interruptible_locked(wq, condition) \ argument
806 ((condition) \
807 ? 0 : __wait_event_interruptible_locked(wq, condition, 0, do_wait_intr))
810 * wait_event_interruptible_locked_irq - sleep until a condition gets true
812 * @condition: a C expression for the event to wait for
815 * @condition evaluates to true or a signal is received.
816 * The @condition is checked each time the waitqueue @wq is woken up.
819 * unlocked while sleeping but @condition testing is done while lock
827 * change the result of the wait condition.
830 * signal and 0 if @condition evaluated to true.
832 #define wait_event_interruptible_locked_irq(wq, condition) \ argument
833 ((condition) \
834 ? 0 : __wait_event_interruptible_locked(wq, condition, 0, do_wait_intr_irq))
837 * wait_event_interruptible_exclusive_locked - sleep exclusively until a condition gets true
839 * @condition: a C expression for the event to wait for
842 * @condition evaluates to true or a signal is received.
843 * The @condition is checked each time the waitqueue @wq is woken up.
846 * unlocked while sleeping but @condition testing is done while lock
858 * change the result of the wait condition.
861 * signal and 0 if @condition evaluated to true.
863 #define wait_event_interruptible_exclusive_locked(wq, condition) \ argument
864 ((condition) \
865 ? 0 : __wait_event_interruptible_locked(wq, condition, 1, do_wait_intr))
868 * wait_event_interruptible_exclusive_locked_irq - sleep until a condition gets true
870 * @condition: a C expression for the event to wait for
873 * @condition evaluates to true or a signal is received.
874 * The @condition is checked each time the waitqueue @wq is woken up.
877 * unlocked while sleeping but @condition testing is done while lock
889 * change the result of the wait condition.
892 * signal and 0 if @condition evaluated to true.
894 #define wait_event_interruptible_exclusive_locked_irq(wq, condition) \ argument
895 ((condition) \
896 ? 0 : __wait_event_interruptible_locked(wq, condition, 1, do_wait_intr_irq))
899 #define __wait_event_killable(wq, condition) \ argument
900 ___wait_event(wq, condition, TASK_KILLABLE, 0, 0, schedule())
903 * wait_event_killable - sleep until a condition gets true
905 * @condition: a C expression for the event to wait for
908 * @condition evaluates to true or a signal is received.
909 * The @condition is checked each time the waitqueue @wq_head is woken up.
912 * change the result of the wait condition.
915 * signal and 0 if @condition evaluated to true.
917 #define wait_event_killable(wq_head, condition) \ argument
921 if (!(condition)) \
922 __ret = __wait_event_killable(wq_head, condition); \
926 #define __wait_event_killable_timeout(wq_head, condition, timeout) \ argument
927 ___wait_event(wq_head, ___wait_cond_timeout(condition), \
932 * wait_event_killable_timeout - sleep until a condition gets true or a timeout elapses
934 * @condition: a C expression for the event to wait for
938 * @condition evaluates to true or a kill signal is received.
939 * The @condition is checked each time the waitqueue @wq_head is woken up.
942 * change the result of the wait condition.
945 * 0 if the @condition evaluated to %false after the @timeout elapsed,
946 * 1 if the @condition evaluated to %true after the @timeout elapsed,
947 * the remaining jiffies (at least 1) if the @condition evaluated
953 #define wait_event_killable_timeout(wq_head, condition, timeout) \ argument
957 if (!___wait_cond_timeout(condition)) \
959 condition, timeout); \
964 #define __wait_event_lock_irq(wq_head, condition, lock, cmd) \ argument
965 (void)___wait_event(wq_head, condition, TASK_UNINTERRUPTIBLE, 0, 0, \
972 * wait_event_lock_irq_cmd - sleep until a condition gets true. The
973 * condition is checked under the lock. This
977 * @condition: a C expression for the event to wait for
984 * @condition evaluates to true. The @condition is checked each time
988 * change the result of the wait condition.
994 #define wait_event_lock_irq_cmd(wq_head, condition, lock, cmd) \ argument
996 if (condition) \
998 __wait_event_lock_irq(wq_head, condition, lock, cmd); \
1002 * wait_event_lock_irq - sleep until a condition gets true. The
1003 * condition is checked under the lock. This
1007 * @condition: a C expression for the event to wait for
1012 * @condition evaluates to true. The @condition is checked each time
1016 * change the result of the wait condition.
1021 #define wait_event_lock_irq(wq_head, condition, lock) \ argument
1023 if (condition) \
1025 __wait_event_lock_irq(wq_head, condition, lock, ); \
1029 #define __wait_event_interruptible_lock_irq(wq_head, condition, lock, cmd) \ argument
1030 ___wait_event(wq_head, condition, TASK_INTERRUPTIBLE, 0, 0, \
1037 * wait_event_interruptible_lock_irq_cmd - sleep until a condition gets true.
1038 * The condition is checked under the lock. This is expected to
1041 * @condition: a C expression for the event to wait for
1048 * @condition evaluates to true or a signal is received. The @condition is
1052 * change the result of the wait condition.
1059 * and 0 if @condition evaluated to true.
1061 #define wait_event_interruptible_lock_irq_cmd(wq_head, condition, lock, cmd) \ argument
1064 if (!(condition)) \
1066 condition, lock, cmd); \
1071 * wait_event_interruptible_lock_irq - sleep until a condition gets true.
1072 * The condition is checked under the lock. This is expected
1075 * @condition: a C expression for the event to wait for
1080 * @condition evaluates to true or signal is received. The @condition is
1084 * change the result of the wait condition.
1090 * and 0 if @condition evaluated to true.
1092 #define wait_event_interruptible_lock_irq(wq_head, condition, lock) \ argument
1095 if (!(condition)) \
1097 condition, lock,); \
1101 #define __wait_event_lock_irq_timeout(wq_head, condition, lock, timeout, state) \ argument
1102 ___wait_event(wq_head, ___wait_cond_timeout(condition), \
1109 * wait_event_interruptible_lock_irq_timeout - sleep until a condition gets
1110 * true or a timeout elapses. The condition is checked under
1113 * @condition: a C expression for the event to wait for
1119 * @condition evaluates to true or signal is received. The @condition is
1123 * change the result of the wait condition.
1130 * if the condition evaluated to true before the timeout elapsed.
1132 #define wait_event_interruptible_lock_irq_timeout(wq_head, condition, lock, \ argument
1136 if (!___wait_cond_timeout(condition)) \
1138 wq_head, condition, lock, timeout, \
1143 #define wait_event_lock_irq_timeout(wq_head, condition, lock, timeout) \ argument
1146 if (!___wait_cond_timeout(condition)) \
1148 wq_head, condition, lock, timeout, \