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

Function _rw_wunlock_cookie

freebsd/kern/kern_rwlock.c:359–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359void
360_rw_wunlock_cookie(volatile uintptr_t *c, const char *file, int line)
361{
362 struct rwlock *rw;
363
364 rw = rwlock2rw(c);
365
366 KASSERT(rw->rw_lock != RW_DESTROYED,
367 ("rw_wunlock() of destroyed rwlock @ %s:%d", file, line));
368 __rw_assert(c, RA_WLOCKED, file, line);
369 WITNESS_UNLOCK(&rw->lock_object, LOP_EXCLUSIVE, file, line);
370 LOCK_LOG_LOCK("WUNLOCK", &rw->lock_object, 0, rw->rw_recurse, file,
371 line);
372
373#ifdef LOCK_PROFILING
374 _rw_wunlock_hard(rw, (uintptr_t)curthread, file, line);
375#else
376 __rw_wunlock(rw, curthread, file, line);
377#endif
378
379 TD_LOCKS_DEC(curthread);
380}
381
382/*
383 * Determines whether a new reader can acquire a lock. Succeeds if the

Callers

nothing calls this directly

Calls 1

__rw_assertFunction · 0.85

Tested by

no test coverage detected