X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fidle.c;h=810560a1a790f6d4a5ed96ff80f66b7354a57d8f;hb=5254bfa9aa0e9dd3bca2a54ecbba23d2bb999300;hp=ede234c34f4c296738e3da6ab1a8c8049b6853d6;hpb=368b5a0d273a9dc64e06d28e073b2577ba4c06fe;p=bertos.git diff --git a/bertos/kern/idle.c b/bertos/kern/idle.c index ede234c3..810560a1 100644 --- a/bertos/kern/idle.c +++ b/bertos/kern/idle.c @@ -31,16 +31,18 @@ * * \brief Idle loop for preemptive scheduling * - * \version $Id: proc.c 1616 2008-08-10 19:41:26Z bernie $ + * \version $Id$ * \author Bernie Innocenti */ +#include "idle.h" #include "proc.h" #include -static cpustack_t idle_stack[CONFIG_PROC_DEFSTACKSIZE / sizeof(cpustack_t)]; +// below there's a TRACE so we need a big stack +PROC_DEFINE_STACK(idle_stack, KERN_MINSTACKSIZE * 2); /** * The idle process @@ -66,5 +68,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); }