| 199 | } |
| 200 | |
| 201 | static void idle_thread_init(void) |
| 202 | { |
| 203 | struct thread *t; |
| 204 | |
| 205 | t = get_free_thread(); |
| 206 | |
| 207 | if (t == NULL) |
| 208 | die("No threads available for idle thread!\n"); |
| 209 | |
| 210 | /* Queue idle thread to run once all other threads have yielded. */ |
| 211 | prepare_thread(t, NULL, idle_thread, NULL, call_wrapper, NULL); |
| 212 | push_runnable(t); |
| 213 | } |
| 214 | |
| 215 | /* Don't inline this function so the timeout_callback won't have its storage |
| 216 | * space on the stack cleaned up before the call to schedule(). */ |
no test coverage detected