MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tdq_lock_pair

Function tdq_lock_pair

freebsd/kern/sched_ule.c:896–906  ·  view source on GitHub ↗

* Lock two thread queues using their address to maintain lock order. */

Source from the content-addressed store, hash-verified

894 * Lock two thread queues using their address to maintain lock order.
895 */
896static void
897tdq_lock_pair(struct tdq *one, struct tdq *two)
898{
899 if (one < two) {
900 TDQ_LOCK(one);
901 TDQ_LOCK_FLAGS(two, MTX_DUPOK);
902 } else {
903 TDQ_LOCK(two);
904 TDQ_LOCK_FLAGS(one, MTX_DUPOK);
905 }
906}
907
908/*
909 * Unlock two thread queues. Order is not important here.

Callers 3

sched_balance_pairFunction · 0.85
tdq_idledFunction · 0.85
tdq_trystealFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected