aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-04-12 16:40:44 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-04-12 16:40:44 +0000
commit90c431b280ac0188980b43a42b11191ca2800fa8 (patch)
tree196296364d6e3aec6538b00861015a3020d1462a /test
parent3dda222a772d8178ef04205c525c3c417e2ce7ad (diff)
downloadChibiOS-90c431b280ac0188980b43a42b11191ca2800fa8.tar.gz
ChibiOS-90c431b280ac0188980b43a42b11191ca2800fa8.tar.bz2
ChibiOS-90c431b280ac0188980b43a42b11191ca2800fa8.zip
100% code coverage for condvars.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@898 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r--test/testmtx.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/testmtx.c b/test/testmtx.c
index e62bb0c74..421ab9536 100644
--- a/test/testmtx.c
+++ b/test/testmtx.c
@@ -361,11 +361,14 @@ static void mtx6_execute(void) {
threads[2] = chThdCreateStatic(wa[2], WA_SIZE, prio+3, thread10, "C");
threads[3] = chThdCreateStatic(wa[3], WA_SIZE, prio+4, thread10, "B");
threads[4] = chThdCreateStatic(wa[4], WA_SIZE, prio+5, thread10, "A");
- chCondSignal(&c1);
- chCondSignal(&c1);
- chCondSignal(&c1);
- chCondSignal(&c1);
- chCondSignal(&c1);
+ chSysLock();
+ chCondSignalI(&c1);
+ chCondSignalI(&c1);
+ chCondSignalI(&c1);
+ chCondSignalI(&c1);
+ chCondSignalI(&c1);
+ chSchRescheduleS();
+ chSysUnlock();
test_wait_threads();
test_assert_sequence("ABCDE");
}
@@ -425,7 +428,7 @@ static msg_t thread11(void *p) {
chMtxLock(&m2);
chMtxLock(&m1);
- chCondWait(&c1);
+ chCondWaitTimeout(&c1, TIME_INFINITE);
test_emit_token(*(char *)p);
chMtxUnlock();
chMtxUnlock();