Lines Matching refs:completion

2 Completions - "wait for completion" barrier APIs
27 is reduced to a simple flag in 'struct completion', appropriately called "done".
30 kernel/sched/completion.c.
38 - the initialization of the 'struct completion' synchronization object
45 to have marked a completion as 'done' before another thread checks whether
48 To use completions you need to #include <linux/completion.h> and
49 create a static or dynamic variable of type 'struct completion',
52 struct completion {
58 the ->done completion flag for indicating whether it's completed or not.
67 Good, intuitive naming (as always) helps code readability. Naming a completion
74 Dynamically allocated completion objects should preferably be embedded in data
84 Initializing of dynamically allocated completion objects is done via a call to
97 Calling init_completion() on the same completion object twice is
110 Note that in this case the completion is boot time (or module load time)
113 When a completion is declared as a local variable within a function,
120 Note that when using completion objects as local variables you must be
123 threads) have ceased and the completion object is completely unused.
133 If unsure, use dynamically allocated completion objects, preferably embedded
135 exceeds the life time of any helper threads using the completion object,
145 calls wait_for_completion() on the initialized completion structure::
147 void wait_for_completion(struct completion *done)
153 struct completion setup_done;
166 completion is signaled by complete().
177 try_wait_for_completion() below for handling completion in atomic/interrupt
201 ... would execute the same code path for successful completion and for the
204 int wait_for_completion_interruptible(struct completion *done)
209 unsigned long wait_for_completion_timeout(struct completion *done, unsigned long timeout)
221 long wait_for_completion_interruptible_timeout(struct completion *done, unsigned long timeout)
225 otherwise it returns 0 if the completion timed out, or the remaining time in
226 jiffies if completion occurred.
230 or 0 if completion was achieved. There is a _timeout variant as well::
232 long wait_for_completion_killable(struct completion *done)
233 long wait_for_completion_killable_timeout(struct completion *done, unsigned long timeout)
239 void wait_for_completion_io(struct completion *done)
240 unsigned long wait_for_completion_io_timeout(struct completion *done, unsigned long timeout)
250 void complete(struct completion *done)
254 void complete_all(struct completion *done)
258 (decrementing) the done field of 'struct completion'. Waiting threads
267 particular 'struct completion' at any time - serialized through the wait
271 Signaling completion from IRQ context is fine as it will appropriately
281 else it consumes one posted completion and returns true::
283 bool try_wait_for_completion(struct completion *done)
285 Finally, to check the state of a completion without changing it in any way,
290 bool completion_done(struct completion *done)