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

Function _rm_wlock_debug

freebsd/kern/kern_rmlock.c:593–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591#if LOCK_DEBUG > 0
592
593void
594_rm_wlock_debug(struct rmlock *rm, const char *file, int line)
595{
596
597 if (SCHEDULER_STOPPED())
598 return;
599
600 KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
601 ("rm_wlock() by idle thread %p on rmlock %s @ %s:%d",
602 curthread, rm->lock_object.lo_name, file, line));
603 KASSERT(!rm_destroyed(rm),
604 ("rm_wlock() of destroyed rmlock @ %s:%d", file, line));
605 _rm_assert(rm, RA_UNLOCKED, file, line);
606
607 WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE,
608 file, line, NULL);
609
610 _rm_wlock(rm);
611
612 LOCK_LOG_LOCK("RMWLOCK", &rm->lock_object, 0, 0, file, line);
613 WITNESS_LOCK(&rm->lock_object, LOP_EXCLUSIVE, file, line);
614 TD_LOCKS_INC(curthread);
615}
616
617void
618_rm_wunlock_debug(struct rmlock *rm, const char *file, int line)

Callers

nothing calls this directly

Calls 2

_rm_assertFunction · 0.85
_rm_wlockFunction · 0.70

Tested by

no test coverage detected