diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-02-16 18:22:49 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-02-16 18:22:49 +0000 |
commit | dd85cc143d987851bc7cc995cf6109136a16b930 (patch) | |
tree | 613d775200cd18e3d72d2ac14a16a96c7eca816e /test/testmtx.c | |
parent | cae6f99028cca8d347dc5c2290b7f40a38b91753 (diff) | |
download | ChibiOS-dd85cc143d987851bc7cc995cf6109136a16b930.tar.gz ChibiOS-dd85cc143d987851bc7cc995cf6109136a16b930.tar.bz2 ChibiOS-dd85cc143d987851bc7cc995cf6109136a16b930.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@773 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/testmtx.c')
-rw-r--r-- | test/testmtx.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/test/testmtx.c b/test/testmtx.c index 7675f3f7c..6bef57041 100644 --- a/test/testmtx.c +++ b/test/testmtx.c @@ -37,9 +37,6 @@ static void mtx1_setup(void) { chMtxInit(&m1);
}
-static void mtx1_teardown(void) {
-}
-
static msg_t thread1(void *p) {
chMtxLock(&m1);
@@ -66,7 +63,7 @@ static void mtx1_execute(void) { const struct testcase testmtx1 = {
mtx1_gettest,
mtx1_setup,
- mtx1_teardown,
+ NULL,
mtx1_execute
};
@@ -80,9 +77,6 @@ static void mtx2_setup(void) { chMtxInit(&m1);
}
-static void mtx2_teardown(void) {
-}
-
static msg_t thread2(void *p) {
chThdSleepMilliseconds(10);
@@ -127,7 +121,7 @@ static void mtx2_execute(void) { const struct testcase testmtx2 = {
mtx2_gettest,
mtx2_setup,
- mtx2_teardown,
+ NULL,
mtx2_execute
};
@@ -142,9 +136,6 @@ static void mtx3_setup(void) { chMtxInit(&m2);
}
-static void mtx3_teardown(void) {
-}
-
static msg_t thread5(void *p) {
chMtxLock(&m1);
@@ -218,8 +209,20 @@ static void mtx3_execute(void) { const struct testcase testmtx3 = {
mtx3_gettest,
mtx3_setup,
- mtx3_teardown,
+ NULL,
mtx3_execute
};
#endif /* CH_USE_MUTEXES */
+
+/*
+ * Test sequence for mutexes pattern.
+ */
+const struct testcase *patternmtx[] = {
+#if CH_USE_MUTEXES
+ &testmtx1,
+ &testmtx2,
+ &testmtx3,
+#endif
+ NULL
+};
|