summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorNélio Laranjeiro2012-03-01 10:51:34 +0100
committerNélio Laranjeiro2012-03-29 16:57:42 +0200
commitbbb62983464686c93260b91b57ce1f97bef2de57 (patch)
tree0763d43f5ff5c32673057a1b9d9b9136d3276b90 /cesar
parentcb3a389d2a07bd7aaf0b81dd919aa74d75d6932d (diff)
cesar/lib/test: fix mbox thread test, refs #2996
Thread were corrupted because the stack size was too small.
Diffstat (limited to 'cesar')
-rw-r--r--cesar/lib/test/mbox/src/mbox.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cesar/lib/test/mbox/src/mbox.c b/cesar/lib/test/mbox/src/mbox.c
index 84fb090f1b..4f252538c2 100644
--- a/cesar/lib/test/mbox/src/mbox.c
+++ b/cesar/lib/test/mbox/src/mbox.c
@@ -21,11 +21,11 @@
#include <cyg/infra/diag.h>
#include "string.h"
-u8 thread1_stack [1024];
+u8 thread1_stack [CYGNUM_HAL_STACK_SIZE_TYPICAL];
cyg_thread thread1;
cyg_handle_t thread1_handle;
-u8 thread2_stack [1024];
+u8 thread2_stack [CYGNUM_HAL_STACK_SIZE_TYPICAL];
cyg_thread thread2;
cyg_handle_t thread2_handle;
@@ -106,12 +106,14 @@ cyg_user_start (void)
{
cyg_thread_create(9, thread1_entry_function,
0, "Thread1", thread1_stack,
- 1024, &thread1_handle,
+ CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &thread1_handle,
&thread1);
cyg_thread_create(9, thread2_entry_function,
0, "Thread2", thread2_stack,
- 1024, &thread2_handle,
+ CYGNUM_HAL_STACK_SIZE_TYPICAL,
+ &thread2_handle,
&thread2);
mbox_init (&mbox);