aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chmtx.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-12 11:10:19 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-12 11:10:19 +0000
commit43752ee8d132fc57028a9ff15156c5bfcd81c013 (patch)
treeeb4a8eafaaac4084e1c0c307850a8ce17939e58f /os/kernel/src/chmtx.c
parente0309ba9738efc707f8c43de43e04d2c62a32e8c (diff)
downloadChibiOS-43752ee8d132fc57028a9ff15156c5bfcd81c013.tar.gz
ChibiOS-43752ee8d132fc57028a9ff15156c5bfcd81c013.tar.bz2
ChibiOS-43752ee8d132fc57028a9ff15156c5bfcd81c013.zip
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
Diffstat (limited to 'os/kernel/src/chmtx.c')
-rw-r--r--os/kernel/src/chmtx.c3
1 files changed, 3 insertions, 0 deletions
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");