From 4d916c9d6c0d4048ec22094f251959177e2e4ba1 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 24 Feb 2010 09:41:05 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1672 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- readme.txt | 2 ++ test/test.c | 3 ++- test/test.h | 16 +++++++++------- test/testmbox.c | 4 ++-- test/testqueues.c | 4 ++-- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/readme.txt b/readme.txt index d3a7a31b6..44cb6e0dd 100644 --- a/readme.txt +++ b/readme.txt @@ -72,6 +72,8 @@ shell command. - NEW: Added BOARD_NAME macro to the various board.h files. - NEW: Added a MemoryStream class under ./os/various. +- CHANGE: Removed an instance of a structure without name from test.h for + increased portability of the test suite. *** 1.5.1 *** - FIX: Fixed insufficient stack space for the idle thread in the ARMCM3 port diff --git a/test/test.c b/test/test.c index cb23de241..013a0b21f 100644 --- a/test/test.c +++ b/test/test.c @@ -70,7 +70,8 @@ Thread *threads[MAX_THREADS]; /* * Pointers to the working areas. */ -void * const wa[5] = {test.waT0, test.waT1, test.waT2, test.waT3, test.waT4}; +void * const wa[5] = {test.wa.T0, test.wa.T1, test.wa.T2, + test.wa.T3, test.wa.T4}; /* * Console output. diff --git a/test/test.h b/test/test.h index a2da7edcb..983a7b093 100644 --- a/test/test.h +++ b/test/test.h @@ -31,7 +31,9 @@ #define MAX_THREADS 5 #define MAX_TOKENS 16 -#if defined(CH_ARCHITECTURE_AVR) || defined(CH_ARCHITECTURE_MSP430) +#if defined(CH_ARCHITECTURE_AVR) || \ + defined(CH_ARCHITECTURE_MSP430) || \ + defined(CH_ARCHITECTURE_STM8) #define THREADS_STACK_SIZE 48 #elif defined(CH_ARCHITECTURE_SIMIA32) #define THREADS_STACK_SIZE 512 @@ -50,12 +52,12 @@ struct testcase { #ifndef __DOXYGEN__ union test_buffers { struct { - WORKING_AREA(waT0, THREADS_STACK_SIZE); - WORKING_AREA(waT1, THREADS_STACK_SIZE); - WORKING_AREA(waT2, THREADS_STACK_SIZE); - WORKING_AREA(waT3, THREADS_STACK_SIZE); - WORKING_AREA(waT4, THREADS_STACK_SIZE); - }; + WORKING_AREA(T0, THREADS_STACK_SIZE); + WORKING_AREA(T1, THREADS_STACK_SIZE); + WORKING_AREA(T2, THREADS_STACK_SIZE); + WORKING_AREA(T3, THREADS_STACK_SIZE); + WORKING_AREA(T4, THREADS_STACK_SIZE); + } wa; uint8_t buffer[WA_SIZE * 5]; }; #endif diff --git a/test/testmbox.c b/test/testmbox.c index c6eb1e37c..707b112ef 100644 --- a/test/testmbox.c +++ b/test/testmbox.c @@ -58,7 +58,7 @@ * variables are explicitly initialized in each test case. It is done in order * to test the macros. */ -static MAILBOX_DECL(mb1, test.waT0, MB_SIZE); +static MAILBOX_DECL(mb1, test.wa.T0, MB_SIZE); /** * @page test_mbox_001 Queuing and timeouts @@ -76,7 +76,7 @@ static char *mbox1_gettest(void) { static void mbox1_setup(void) { - chMBInit(&mb1, (msg_t *)test.waT0, MB_SIZE); + chMBInit(&mb1, (msg_t *)test.wa.T0, MB_SIZE); } static void mbox1_execute(void) { diff --git a/test/testqueues.c b/test/testqueues.c index 42bcb9972..0f2ae7a81 100644 --- a/test/testqueues.c +++ b/test/testqueues.c @@ -62,8 +62,8 @@ static void notify(void) {} * variables are explicitly initialized in each test case. It is done in order * to test the macros. */ -static INPUTQUEUE_DECL(iq, test.waT0, TEST_QUEUES_SIZE, notify); -static OUTPUTQUEUE_DECL(oq, test.waT1, TEST_QUEUES_SIZE, notify); +static INPUTQUEUE_DECL(iq, test.wa.T0, TEST_QUEUES_SIZE, notify); +static OUTPUTQUEUE_DECL(oq, test.wa.T1, TEST_QUEUES_SIZE, notify); /** * @page test_queues_001 Input Queues functionality and APIs