MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sleepq_timedwait

Function sleepq_timedwait

freebsd/kern/subr_sleepqueue.c:681–693  ·  view source on GitHub ↗

* Block the current thread until it is awakened from its sleep queue * or it times out while waiting. */

Source from the content-addressed store, hash-verified

679 * or it times out while waiting.
680 */
681int
682sleepq_timedwait(const void *wchan, int pri)
683{
684 struct thread *td;
685
686 td = curthread;
687 MPASS(!(td->td_flags & TDF_SINTR));
688
689 thread_lock(td);
690 sleepq_switch(wchan, pri);
691
692 return (sleepq_check_timeout());
693}
694
695/*
696 * Block the current thread until it is awakened from its sleep queue,

Callers 4

_cv_timedwait_sbtFunction · 0.85
sleeplkFunction · 0.85
_sleepFunction · 0.85
msleep_spin_sbtFunction · 0.85

Calls 2

sleepq_switchFunction · 0.85
sleepq_check_timeoutFunction · 0.85

Tested by

no test coverage detected