| 1362 | } |
| 1363 | |
| 1364 | void |
| 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 | |
| 1387 | void |
| 1388 | _sx_sunlock(struct sx *sx, const char *file, int line) |
nothing calls this directly
no test coverage detected