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

Function _rm_runlock

freebsd/kern/kern_rmlock.c:508–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void
509_rm_runlock(struct rmlock *rm, struct rm_priotracker *tracker)
510{
511 struct pcpu *pc;
512 struct thread *td = tracker->rmp_thread;
513
514 if (SCHEDULER_STOPPED())
515 return;
516
517 td->td_critnest++; /* critical_enter(); */
518 pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */
519 rm_tracker_remove(pc, tracker);
520 td->td_critnest--;
521 sched_unpin();
522
523 if (rm->lock_object.lo_flags & LO_SLEEPABLE)
524 THREAD_SLEEPING_OK();
525
526 if (__predict_true(0 == (td->td_owepreempt | tracker->rmp_flags)))
527 return;
528
529 _rm_unlock_hard(td, tracker);
530}
531
532void
533_rm_wlock(struct rmlock *rm)

Callers 1

_rm_runlock_debugFunction · 0.70

Calls 3

rm_tracker_removeFunction · 0.85
sched_unpinFunction · 0.85
_rm_unlock_hardFunction · 0.85

Tested by

no test coverage detected