- if (1 /*machine_slot[i].is_cpu*/) {
- processor_t processor = cpu_to_processor(i);
- thread_t thread;
- spl_t s;
-
- thread = kernel_thread_with_priority(kernel_task,
- MAXPRI_KERNBAND, idle_thread, FALSE);
- s = splsched();
- thread_lock(thread);
- thread_bind_locked(thread, processor);
- processor->idle_thread = thread;
- thread->state |= TH_IDLE;
- thread_go_locked(thread, THREAD_AWAKENED);
- thread_unlock(thread);
- splx(s);
- }
+ processor_t processor = cpu_to_processor(i);
+ thread_t thread;
+ spl_t s;
+
+ thread = kernel_thread_with_priority(
+ kernel_task, MAXPRI_KERNEL,
+ idle_thread, TRUE, FALSE);
+ s = splsched();
+ thread_lock(thread);
+ thread_bind_locked(thread, processor);
+ processor->idle_thread = thread;
+ thread->ref_count++;
+ thread->state |= TH_IDLE;
+ thread_go_locked(thread, THREAD_AWAKENED);
+ thread_unlock(thread);
+ splx(s);