Rev 1042 | Rev 1174 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1042 | Rev 1062 | ||
---|---|---|---|
Line 78... | Line 78... | ||
78 | * Create the kmp thread and wait for its completion. |
78 | * Create the kmp thread and wait for its completion. |
79 | * cpu1 through cpuN-1 will come up consecutively and |
79 | * cpu1 through cpuN-1 will come up consecutively and |
80 | * not mess together with kcpulb threads. |
80 | * not mess together with kcpulb threads. |
81 | * Just a beautification. |
81 | * Just a beautification. |
82 | */ |
82 | */ |
83 | if ((t = thread_create(kmp, NULL, TASK, 0))) { |
83 | if ((t = thread_create(kmp, NULL, TASK, 0, "kmp"))) { |
84 | spinlock_lock(&t->lock); |
84 | spinlock_lock(&t->lock); |
85 | t->flags |= X_WIRED; |
85 | t->flags |= X_WIRED; |
86 | t->cpu = &cpus[0]; |
86 | t->cpu = &cpus[0]; |
87 | spinlock_unlock(&t->lock); |
87 | spinlock_unlock(&t->lock); |
88 | thread_ready(t); |
88 | thread_ready(t); |
Line 103... | Line 103... | ||
103 | /* |
103 | /* |
104 | * For each CPU, create its load balancing thread. |
104 | * For each CPU, create its load balancing thread. |
105 | */ |
105 | */ |
106 | for (i = 0; i < config.cpu_count; i++) { |
106 | for (i = 0; i < config.cpu_count; i++) { |
107 | 107 | ||
108 | if ((t = thread_create(kcpulb, NULL, TASK, 0))) { |
108 | if ((t = thread_create(kcpulb, NULL, TASK, 0, "kcpulb"))) { |
109 | spinlock_lock(&t->lock); |
109 | spinlock_lock(&t->lock); |
110 | t->flags |= X_WIRED; |
110 | t->flags |= X_WIRED; |
111 | t->cpu = &cpus[i]; |
111 | t->cpu = &cpus[i]; |
112 | spinlock_unlock(&t->lock); |
112 | spinlock_unlock(&t->lock); |
113 | thread_ready(t); |
113 | thread_ready(t); |
Line 124... | Line 124... | ||
124 | arch_post_smp_init(); |
124 | arch_post_smp_init(); |
125 | 125 | ||
126 | /* |
126 | /* |
127 | * Create kernel console. |
127 | * Create kernel console. |
128 | */ |
128 | */ |
129 | if ((t = thread_create(kconsole, "kconsole", TASK, 0))) |
129 | if ((t = thread_create(kconsole, "kconsole", TASK, 0, "kconsole"))) |
130 | thread_ready(t); |
130 | thread_ready(t); |
131 | else |
131 | else |
132 | panic("thread_create/kconsole\n"); |
132 | panic("thread_create/kconsole\n"); |
133 | 133 | ||
134 | interrupts_enable(); |
134 | interrupts_enable(); |
Line 140... | Line 140... | ||
140 | */ |
140 | */ |
141 | 141 | ||
142 | if (init.tasks[i].addr % FRAME_SIZE) |
142 | if (init.tasks[i].addr % FRAME_SIZE) |
143 | panic("init[%d].addr is not frame aligned", i); |
143 | panic("init[%d].addr is not frame aligned", i); |
144 | 144 | ||
145 | utask = task_run_program((void *) init.tasks[i].addr); |
145 | utask = task_run_program((void *) init.tasks[i].addr, "USPACE"); |
146 | if (utask) { |
146 | if (utask) { |
147 | if (!ipc_phone_0) |
147 | if (!ipc_phone_0) |
148 | ipc_phone_0 = &utask->answerbox; |
148 | ipc_phone_0 = &utask->answerbox; |
149 | } else |
149 | } else |
150 | printf("Init task %d not started.\n", i); |
150 | printf("Init task %d not started.\n", i); |