FreeBSD/sys/compat/cloudabi/cloudabi_futex.c
/*
 * Wakes up the best waiter (i.e., the waiter having the highest
 * priority) in a queue.
 */
Wakes up the best waiter  in a queue.
Wakes up the best waiter in a queue .
static void
futex_queue_wake_up_best(struct futex_queue *fq)
{
	struct futex_waiter *fw;
	fw = STAILQ_FIRST(&fq->fq_list);
	fw->fw_locked = true;
	fw->fw_queue = NULL;
	cv_signal(&fw->fw_wait);
	STAILQ_REMOVE_HEAD(&fq->fq_list, fw_next);
	--fq->fq_count;
}
static void futex_queue_wake_up_best ( struct futex_queue * fq ) { struct futex_waiter * fw ; fw = STAILQ_FIRST ( & fq -> fq_list ) ; fw -> fw_locked = true ; fw -> fw_queue = NULL ; cv_signal ( & fw -> fw_wait ) ; STAILQ_REMOVE_HEAD ( & fq -> fq_list , fw_next ) ; -- fq -> fq_count ; }
Wakes up the best waiter (i.e., the waiter having the highest
 priority) in a queue.
Wakes up the best waiter ( i . e . the waiter having the highest priority ) in a queue .