FreeBSD/sys/kern/subr_sleepqueue.c
/*
 * Return the number of actual sleepers for the specified queue.
 */
Return the number of actual sleepers for the specified queue.
Return the number of actual sleepers for the specified queue .
u_int
sleepq_sleepcnt(void *wchan, int queue)
{
	struct sleepqueue *sq;
	KASSERT(wchan != NULL, ("%s: invalid NULL wait channel", __func__));
	MPASS((queue >= 0) && (queue < NR_SLEEPQS));
	sq = sleepq_lookup(wchan);
	if (sq == NULL)
		return (0);
	return (sq->sq_blockedcnt[queue]);
}
u_int sleepq_sleepcnt ( void * wchan , int queue ) { struct sleepqueue * sq ; KASSERT ( wchan != NULL , ( " " , __func__ ) ) ; MPASS ( ( queue >= 0 ) && ( queue < NR_SLEEPQS ) ) ; sq = sleepq_lookup ( wchan ) ; if ( sq == NULL ) return ( 0 ) ; return ( sq -> sq_blockedcnt [ queue ] ) ; }
Return the number of actual sleepers for the specified queue.
Return the number of actual sleepers for the specified queue .