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

Function _sx_sunlock_int

freebsd/kern/kern_sx.c:1364–1385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1362}
1363
1364void
1365_sx_sunlock_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF)
1366{
1367 struct thread *td;
1368 uintptr_t x;
1369
1370 KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
1371 ("sx_sunlock() of destroyed sx @ %s:%d", file, line));
1372 _sx_assert(sx, SA_SLOCKED, file, line);
1373 WITNESS_UNLOCK(&sx->lock_object, 0, file, line);
1374 LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line);
1375
1376 td = curthread;
1377 x = SX_READ_VALUE(sx);
1378 if (__predict_false(LOCKSTAT_PROFILE_ENABLED(sx__release) ||
1379 !_sx_sunlock_try(sx, td, &x)))
1380 _sx_sunlock_hard(sx, td, x LOCK_FILE_LINE_ARG);
1381 else
1382 lock_profile_release_lock(&sx->lock_object);
1383
1384 TD_LOCKS_DEC(curthread);
1385}
1386
1387void
1388_sx_sunlock(struct sx *sx, const char *file, int line)

Callers

nothing calls this directly

Calls 4

_sx_assertFunction · 0.85
_sx_sunlock_tryFunction · 0.85
_sx_sunlock_hardFunction · 0.85

Tested by

no test coverage detected