X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/d7e50217d7adf6e52786a38bcaa4cd698cb9a79e..43866e378188c25dd1e2208016ab3cbeb086ae6c:/osfmk/kern/machine.c?ds=sidebyside diff --git a/osfmk/kern/machine.c b/osfmk/kern/machine.c index bb76bcf96..20f13346e 100644 --- a/osfmk/kern/machine.c +++ b/osfmk/kern/machine.c @@ -460,18 +460,17 @@ void processor_doshutdown( processor_t processor) { - register thread_t old_thread = current_thread(); - register int cpu = processor->slot_num; + register int cpu = processor->slot_num; timer_call_cancel(&processor->quantum_timer); + thread_dispatch(current_thread()); timer_switch(&kernel_timer[cpu]); - thread_machine_set_current(processor->idle_thread); - thread_dispatch(old_thread); /* * OK, now exit this cpu. */ PMAP_DEACTIVATE_KERNEL(cpu); + thread_machine_set_current(processor->idle_thread); cpu_down(cpu); cpu_sleep(); panic("zombie processor");