| 1521 | } |
| 1522 | |
| 1523 | void |
| 1524 | sched_bind(struct thread *td, int cpu) |
| 1525 | { |
| 1526 | struct td_sched *ts; |
| 1527 | |
| 1528 | THREAD_LOCK_ASSERT(td, MA_OWNED|MA_NOTRECURSED); |
| 1529 | KASSERT(td == curthread, ("sched_bind: can only bind curthread")); |
| 1530 | |
| 1531 | ts = td_get_sched(td); |
| 1532 | |
| 1533 | td->td_flags |= TDF_BOUND; |
| 1534 | #ifdef SMP |
| 1535 | ts->ts_runq = &runq_pcpu[cpu]; |
| 1536 | if (PCPU_GET(cpuid) == cpu) |
| 1537 | return; |
| 1538 | |
| 1539 | mi_switch(SW_VOL); |
| 1540 | thread_lock(td); |
| 1541 | #endif |
| 1542 | } |
| 1543 | |
| 1544 | void |
| 1545 | sched_unbind(struct thread* td) |
nothing calls this directly
no test coverage detected