From 43752ee8d132fc57028a9ff15156c5bfcd81c013 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 12 Aug 2011 11:10:19 +0000 Subject: Extended state check to all kernel I-class and s-class APIs, corrected some test cases where call protocol rules were not strictly observerd. No the whole test suite pass with the state checker enabled. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3223 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chmtx.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'os/kernel/src/chmtx.c') diff --git a/os/kernel/src/chmtx.c b/os/kernel/src/chmtx.c index 21b92e388..7d5bbe15e 100644 --- a/os/kernel/src/chmtx.c +++ b/os/kernel/src/chmtx.c @@ -114,6 +114,7 @@ void chMtxLock(Mutex *mp) { void chMtxLockS(Mutex *mp) { Thread *ctp = currp; + chDbgCheckClassS(); chDbgCheck(mp != NULL, "chMtxLockS"); /* Ia the mutex already locked? */ @@ -225,6 +226,7 @@ bool_t chMtxTryLock(Mutex *mp) { */ bool_t chMtxTryLockS(Mutex *mp) { + chDbgCheckClassS(); chDbgCheck(mp != NULL, "chMtxTryLockS"); if (mp->m_owner != NULL) @@ -309,6 +311,7 @@ Mutex *chMtxUnlockS(void) { Thread *ctp = currp; Mutex *ump, *mp; + chDbgCheckClassS(); chDbgAssert(ctp->p_mtxlist != NULL, "chMtxUnlockS(), #1", "owned mutexes list empty"); -- cgit v1.2.3