Rev 609 | Rev 625 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 609 | Rev 615 | ||
---|---|---|---|
Line 82... | Line 82... | ||
82 | * Create the kmp thread and wait for its completion. |
82 | * Create the kmp thread and wait for its completion. |
83 | * cpu1 through cpuN-1 will come up consecutively and |
83 | * cpu1 through cpuN-1 will come up consecutively and |
84 | * not mess together with kcpulb threads. |
84 | * not mess together with kcpulb threads. |
85 | * Just a beautification. |
85 | * Just a beautification. |
86 | */ |
86 | */ |
87 | if (t = thread_create(kmp, NULL, TASK, 0)) { |
87 | if ((t = thread_create(kmp, NULL, TASK, 0))) { |
88 | spinlock_lock(&t->lock); |
88 | spinlock_lock(&t->lock); |
89 | t->flags |= X_WIRED; |
89 | t->flags |= X_WIRED; |
90 | t->cpu = &cpus[0]; |
90 | t->cpu = &cpus[0]; |
91 | spinlock_unlock(&t->lock); |
91 | spinlock_unlock(&t->lock); |
92 | thread_ready(t); |
92 | thread_ready(t); |
Line 110... | Line 110... | ||
110 | /* |
110 | /* |
111 | * For each CPU, create its load balancing thread. |
111 | * For each CPU, create its load balancing thread. |
112 | */ |
112 | */ |
113 | for (i = 0; i < config.cpu_count; i++) { |
113 | for (i = 0; i < config.cpu_count; i++) { |
114 | 114 | ||
115 | if (t = thread_create(kcpulb, NULL, TASK, 0)) { |
115 | if ((t = thread_create(kcpulb, NULL, TASK, 0))) { |
116 | spinlock_lock(&t->lock); |
116 | spinlock_lock(&t->lock); |
117 | t->flags |= X_WIRED; |
117 | t->flags |= X_WIRED; |
118 | t->cpu = &cpus[i]; |
118 | t->cpu = &cpus[i]; |
119 | spinlock_unlock(&t->lock); |
119 | spinlock_unlock(&t->lock); |
120 | thread_ready(t); |
120 | thread_ready(t); |
Line 131... | Line 131... | ||
131 | arch_post_smp_init(); |
131 | arch_post_smp_init(); |
132 | 132 | ||
133 | /* |
133 | /* |
134 | * Create kernel console. |
134 | * Create kernel console. |
135 | */ |
135 | */ |
136 | if (t = thread_create(kconsole, "kconsole", TASK, 0)) |
136 | if ((t = thread_create(kconsole, "kconsole", TASK, 0))) |
137 | thread_ready(t); |
137 | thread_ready(t); |
138 | else panic("thread_create/kconsole\n"); |
138 | else panic("thread_create/kconsole\n"); |
139 | 139 | ||
140 | interrupts_enable(); |
140 | interrupts_enable(); |
141 | 141 |