aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-16 10:57:16 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-16 10:57:16 +0000
commit2706d240bbea25b21dac8e0bc123de9cb2080a13 (patch)
tree2dadce33dd364f5d745f3f8c5274289ad237e63d /test
parent2f39b6e6b5bd6383c125fbf151ffd0d7e488a1de (diff)
downloadChibiOS-2706d240bbea25b21dac8e0bc123de9cb2080a13.tar.gz
ChibiOS-2706d240bbea25b21dac8e0bc123de9cb2080a13.tar.bz2
ChibiOS-2706d240bbea25b21dac8e0bc123de9cb2080a13.zip
Added static initializers to thread queues, semaphores, mutexes, condvars and event sources.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@975 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r--test/testevt.c8
-rw-r--r--test/testmtx.c10
-rw-r--r--test/testsem.c7
3 files changed, 21 insertions, 4 deletions
diff --git a/test/testevt.c b/test/testevt.c
index 31f8870b0..e053737a5 100644
--- a/test/testevt.c
+++ b/test/testevt.c
@@ -54,7 +54,13 @@
#define ALLOWED_DELAY MS2ST(5)
-static EventSource es1, es2;
+/*
+ * 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 EVENTSOURCE_DECL(es1);
+static EVENTSOURCE_DECL(es2);
/**
* @page test_events_001 Events registration and dispatch
diff --git a/test/testmtx.c b/test/testmtx.c
index 030b8ab87..6027aca7e 100644
--- a/test/testmtx.c
+++ b/test/testmtx.c
@@ -63,8 +63,14 @@
#define ALLOWED_DELAY 5
-static Mutex m1, m2;
-static CondVar c1;
+/*
+ * 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 MUTEX_DECL(m1);
+static MUTEX_DECL(m2);
+static CONDVAR_DECL(c1);
/**
* @page test_mtx_001 Priority enqueuing test
diff --git a/test/testsem.c b/test/testsem.c
index 7cb103789..46c6a7941 100644
--- a/test/testsem.c
+++ b/test/testsem.c
@@ -53,7 +53,12 @@
#define ALLOWED_DELAY MS2ST(5)
-static Semaphore sem1;
+/*
+ * 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 SEMAPHORE_DECL(sem1, 0);
/**
* @page test_sem_001 Enqueuing test