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 // below there's a TRACE so we need a big stack
00045 PROC_DEFINE_STACK(idle_stack, KERN_MINSTACKSIZE * 2);
00046 
00059 static NORETURN void idle(void)
00060 {
00061     for (;;)
00062     {
00063         TRACE;
00064         //monitor_report();
00065         proc_yield(); // FIXME: CPU_IDLE
00066     }
00067 }
00068 
00069 void idle_init(void)
00070 {
00071     struct Process *idle_proc = proc_new(idle, NULL, sizeof(idle_stack), idle_stack);
00072     proc_setPri(idle_proc, (int)~0);
00073 }