FreeBSD/sys/kern/subr_sleepqueue.c
/*
 * Returns the type of sleepqueue given a waitchannel.
 */
Returns the type of sleepqueue given a waitchannel.
Returns the type of sleepqueue given a waitchannel .
int
sleepq_type(void *wchan)
{
	struct sleepqueue *sq;
	int type;
	MPASS(wchan != NULL);
	sleepq_lock(wchan);
	sq = sleepq_lookup(wchan);
	if (sq == NULL) {
		sleepq_release(wchan);
		return (-1);
	}
	type = sq->sq_type;
	sleepq_release(wchan);
	return (type);
}
int sleepq_type ( void * wchan ) { struct sleepqueue * sq ; int type ; MPASS ( wchan != NULL ) ; sleepq_lock ( wchan ) ; sq = sleepq_lookup ( wchan ) ; if ( sq == NULL ) { sleepq_release ( wchan ) ; return ( -1 ) ; } type = sq -> sq_type ; sleepq_release ( wchan ) ; return ( type ) ; }
Returns the type of sleepqueue given a waitchannel.
Returns the type of sleepqueue given a waitchannel .