| 400 | } |
| 401 | |
| 402 | void |
| 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. |
nothing calls this directly
no test coverage detected