Lines Matching +full:wait +full:- +full:state
1 /* SPDX-License-Identifier: GPL-2.0 */
8 #include <linux/wait.h>
12 * Simple waitqueues are semantically very different to regular wait queues
13 * (wait.h). The most important difference is that the simple waitqueue allows
14 * for deterministic behaviour -- IOW it has strictly bounded IRQ and lock hold
24 * - mixing INTERRUPTIBLE and UNINTERRUPTIBLE sleeps on the same waitqueue;
26 * sleeper state.
28 * - the !exclusive mode; because that leads to O(n) wakeups, everything is
31 * - custom wake callback functions; because you cannot give any guarantees
35 * As a side effect of these; the data structures are slimmer albeit more ad-hoc.
36 * For all the above, note that simple wait queues should _only_ be used under
37 * very specific realtime constraints -- it is best to stick with the regular
38 * wait queues in most cases.
89 * swait_active -- locklessly test for waiters on the queue
92 * returns true if the wait list is not empty
95 * lead to sporadic and non-obvious failure.
102 * CPU0 - waker CPU1 - waiter
105 * @cond = true; prepare_to_swait_exclusive(&wq_head, &wait, state);
111 * finish_swait(&wq_head, &wait);
115 * observe an empty wait list while the waiter might not observe @cond.
123 return !list_empty(&wq->task_list); in swait_active()
127 * swq_has_sleeper - check if there are any waiting processes
138 * modifications to the wait queue (task_list). in swq_has_sleeper()
151 …n void prepare_to_swait_exclusive(struct swait_queue_head *q, struct swait_queue *wait, int state);
152 extern long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state);
154 extern void __finish_swait(struct swait_queue_head *q, struct swait_queue *wait);
155 extern void finish_swait(struct swait_queue_head *q, struct swait_queue *wait);
158 #define ___swait_event(wq, condition, state, ret, cmd) \ argument
166 long __int = prepare_to_swait_event(&wq, &__wait, state);\
171 if (___wait_is_interruptible(state) && __int) { \
236 * swait_event_idle_exclusive - wait without system load contribution
237 * @wq: the waitqueue to wait on
238 * @condition: a C expression for the event to wait for
260 * swait_event_idle_timeout_exclusive - wait up to timeout without load contribution
261 * @wq: the waitqueue to wait on
262 * @condition: a C expression for the event to wait for