* Release a bound thread. */
| 2734 | * Release a bound thread. |
| 2735 | */ |
| 2736 | void |
| 2737 | sched_unbind(struct thread *td) |
| 2738 | { |
| 2739 | struct td_sched *ts; |
| 2740 | |
| 2741 | THREAD_LOCK_ASSERT(td, MA_OWNED); |
| 2742 | KASSERT(td == curthread, ("sched_unbind: can only bind curthread")); |
| 2743 | ts = td_get_sched(td); |
| 2744 | if ((ts->ts_flags & TSF_BOUND) == 0) |
| 2745 | return; |
| 2746 | ts->ts_flags &= ~TSF_BOUND; |
| 2747 | sched_unpin(); |
| 2748 | } |
| 2749 | |
| 2750 | int |
| 2751 | sched_is_bound(struct thread *td) |
no test coverage detected