aboutsummaryrefslogtreecommitdiffstats
path: root/test/rt/testmtx.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-12 13:14:11 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-12 13:14:11 +0000
commit7a3da58ae2c6defd58e77bb4a5d3ba7034c642cc (patch)
tree3a7ff3717a22b6e0ecc470a9cf3b429e56e746a8 /test/rt/testmtx.c
parent6c90d27a46cfeb8970eec2cf9d41729202d0e40b (diff)
downloadChibiOS-7a3da58ae2c6defd58e77bb4a5d3ba7034c642cc.tar.gz
ChibiOS-7a3da58ae2c6defd58e77bb4a5d3ba7034c642cc.tar.bz2
ChibiOS-7a3da58ae2c6defd58e77bb4a5d3ba7034c642cc.zip
Recursive mutexes, test code not done yet.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6707 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/rt/testmtx.c')
-rw-r--r--test/rt/testmtx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/rt/testmtx.c b/test/rt/testmtx.c
index f2a3c5f5a..ccf7b9497 100644
--- a/test/rt/testmtx.c
+++ b/test/rt/testmtx.c
@@ -432,10 +432,10 @@ static void mtx5_setup(void) {
}
static void mtx5_execute(void) {
- bool b;
- tprio_t prio;
- prio = chThdGetPriorityX();
+#if !CH_CFG_USE_MUTEXES_RECURSIVE
+ bool b;
+ tprio_t prio = chThdGetPriorityX();
b = chMtxTryLock(&m1);
test_assert(1, b, "already locked");
@@ -450,6 +450,7 @@ static void mtx5_execute(void) {
test_assert(3, queue_isempty(&m1.m_queue), "queue not empty");
test_assert(4, m1.m_owner == NULL, "still owned");
test_assert(5, chThdGetPriorityX() == prio, "wrong priority level");
+#endif /* !CH_CFG_USE_MUTEXES_RECURSIVE */
chMtxLock(&m1);
chMtxUnlockAll();