aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-16 14:49:41 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-16 14:49:41 +0000
commit53f1b747726d85020beca994f6fe67a5e9af7b8e (patch)
tree72bbc0235de15168314bc3b5c803464f2c16f667 /test
parentb20088a8cb72e3f3e694e309671cd7f96fb552dc (diff)
downloadChibiOS-53f1b747726d85020beca994f6fe67a5e9af7b8e.tar.gz
ChibiOS-53f1b747726d85020beca994f6fe67a5e9af7b8e.tar.bz2
ChibiOS-53f1b747726d85020beca994f6fe67a5e9af7b8e.zip
Added static initializers for mailboxes and memory pools.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@978 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r--test/testmbox.c10
-rw-r--r--test/testpools.c2
-rw-r--r--test/testqueues.c4
3 files changed, 10 insertions, 6 deletions
diff --git a/test/testmbox.c b/test/testmbox.c
index 2403afce6..a485c3a4e 100644
--- a/test/testmbox.c
+++ b/test/testmbox.c
@@ -55,8 +55,12 @@
#define ALLOWED_DELAY MS2ST(5)
#define MB_SIZE 5
-static msg_t mb1_buf[MB_SIZE];
-static Mailbox mb1;
+/*
+ * Note, the static initializers are not really required because the
+ * variables are explicitly initialized in each test case. It is done in order
+ * to test the macros.
+ */
+static MAILBOX_DECL(mb1, waT0, MB_SIZE);
/**
* @page test_mbox_001 Queuing and timeouts
@@ -74,7 +78,7 @@ static char *mbox1_gettest(void) {
static void mbox1_setup(void) {
- chMBInit(&mb1, mb1_buf, MB_SIZE);
+ chMBInit(&mb1, (msg_t *)waT0, MB_SIZE);
}
static void mbox1_execute(void) {
diff --git a/test/testpools.c b/test/testpools.c
index 78f19a91c..ce6716444 100644
--- a/test/testpools.c
+++ b/test/testpools.c
@@ -49,7 +49,7 @@
#if CH_USE_MEMPOOLS
-static MemoryPool mp1;
+static MEMORYPOOL_DECL(mp1, THD_WA_SIZE(THREADS_STACK_SIZE));
/**
* @page test_pools_001 Allocation and enqueuing test
diff --git a/test/testqueues.c b/test/testqueues.c
index 36c90402b..fe79712eb 100644
--- a/test/testqueues.c
+++ b/test/testqueues.c
@@ -64,8 +64,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, (uint8_t *)waT0, TEST_QUEUES_SIZE, notify);
-static OUTPUTQUEUE_DECL(oq, (uint8_t *)waT0, TEST_QUEUES_SIZE, notify);
+static INPUTQUEUE_DECL(iq, waT0, TEST_QUEUES_SIZE, notify);
+static OUTPUTQUEUE_DECL(oq, waT0, TEST_QUEUES_SIZE, notify);
/**
* @page test_queues_001 Input Queues functionality and APIs