Rev 2005 | Rev 2039 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2005 | Rev 2019 | ||
|---|---|---|---|
| Line 68... | Line 68... | ||
| 68 | #endif /* CONFIG_SMP */ |
68 | #endif /* CONFIG_SMP */ |
| 69 | 69 | ||
| 70 | #include <synch/waitq.h> |
70 | #include <synch/waitq.h> |
| 71 | #include <synch/spinlock.h> |
71 | #include <synch/spinlock.h> |
| 72 | 72 | ||
| 73 | #ifdef CONFIG_TEST |
- | |
| 74 | #include <test.h> |
- | |
| 75 | #endif /* CONFIG_TEST */ |
- | |
| 76 | - | ||
| 77 | /** Kernel initialization thread. |
73 | /** Kernel initialization thread. |
| 78 | * |
74 | * |
| 79 | * kinit takes care of higher level kernel |
75 | * kinit takes care of higher level kernel |
| 80 | * initialization (i.e. thread creation, |
76 | * initialization (i.e. thread creation, |
| 81 | * userspace initialization etc.). |
77 | * userspace initialization etc.). |
| Line 152... | Line 148... | ||
| 152 | else |
148 | else |
| 153 | panic("thread_create/kconsole\n"); |
149 | panic("thread_create/kconsole\n"); |
| 154 | 150 | ||
| 155 | interrupts_enable(); |
151 | interrupts_enable(); |
| 156 | 152 | ||
| 157 | #ifdef CONFIG_TEST |
- | |
| 158 | test(); |
- | |
| 159 | printf("\nTest finished, please reboot.\n"); |
- | |
| 160 | #else /* CONFIG_TEST */ |
- | |
| 161 | - | ||
| 162 | count_t i; |
153 | count_t i; |
| 163 | for (i = 0; i < init.cnt; i++) { |
154 | for (i = 0; i < init.cnt; i++) { |
| 164 | /* |
155 | /* |
| 165 | * Run user tasks, load RAM disk images. |
156 | * Run user tasks, load RAM disk images. |
| 166 | */ |
157 | */ |
| Line 192... | Line 183... | ||
| 192 | while (1) { |
183 | while (1) { |
| 193 | thread_sleep(1); |
184 | thread_sleep(1); |
| 194 | printf("kinit... "); |
185 | printf("kinit... "); |
| 195 | } |
186 | } |
| 196 | } |
187 | } |
| 197 | #endif /* CONFIG_TEST */ |
- | |
| 198 | - | ||
| 199 | } |
188 | } |
| 200 | 189 | ||
| 201 | /** @} |
190 | /** @} |
| 202 | */ |
191 | */ |