* \author Daniele Basile <asterix@develer.com>
* \author Stefano Fedrigo <aleph@develer.com>
*
+ * $test$: cp bertos/cfg/cfg_proc.h $cfgdir/
+ * $test$: echo "#undef CONFIG_KERN" >> $cfgdir/cfg_proc.h
+ * $test$: echo "#define CONFIG_KERN 1" >> $cfgdir/cfg_proc.h
+ * $test$: cp bertos/cfg/cfg_sem.h $cfgdir/
+ * $test$: echo "#undef CONFIG_KERN_SEMAPHORES" >> $cfgdir/cfg_sem.h
+ * $test$: echo "#define CONFIG_KERN_SEMAPHORES 1" >> $cfgdir/cfg_sem.h
*/
#include <cfg/debug.h>
/*
* These macros generate the code needed to create the test process functions.
*/
-#define PROC_TEST(num) static void proc_test##num(void) \
+#define PROC_TEST(num) static void proc_semTest##num(void) \
{ \
unsigned int local_count = 0; \
\
} \
} \
-#define PROC_TEST_STACK(num) static cpu_stack_t proc_test##num##_stack[CONFIG_KERN_MINSTACKSIZE / sizeof(cpu_stack_t)];
-#define PROC_TEST_INIT(num) proc_new(proc_test##num, NULL, sizeof(proc_test##num##_stack), proc_test##num##_stack);
+#define PROC_TEST_STACK(num) PROC_DEFINE_STACK(proc_sem_test##num##_stack, KERN_MINSTACKSIZE * 2)
+#define PROC_TEST_INIT(num) proc_new(proc_semTest##num, NULL, sizeof(proc_sem_test##num##_stack), proc_sem_test##num##_stack);
// Define process
PROC_TEST(1)
sem_init(&sem);
kprintf("Done.\n");
- #if CONFIG_KERN_PREEMPT
- kprintf("Init Interrupt (preempt mode)..");
- irq_init();
- kprintf("Done.\n");
- #endif
-
kprintf("Init Timer..");
timer_init();
kprintf("Done.\n");