X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fsignal_test.c;h=a0fc610b734d86cbdf3b4fb2d6c5af838e8b2ea4;hb=2b542ab21bf9f3df4e564e38e0c9db2c180449bd;hp=ddd26485e4092eeed0db271470a5cf7b71074643;hpb=ab5b34edd4fbb2eda01fa74a98796fb8c736bb80;p=bertos.git diff --git a/bertos/kern/signal_test.c b/bertos/kern/signal_test.c index ddd26485..a0fc610b 100644 --- a/bertos/kern/signal_test.c +++ b/bertos/kern/signal_test.c @@ -65,6 +65,9 @@ int count = 0; sigmask_t sig_to_master; 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) \ { \ for(;;) \ @@ -88,6 +91,7 @@ sigmask_t sig_to_slave; #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) +// Generate the code for signal test. PROC_TEST_SLAVE(0, SIG_USER0) PROC_TEST_SLAVE(1, SIG_USER1) PROC_TEST_SLAVE(2, SIG_USER2)