Rename myself
[bertos.git] / bertos / kern / proc.c
index a9e956243a2677267449f74241541f87f0e55862..1fdf9f353f97aadedf46cbf85000efa4cec2ba74 100644 (file)
@@ -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 <bernie@develer.com>
+ * Copyright 1999,2000,2001 Bernie Innocenti <bernie@codewiz.org>
  *
  * -->
  *
  *
  * \version $Id$
  *
- * \author Bernardo Innocenti <bernie@develer.com>
+ * \author Bernie Innocenti <bernie@codewiz.org>
  * \author Stefano Fedrigo <aleph@develer.com>
  */
 
 
 #include "proc_p.h"
 #include "proc.h"
-//#include "hw.h"
-#include <mware/event.h>
+
+#include "cfg/cfg_arch.h"  /* ARCH_EMUL */
+#include <cfg/debug.h>
+#include <cfg/module.h>
+#include <cfg/macros.h>       /* ABS() */
+
 #include <cpu/irq.h>
 #include <cpu/types.h>
 #include <cpu/attr.h>
-#include <cfg/debug.h>
-#include <cfg/module.h>
-#include <cfg/arch_config.h>  /* ARCH_EMUL */
-#include <cfg/macros.h>  /* ABS() */
 
-#include <string.h> /* memset() */
+#include <mware/event.h>
+
+#include <string.h>           /* 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