• Home
  • Raw
  • Download

Lines Matching refs:x

28 void complete(struct completion *x)  in complete()  argument
32 raw_spin_lock_irqsave(&x->wait.lock, flags); in complete()
34 if (x->done != UINT_MAX) in complete()
35 x->done++; in complete()
36 swake_up_locked(&x->wait); in complete()
37 raw_spin_unlock_irqrestore(&x->wait.lock, flags); in complete()
57 void complete_all(struct completion *x) in complete_all() argument
63 raw_spin_lock_irqsave(&x->wait.lock, flags); in complete_all()
64 x->done = UINT_MAX; in complete_all()
65 swake_up_all_locked(&x->wait); in complete_all()
66 raw_spin_unlock_irqrestore(&x->wait.lock, flags); in complete_all()
71 do_wait_for_common(struct completion *x, in do_wait_for_common() argument
74 if (!x->done) { in do_wait_for_common()
82 __prepare_to_swait(&x->wait, &wait); in do_wait_for_common()
84 raw_spin_unlock_irq(&x->wait.lock); in do_wait_for_common()
86 raw_spin_lock_irq(&x->wait.lock); in do_wait_for_common()
87 } while (!x->done && timeout); in do_wait_for_common()
88 __finish_swait(&x->wait, &wait); in do_wait_for_common()
89 if (!x->done) in do_wait_for_common()
92 if (x->done != UINT_MAX) in do_wait_for_common()
93 x->done--; in do_wait_for_common()
98 __wait_for_common(struct completion *x, in __wait_for_common() argument
103 complete_acquire(x); in __wait_for_common()
105 raw_spin_lock_irq(&x->wait.lock); in __wait_for_common()
106 timeout = do_wait_for_common(x, action, timeout, state); in __wait_for_common()
107 raw_spin_unlock_irq(&x->wait.lock); in __wait_for_common()
109 complete_release(x); in __wait_for_common()
115 wait_for_common(struct completion *x, long timeout, int state) in wait_for_common() argument
117 return __wait_for_common(x, schedule_timeout, timeout, state); in wait_for_common()
121 wait_for_common_io(struct completion *x, long timeout, int state) in wait_for_common_io() argument
123 return __wait_for_common(x, io_schedule_timeout, timeout, state); in wait_for_common_io()
136 void __sched wait_for_completion(struct completion *x) in wait_for_completion() argument
138 wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_UNINTERRUPTIBLE); in wait_for_completion()
155 wait_for_completion_timeout(struct completion *x, unsigned long timeout) in wait_for_completion_timeout() argument
157 return wait_for_common(x, timeout, TASK_UNINTERRUPTIBLE); in wait_for_completion_timeout()
169 void __sched wait_for_completion_io(struct completion *x) in wait_for_completion_io() argument
171 wait_for_common_io(x, MAX_SCHEDULE_TIMEOUT, TASK_UNINTERRUPTIBLE); in wait_for_completion_io()
189 wait_for_completion_io_timeout(struct completion *x, unsigned long timeout) in wait_for_completion_io_timeout() argument
191 return wait_for_common_io(x, timeout, TASK_UNINTERRUPTIBLE); in wait_for_completion_io_timeout()
204 int __sched wait_for_completion_interruptible(struct completion *x) in wait_for_completion_interruptible() argument
206 long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_INTERRUPTIBLE); in wait_for_completion_interruptible()
225 wait_for_completion_interruptible_timeout(struct completion *x, in wait_for_completion_interruptible_timeout() argument
228 return wait_for_common(x, timeout, TASK_INTERRUPTIBLE); in wait_for_completion_interruptible_timeout()
241 int __sched wait_for_completion_killable(struct completion *x) in wait_for_completion_killable() argument
243 long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_KILLABLE); in wait_for_completion_killable()
263 wait_for_completion_killable_timeout(struct completion *x, in wait_for_completion_killable_timeout() argument
266 return wait_for_common(x, timeout, TASK_KILLABLE); in wait_for_completion_killable_timeout()
282 bool try_wait_for_completion(struct completion *x) in try_wait_for_completion() argument
293 if (!READ_ONCE(x->done)) in try_wait_for_completion()
296 raw_spin_lock_irqsave(&x->wait.lock, flags); in try_wait_for_completion()
297 if (!x->done) in try_wait_for_completion()
299 else if (x->done != UINT_MAX) in try_wait_for_completion()
300 x->done--; in try_wait_for_completion()
301 raw_spin_unlock_irqrestore(&x->wait.lock, flags); in try_wait_for_completion()
315 bool completion_done(struct completion *x) in completion_done() argument
319 if (!READ_ONCE(x->done)) in completion_done()
327 raw_spin_lock_irqsave(&x->wait.lock, flags); in completion_done()
328 raw_spin_unlock_irqrestore(&x->wait.lock, flags); in completion_done()