From: asterix Date: Fri, 24 Apr 2009 16:32:57 +0000 (+0000) Subject: Set correct stack size for kernel componet tests. X-Git-Tag: 2.1.0~18 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=c863f160d11502e2c452d567df1f8642ba2694c3;p=bertos.git Set correct stack size for kernel componet tests. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2664 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/msg_test.c b/bertos/kern/msg_test.c index 2cc34eee..22a79bdf 100644 --- a/bertos/kern/msg_test.c +++ b/bertos/kern/msg_test.c @@ -98,7 +98,7 @@ static void receiver_proc##num(void) \ { \ TestMsg *rec_msg; \ - for (;;) \ + for(;;) \ { \ sig_wait(sig); \ kprintf("Proc[%d]..get message\n", num); \ @@ -118,7 +118,7 @@ static void receiver_proc##num(void) \ msg_put(&test_port##num, &msg##num.msg); \ } while(0) -#define RECV_STACK(num) static cpu_stack_t receiver_stack##num[CONFIG_KERN_MINSTACKSIZE / sizeof(cpu_stack_t)] +#define RECV_STACK(num) static cpu_stack_t receiver_stack##num[800 / sizeof(cpu_stack_t)] #define RECV_INIT_PROC(num) proc_new(receiver_proc##num, NULL, sizeof(receiver_stack##num), receiver_stack##num) #define RECV_INIT_MSG(num, proc, sig) msg_initPort(&test_port##num, event_createSignal(proc, sig)) diff --git a/bertos/kern/proc_test.c b/bertos/kern/proc_test.c index 4bad9a24..b110946e 100644 --- a/bertos/kern/proc_test.c +++ b/bertos/kern/proc_test.c @@ -106,7 +106,7 @@ unsigned int t8_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_STACK(num) static cpu_stack_t proc_test##num##_stack[700 / 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 process diff --git a/bertos/kern/sem_test.c b/bertos/kern/sem_test.c index 3340548c..d042ab3b 100644 --- a/bertos/kern/sem_test.c +++ b/bertos/kern/sem_test.c @@ -90,7 +90,7 @@ unsigned int global_count = 0; /* * 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; \ \ @@ -109,8 +109,8 @@ unsigned int global_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) static cpu_stack_t proc_sem_test##num##_stack[1024 / sizeof(cpu_stack_t)]; +#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) diff --git a/bertos/kern/signal_test.c b/bertos/kern/signal_test.c index f2a4acfc..ea8c76e2 100644 --- a/bertos/kern/signal_test.c +++ b/bertos/kern/signal_test.c @@ -76,7 +76,7 @@ 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 NORETURN proc_test##index(void) \ +static void NORETURN proc_signalTest##index(void) \ { \ for(;;) \ { \ @@ -96,8 +96,8 @@ static void NORETURN proc_test##index(void) \ 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)