X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fproc.c;h=1fdf9f353f97aadedf46cbf85000efa4cec2ba74;hb=4cc44c9888a0336b9d01121ec0b7ad95f4a76195;hp=a9e956243a2677267449f74241541f87f0e55862;hpb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;p=bertos.git diff --git a/bertos/kern/proc.c b/bertos/kern/proc.c index a9e95624..1fdf9f35 100644 --- a/bertos/kern/proc.c +++ b/bertos/kern/proc.c @@ -27,7 +27,7 @@ * the GNU General Public License. * * Copyright 2001,2004 Develer S.r.l. (http://www.develer.com/) - * Copyright 1999,2000,2001 Bernardo Innocenti + * Copyright 1999,2000,2001 Bernie Innocenti * * --> * @@ -36,24 +36,26 @@ * * \version $Id$ * - * \author Bernardo Innocenti + * \author Bernie Innocenti * \author Stefano Fedrigo */ #include "proc_p.h" #include "proc.h" -//#include "hw.h" -#include + +#include "cfg/cfg_arch.h" /* ARCH_EMUL */ +#include +#include +#include /* ABS() */ + #include #include #include -#include -#include -#include /* ARCH_EMUL */ -#include /* ABS() */ -#include /* memset() */ +#include + +#include /* memset() */ /** * CPU dependent context switching routines. @@ -150,8 +152,8 @@ struct Process *proc_new_with_name(UNUSED(const char *, name), void (*entry)(voi #if (ARCH & ARCH_EMUL) /* Ignore stack provided by caller and use the large enough default instead. */ - stack_base = (cpustack_t *)LIST_HEAD(&StackFreeList); - REMOVE(LIST_HEAD(&StackFreeList)); + stack_base = (cpustack_t *)list_remHead(&StackFreeList); + stacksize = CONFIG_PROC_DEFSTACKSIZE; #elif CONFIG_KERN_HEAP /* Did the caller provide a stack for us? */ @@ -264,7 +266,7 @@ void proc_schedule(void) * are idle-spinning, we must allow interrupts, otherwise no * process will ever wake up. * - * During idle-spinning, can occur an interrupt, it may be able to + * During idle-spinning, an interrupt can occur and it may * modify \p ProcReadyList. To ensure that compiler reload this * variable every while cycle we call CPU_MEMORY_BARRIER. * The memory barrier ensure that all variables used in this context