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

Function _rm_unlock_hard

freebsd/kern/kern_rmlock.c:475–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473}
474
475static __noinline void
476_rm_unlock_hard(struct thread *td,struct rm_priotracker *tracker)
477{
478
479 if (td->td_owepreempt) {
480 td->td_critnest++;
481 critical_exit();
482 }
483
484 if (!tracker->rmp_flags)
485 return;
486
487 mtx_lock_spin(&rm_spinlock);
488 LIST_REMOVE(tracker, rmp_qentry);
489
490 if (tracker->rmp_flags & RMPF_SIGNAL) {
491 struct rmlock *rm;
492 struct turnstile *ts;
493
494 rm = tracker->rmp_rmlock;
495
496 turnstile_chain_lock(&rm->lock_object);
497 mtx_unlock_spin(&rm_spinlock);
498
499 ts = turnstile_lookup(&rm->lock_object);
500
501 turnstile_signal(ts, TS_EXCLUSIVE_QUEUE);
502 turnstile_unpend(ts);
503 turnstile_chain_unlock(&rm->lock_object);
504 } else
505 mtx_unlock_spin(&rm_spinlock);
506}
507
508void
509_rm_runlock(struct rmlock *rm, struct rm_priotracker *tracker)

Callers 1

_rm_runlockFunction · 0.85

Calls 6

turnstile_chain_lockFunction · 0.85
turnstile_lookupFunction · 0.85
turnstile_signalFunction · 0.85
turnstile_unpendFunction · 0.85
turnstile_chain_unlockFunction · 0.85
critical_exitFunction · 0.50

Tested by

no test coverage detected