* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2001,2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999,2000,2001 Bernie Innocenti <bernie@codewiz.org>
- *
+ * Copyright 2001, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti <bernie@codewiz.org>
* -->
*
* \brief Simple realtime multitasking scheduler.
#include "proc.h"
#include "cfg/cfg_arch.h" /* ARCH_EMUL */
+#include "cfg/cfg_kern.h"
#include <cfg/module.h>
#include <cpu/irq.h>
#include <string.h> /* memset() */
+#if CONFIG_KERN_PREEMPT
+#include "preempt.h"
+#endif
+
/*
* The scheduer tracks ready processes by enqueuing them in the
* ready list.
monitor_add(CurrentProcess, "main");
#endif
+#if CONFIG_KERN_PREEMPTIVE
+ preempt_init();
+#endif
+
MOD_INIT(proc);
}
#if CONFIG_KERN_MONITOR
/* Fill-in the stack with a special marker to help debugging */
-#warning size incorrect
- memset(stack_base, CONFIG_KERN_STACKFILLCODE, stack_size / sizeof(cpustack_t));
+ memset(stack_base, CONFIG_KERN_STACKFILLCODE, stack_size);
#endif
/* Initialize the process control block */