Lines Matching refs:cv

345 void condvar_init(struct condvar *cv)  in condvar_init()  argument
347 *cv = (struct condvar)CONDVAR_INITIALIZER; in condvar_init()
350 void condvar_destroy(struct condvar *cv) in condvar_destroy() argument
352 if (cv->m && wq_have_condvar(&cv->m->wq, cv)) in condvar_destroy()
355 condvar_init(cv); in condvar_destroy()
358 static void cv_signal(struct condvar *cv, bool only_one, const char *fname, in cv_signal() argument
364 old_itr_status = cpu_spin_lock_xsave(&cv->spin_lock); in cv_signal()
365 m = cv->m; in cv_signal()
366 cpu_spin_unlock_xrestore(&cv->spin_lock, old_itr_status); in cv_signal()
369 wq_promote_condvar(&m->wq, cv, only_one, m, fname, lineno); in cv_signal()
374 void condvar_signal_debug(struct condvar *cv, const char *fname, int lineno) in condvar_signal_debug() argument
376 cv_signal(cv, true /* only one */, fname, lineno); in condvar_signal_debug()
379 void condvar_broadcast_debug(struct condvar *cv, const char *fname, int lineno) in condvar_broadcast_debug() argument
381 cv_signal(cv, false /* all */, fname, lineno); in condvar_broadcast_debug()
385 void condvar_signal(struct condvar *cv) in condvar_signal() argument
387 cv_signal(cv, true /* only one */, NULL, -1); in condvar_signal()
390 void condvar_broadcast(struct condvar *cv) in condvar_broadcast() argument
392 cv_signal(cv, false /* all */, NULL, -1); in condvar_broadcast()
396 static void __condvar_wait(struct condvar *cv, struct mutex *m, in __condvar_wait() argument
407 old_itr_status = cpu_spin_lock_xsave(&cv->spin_lock); in __condvar_wait()
408 if (cv->m && cv->m != m) in __condvar_wait()
411 cv->m = m; in __condvar_wait()
412 cpu_spin_unlock(&cv->spin_lock); in __condvar_wait()
420 wq_wait_init_condvar(&m->wq, &wqe, cv, m->state > 0); in __condvar_wait()
446 void condvar_wait_debug(struct condvar *cv, struct mutex *m, in condvar_wait_debug() argument
449 __condvar_wait(cv, m, fname, lineno); in condvar_wait_debug()
452 void condvar_wait(struct condvar *cv, struct mutex *m) in condvar_wait() argument
454 __condvar_wait(cv, m, NULL, -1); in condvar_wait()