From: arighi Date: Thu, 25 Mar 2010 16:14:34 +0000 (+0000) Subject: signal_test: use kernel heap memory pool for the processes' stack if CONFIG_KERN_HEAP... X-Git-Tag: 2.5.0~632 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d48db3e3ccd1fab65a5661dc90fdcaeeba478dc0;p=bertos.git signal_test: use kernel heap memory pool for the processes' stack if CONFIG_KERN_HEAP is enabled. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3271 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/signal_test.c b/bertos/kern/signal_test.c index 8169f496..3b5ff1cb 100644 --- a/bertos/kern/signal_test.c +++ b/bertos/kern/signal_test.c @@ -93,9 +93,26 @@ static void proc_signalTest##index(void) \ count++; \ } while(0) \ -#define PROC_TEST_SLAVE_STACK(index) PROC_DEFINE_STACK(proc_signal_test##index##_stack, KERN_MINSTACKSIZE); +#if CONFIG_KERN_HEAP + +#define PROC_TEST_SLAVE_INIT(index, master_process) proc_new(proc_signalTest##index, master_process, KERN_MINSTACKSIZE * 2, NULL) + +#else + +#define PROC_TEST_SLAVE_STACK(index) PROC_DEFINE_STACK(proc_signal_test##index##_stack, KERN_MINSTACKSIZE * 2); #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) +PROC_TEST_SLAVE_STACK(0) +PROC_TEST_SLAVE_STACK(1) +PROC_TEST_SLAVE_STACK(2) +PROC_TEST_SLAVE_STACK(3) +PROC_TEST_SLAVE_STACK(4) +PROC_TEST_SLAVE_STACK(5) +PROC_TEST_SLAVE_STACK(6) +PROC_TEST_SLAVE_STACK(7) + +#endif + // Generate the code for signal test. PROC_TEST_SLAVE(0, SIG_USER0) PROC_TEST_SLAVE(1, SIG_USER1) @@ -106,15 +123,6 @@ PROC_TEST_SLAVE(5, SIG_SYSTEM5) PROC_TEST_SLAVE(6, SIG_SYSTEM6) PROC_TEST_SLAVE(7, SIG_SINGLE) -PROC_TEST_SLAVE_STACK(0) -PROC_TEST_SLAVE_STACK(1) -PROC_TEST_SLAVE_STACK(2) -PROC_TEST_SLAVE_STACK(3) -PROC_TEST_SLAVE_STACK(4) -PROC_TEST_SLAVE_STACK(5) -PROC_TEST_SLAVE_STACK(6) -PROC_TEST_SLAVE_STACK(7) - /** * Run signal test */