Release an exclusive lock. */
| 172 | |
| 173 | /* Release an exclusive lock. */ |
| 174 | static __inline void |
| 175 | __sx_xunlock(struct sx *sx, struct thread *td, const char *file, int line) |
| 176 | { |
| 177 | uintptr_t x = (uintptr_t)td; |
| 178 | |
| 179 | if (__predict_false(LOCKSTAT_PROFILE_ENABLED(sx__release) || |
| 180 | !atomic_fcmpset_rel_ptr(&sx->sx_lock, &x, SX_LOCK_UNLOCKED))) |
| 181 | _sx_xunlock_hard(sx, x); |
| 182 | } |
| 183 | #endif |
| 184 | |
| 185 | /* |
no test coverage detected