| 357 | } |
| 358 | |
| 359 | void |
| 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 |
nothing calls this directly
no test coverage detected