Rev 4339 | Rev 4342 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4339 | Rev 4341 | ||
---|---|---|---|
Line 70... | Line 70... | ||
70 | #endif /* CONFIG_SMP */ |
70 | #endif /* CONFIG_SMP */ |
71 | 71 | ||
72 | #include <synch/waitq.h> |
72 | #include <synch/waitq.h> |
73 | #include <synch/spinlock.h> |
73 | #include <synch/spinlock.h> |
74 | 74 | ||
- | 75 | #define ALIVE_CHARS 4 |
|
- | 76 | ||
- | 77 | static char alive[ALIVE_CHARS] = "-\\|/"; |
|
- | 78 | ||
75 | /** Kernel initialization thread. |
79 | /** Kernel initialization thread. |
76 | * |
80 | * |
77 | * kinit takes care of higher level kernel |
81 | * kinit takes care of higher level kernel |
78 | * initialization (i.e. thread creation, |
82 | * initialization (i.e. thread creation, |
79 | * userspace initialization etc.). |
83 | * userspace initialization etc.). |
Line 202... | Line 206... | ||
202 | } |
206 | } |
203 | } |
207 | } |
204 | 208 | ||
205 | #ifdef CONFIG_KCONSOLE |
209 | #ifdef CONFIG_KCONSOLE |
206 | if (!stdin) { |
210 | if (!stdin) { |
- | 211 | thread_sleep(10); |
|
207 | printf("kinit: No stdin\nKernel alive: "); |
212 | printf("kinit: No stdin\nKernel alive: ."); |
208 | 213 | ||
209 | uint64_t i = 0; |
214 | unsigned int i = 0; |
210 | while (1) { |
215 | while (true) { |
211 | printf(PRIu64 " ", i); |
216 | printf("\b%c", alive[i % ALIVE_CHARS]); |
212 | thread_sleep(1); |
217 | thread_sleep(1); |
213 | i++; |
218 | i++; |
214 | } |
219 | } |
215 | } |
220 | } |
216 | #endif /* CONFIG_KCONSOLE */ |
221 | #endif /* CONFIG_KCONSOLE */ |