| 654 | } |
| 655 | |
| 656 | void |
| 657 | kern_yield(int prio) |
| 658 | { |
| 659 | struct thread *td; |
| 660 | |
| 661 | td = curthread; |
| 662 | DROP_GIANT(); |
| 663 | thread_lock(td); |
| 664 | if (prio == PRI_USER) |
| 665 | prio = td->td_user_pri; |
| 666 | if (prio >= 0) |
| 667 | sched_prio(td, prio); |
| 668 | mi_switch(SW_VOL | SWT_RELINQUISH); |
| 669 | PICKUP_GIANT(); |
| 670 | } |
| 671 | |
| 672 | /* |
| 673 | * General purpose yield system call. |
no test coverage detected