Correct conditional test.
[bertos.git] / bertos / kern / idle.c
index ede234c34f4c296738e3da6ab1a8c8049b6853d6..e5713e83520e728c024658331c30809cc51b3b6a 100644 (file)
  *
  * \brief Idle loop for preemptive scheduling
  *
- * \version $Id: proc.c 1616 2008-08-10 19:41:26Z bernie $
+ * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  */
 
+#include "idle.h"
 #include "proc.h"
 
 #include <cfg/module.h>
 
 
-static cpustack_t idle_stack[CONFIG_PROC_DEFSTACKSIZE / sizeof(cpustack_t)];
+static cpu_stack_t idle_stack[CONFIG_KERN_MINSTACKSIZE / sizeof(cpu_stack_t)];
 
 /**
  * The idle process
@@ -66,5 +67,6 @@ static NORETURN void idle(void)
 
 void idle_init(void)
 {
-       proc_new(idle, NULL, sizeof(idle_stack), idle_stack);
+       struct Process *idle_proc = proc_new(idle, NULL, sizeof(idle_stack), idle_stack);
+       proc_setPri(idle_proc, (int)~0);
 }