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

Function _rw_runlock_cookie_int

freebsd/kern/kern_rwlock.c:840–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

838}
839
840void
841_rw_runlock_cookie_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF)
842{
843 struct thread *td;
844 uintptr_t v;
845
846 KASSERT(rw->rw_lock != RW_DESTROYED,
847 ("rw_runlock() of destroyed rwlock @ %s:%d", file, line));
848 __rw_assert(&rw->rw_lock, RA_RLOCKED, file, line);
849 WITNESS_UNLOCK(&rw->lock_object, 0, file, line);
850 LOCK_LOG_LOCK("RUNLOCK", &rw->lock_object, 0, 0, file, line);
851
852 td = curthread;
853 v = RW_READ_VALUE(rw);
854
855 if (__predict_false(LOCKSTAT_PROFILE_ENABLED(rw__release) ||
856 !__rw_runlock_try(rw, td, &v)))
857 __rw_runlock_hard(rw, td, v LOCK_FILE_LINE_ARG);
858 else
859 lock_profile_release_lock(&rw->lock_object);
860
861 TD_LOCKS_DEC(curthread);
862}
863
864void
865_rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line)

Callers

nothing calls this directly

Calls 4

__rw_assertFunction · 0.85
__rw_runlock_tryFunction · 0.85
__rw_runlock_hardFunction · 0.85

Tested by

no test coverage detected