FreeBSD/sys/kern/sched_ule.c
/*
 * Lock two thread queues using their address to maintain lock order.
 */
Lock two thread queues using their address to maintain lock order.
Lock two thread queues using their address to maintain lock order .
static void
tdq_lock_pair(struct tdq *one, struct tdq *two)
{
	if (one < two) {
		TDQ_LOCK(one);
		TDQ_LOCK_FLAGS(two, MTX_DUPOK);
	} else {
		TDQ_LOCK(two);
		TDQ_LOCK_FLAGS(one, MTX_DUPOK);
	}
}
static void tdq_lock_pair ( struct tdq * one , struct tdq * two ) { if ( one < two ) { TDQ_LOCK ( one ) ; TDQ_LOCK_FLAGS ( two , MTX_DUPOK ) ; } else { TDQ_LOCK ( two ) ; TDQ_LOCK_FLAGS ( one , MTX_DUPOK ) ; } }
Lock two thread queues using their address to maintain lock order.
Lock two thread queues using their address to maintain lock order .