* thread_lock_unblock() that does not assume td_lock is blocked. */
| 2031 | * thread_lock_unblock() that does not assume td_lock is blocked. |
| 2032 | */ |
| 2033 | static inline void |
| 2034 | thread_unblock_switch(struct thread *td, struct mtx *mtx) |
| 2035 | { |
| 2036 | atomic_store_rel_ptr((volatile uintptr_t *)&td->td_lock, |
| 2037 | (uintptr_t)mtx); |
| 2038 | } |
| 2039 | |
| 2040 | /* |
| 2041 | * Switch threads. This function has to handle threads coming in while |