Rev 1581 | Rev 1662 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1581 | Rev 1659 | ||
---|---|---|---|
Line 78... | Line 78... | ||
78 | * @param arg Not used. |
78 | * @param arg Not used. |
79 | */ |
79 | */ |
80 | void kinit(void *arg) |
80 | void kinit(void *arg) |
81 | { |
81 | { |
82 | thread_t *t; |
82 | thread_t *t; |
83 | task_t *utask; |
- | |
84 | 83 | ||
85 | /* |
84 | /* |
86 | * Detach kinit as nobody will call thread_join_timeout() on it. |
85 | * Detach kinit as nobody will call thread_join_timeout() on it. |
87 | */ |
86 | */ |
88 | thread_detach(THREAD); |
87 | thread_detach(THREAD); |
Line 150... | Line 149... | ||
150 | thread_ready(t); |
149 | thread_ready(t); |
151 | else |
150 | else |
152 | panic("thread_create/kconsole\n"); |
151 | panic("thread_create/kconsole\n"); |
153 | 152 | ||
154 | interrupts_enable(); |
153 | interrupts_enable(); |
155 | 154 | ||
- | 155 | #ifdef CONFIG_TEST |
|
- | 156 | test(); |
|
- | 157 | printf("\nTest finished, please reboot\n"); |
|
- | 158 | while(1) |
|
- | 159 | ; |
|
- | 160 | #else /* CONFIG_TEST */ |
|
- | 161 | ||
- | 162 | task_t *utask; |
|
156 | count_t i; |
163 | count_t i; |
157 | for (i = 0; i < init.cnt; i++) { |
164 | for (i = 0; i < init.cnt; i++) { |
158 | /* |
165 | /* |
159 | * Run user tasks. |
166 | * Run user tasks. |
160 | */ |
167 | */ |
Line 173... | Line 180... | ||
173 | ipc_phone_0 = &utask->answerbox; |
180 | ipc_phone_0 = &utask->answerbox; |
174 | } else |
181 | } else |
175 | printf("Init task %zd not started.\n", i); |
182 | printf("Init task %zd not started.\n", i); |
176 | } |
183 | } |
177 | 184 | ||
178 | #ifdef CONFIG_TEST |
- | |
179 | test(); |
- | |
180 | #endif /* CONFIG_TEST */ |
- | |
181 | 185 | ||
182 | if (!stdin) { |
186 | if (!stdin) { |
183 | while (1) { |
187 | while (1) { |
184 | thread_sleep(1); |
188 | thread_sleep(1); |
185 | printf("kinit... "); |
189 | printf("kinit... "); |
186 | } |
190 | } |
187 | } |
191 | } |
- | 192 | #endif /* CONFIG_TEST */ |
|
188 | 193 | ||
189 | } |
194 | } |