idle.c

Go to the documentation of this file.
00001 
00038 #include "idle.h"
00039 #include "proc.h"
00040 
00041 #include <cfg/module.h>
00042 
00043 
00044 static cpu_stack_t idle_stack[CONFIG_KERN_MINSTACKSIZE / sizeof(cpu_stack_t)];
00045 
00058 static NORETURN void idle(void)
00059 {
00060     for (;;)
00061     {
00062         TRACE;
00063         //monitor_report();
00064         proc_yield(); // FIXME: CPU_IDLE
00065     }
00066 }
00067 
00068 void idle_init(void)
00069 {
00070     struct Process *idle_proc = proc_new(idle, NULL, sizeof(idle_stack), idle_stack);
00071     proc_setPri(idle_proc, (int)~0);
00072 }