From 7a3da58ae2c6defd58e77bb4a5d3ba7034c642cc Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 12 Feb 2014 13:14:11 +0000 Subject: 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 --- test/rt/testmtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test') 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(); -- cgit v1.2.3