]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/thread_swap.c
xnu-517.12.7.tar.gz
[apple/xnu.git] / osfmk / kern / thread_swap.c
index 845b98dd4c25a8f41740d9df84587fc9c25fba6f..159abcbc429db6276497afb50b4a21a499c3d928 100644 (file)
@@ -80,9 +80,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);
 }
 
 /*
@@ -151,7 +149,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);
 }
@@ -192,10 +190,6 @@ swapin_thread_continue(void)
 void
 swapin_thread(void)
 {
-       thread_t        self = current_thread();
-
-       stack_privilege(self);
-
        swapin_thread_continue();
        /*NOTREACHED*/
 }