Use same main for both sam7 proj.
[bertos.git] / bertos / kern / signal_test.c
index ca63002b15c6c1ca4780a970a786f4c9bda6cfe2..ea8c76e26fde6f9768810ad48e6e627ef50de091 100644 (file)
  * \version $Id$
  *
  * \author Daniele Basile <asterix@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_signal.h $cfgdir/
+ * $test$: echo  "#undef CONFIG_KERN_SIGNALS" >> $cfgdir/cfg_signal.h
+ * $test$: echo "#define CONFIG_KERN_SIGNALS 1" >> $cfgdir/cfg_signal.h
  */
 
-#include <cfg/cfg_timer.h>
+#include "cfg/cfg_timer.h"
 #include <cfg/debug.h>
 #include <cfg/test.h>
 
@@ -68,7 +75,8 @@ sigmask_t sig_to_slave;
 /*
  * These macros generate the code needed to create the test process functions.
  */
-#define PROC_TEST_SLAVE(index, signal) static void proc_test##index(void) \
+#define PROC_TEST_SLAVE(index, signal) \
+static void NORETURN proc_signalTest##index(void) \
 { \
        for(;;) \
        { \
@@ -88,8 +96,8 @@ sigmask_t sig_to_slave;
                count++; \
        } while(0) \
 
-#define PROC_TEST_SLAVE_STACK(index) static cpu_stack_t proc_test##index##_stack[CONFIG_KERN_MINSTACKSIZE / sizeof(cpu_stack_t)];
-#define PROC_TEST_SLAVE_INIT(index, master_process) proc_new(proc_test##index, master_process, sizeof(proc_test##index##_stack), proc_test##index##_stack)
+#define PROC_TEST_SLAVE_STACK(index) static cpu_stack_t proc_signal_test##index##_stack[700 / sizeof(cpu_stack_t)];
+#define PROC_TEST_SLAVE_INIT(index, master_process) proc_new(proc_signalTest##index, master_process, sizeof(proc_signal_test##index##_stack), proc_signal_test##index##_stack)
 
 // Generate the code for signal test.
 PROC_TEST_SLAVE(0, SIG_USER0)