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

Function _sx_xunlock

freebsd/kern/kern_sx.c:402–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402void
403_sx_xunlock(struct sx *sx, const char *file, int line)
404{
405
406 KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
407 ("sx_xunlock() of destroyed sx @ %s:%d", file, line));
408 _sx_assert(sx, SA_XLOCKED, file, line);
409 WITNESS_UNLOCK(&sx->lock_object, LOP_EXCLUSIVE, file, line);
410 LOCK_LOG_LOCK("XUNLOCK", &sx->lock_object, 0, sx->sx_recurse, file,
411 line);
412#if LOCK_DEBUG > 0
413 _sx_xunlock_hard(sx, (uintptr_t)curthread, file, line);
414#else
415 __sx_xunlock(sx, curthread, file, line);
416#endif
417 TD_LOCKS_DEC(curthread);
418}
419
420/*
421 * Try to do a non-blocking upgrade from a shared lock to an exclusive lock.

Callers

nothing calls this directly

Calls 3

_sx_assertFunction · 0.85
_sx_xunlock_hardFunction · 0.85
__sx_xunlockFunction · 0.85

Tested by

no test coverage detected