| 988 | } |
| 989 | |
| 990 | void |
| 991 | thread_lock_set(struct thread *td, struct mtx *new) |
| 992 | { |
| 993 | struct mtx *lock; |
| 994 | |
| 995 | mtx_assert(new, MA_OWNED); |
| 996 | lock = td->td_lock; |
| 997 | mtx_assert(lock, MA_OWNED); |
| 998 | td->td_lock = new; |
| 999 | mtx_unlock_spin(lock); |
| 1000 | } |
| 1001 | |
| 1002 | /* |
| 1003 | * __mtx_unlock_sleep: the tougher part of releasing an MTX_DEF lock. |
no test coverage detected