FreeBSD/sys/kern/subr_sleepqueue.c
/*
 * Block the current thread until it is awakened from its sleep queue,
 * it is interrupted by a signal, or it times out waiting to be awakened.
 */
Block the current thread until it is awakened from its sleep queue,
it is interrupted by a signal, or it times out waiting to be awakened.
Block the current thread until it is awakened from its sleep queue it is interrupted by a signal or it times out waiting to be awakened .
int
sleepq_timedwait_sig(void *wchan, int pri)
{
	int rcatch, rvalt, rvals;
	rcatch = sleepq_catch_signals(wchan, pri);
	rvalt = sleepq_check_timeout();
	rvals = sleepq_check_signals();
	thread_unlock(curthread);
	if (rcatch)
		return (rcatch);
	if (rvals)
		return (rvals);
	return (rvalt);
}
int sleepq_timedwait_sig ( void * wchan , int pri ) { int rcatch , rvalt , rvals ; rcatch = sleepq_catch_signals ( wchan , pri ) ; rvalt = sleepq_check_timeout ( ) ; rvals = sleepq_check_signals ( ) ; thread_unlock ( curthread ) ; if ( rcatch ) return ( rcatch ) ; if ( rvals ) return ( rvals ) ; return ( rvalt ) ; }
Block the current thread until it is awakened from its sleep queue,
 it is interrupted by a signal, or it times out waiting to be awakened.
Block the current thread until it is awakened from its sleep queue it is interrupted by a signal or it times out waiting to be awakened .