X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/43866e378188c25dd1e2208016ab3cbeb086ae6c..55e303ae13a4cf49d70f2294092726f2fffb9ef2:/osfmk/kern/thread_swap.c diff --git a/osfmk/kern/thread_swap.c b/osfmk/kern/thread_swap.c index 60655208a..8d1983316 100644 --- a/osfmk/kern/thread_swap.c +++ b/osfmk/kern/thread_swap.c @@ -83,9 +83,7 @@ swapin_init(void) { queue_init(&swapin_queue); simple_lock_init(&swapin_lock, ETAP_THREAD_SWAPPER); - kernel_thread_with_priority( - kernel_task, BASEPRI_PREEMPT - 2, - swapin_thread, TRUE, TRUE); + kernel_thread_with_priority(swapin_thread, MINPRI_KERNEL); } /* @@ -154,7 +152,7 @@ thread_doswapin( thread_lock(thread); thread->state &= ~(TH_STACK_HANDOFF | TH_STACK_ALLOC); if (thread->state & TH_RUN) - thread_setrun(thread, HEAD_Q); + thread_setrun(thread, SCHED_PREEMPT | SCHED_TAILQ); thread_unlock(thread); (void) splx(s); } @@ -195,10 +193,6 @@ swapin_thread_continue(void) void swapin_thread(void) { - thread_t self = current_thread(); - - stack_privilege(self); - swapin_thread_continue(); /*NOTREACHED*/ }