]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/thread.c
xnu-6153.101.6.tar.gz
[apple/xnu.git] / osfmk / kern / thread.c
index f554222b137269053ffc505e5dfddfa2d3cbae52..fde3ef327598d1b3c6fae7e07ebf3ff3e7ef3294 100644 (file)
@@ -246,7 +246,7 @@ void __attribute__((noinline)) SENDING_NOTIFICATION__TASK_HAS_TOO_MANY_THREADS(t
 
 os_refgrp_decl(static, thread_refgrp, "thread", NULL);
 
-void
+thread_t
 thread_bootstrap(void)
 {
        /*
@@ -356,7 +356,7 @@ thread_bootstrap(void)
 #endif /* CONFIG_DTRACE */
 
 #if KPERF
-       thread_template.kperf_flags = 0;
+       thread_template.kperf_ast = 0;
        thread_template.kperf_pet_gen = 0;
        thread_template.kperf_c_switch = 0;
        thread_template.kperf_pet_cnt = 0;
@@ -418,7 +418,13 @@ thread_bootstrap(void)
        /* fiddle with init thread to skip asserts in set_sched_pri */
        init_thread.sched_pri = MAXPRI_KERNEL;
 
-       machine_set_current_thread(&init_thread);
+       return &init_thread;
+}
+
+void
+thread_machine_init_template(void)
+{
+       machine_thread_template_init(&thread_template);
 }
 
 extern boolean_t allow_qos_policy_set;