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

Function thread_lock_set

freebsd/kern/kern_mutex.c:990–1000  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

988}
989
990void
991thread_lock_set(struct thread *td, struct mtx *new)
992{
993 struct mtx *lock;
994
995 mtx_assert(new, MA_OWNED);
996 lock = td->td_lock;
997 mtx_assert(lock, MA_OWNED);
998 td->td_lock = new;
999 mtx_unlock_spin(lock);
1000}
1001
1002/*
1003 * __mtx_unlock_sleep: the tougher part of releasing an MTX_DEF lock.

Callers 5

sched_addFunction · 0.85
sched_4bsd.cFile · 0.85
turnstile_waitFunction · 0.85
sleepq_switchFunction · 0.85
sched_addFunction · 0.85

Calls 1

mtx_assertFunction · 0.85

Tested by

no test coverage detected