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/chmboxes.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'os/kernel/src/chmboxes.c') diff --git a/os/kernel/src/chmboxes.c b/os/kernel/src/chmboxes.c index af6ee5ea8..bf5fdfe29 100644 --- a/os/kernel/src/chmboxes.c +++ b/os/kernel/src/chmboxes.c @@ -143,6 +143,7 @@ msg_t chMBPost(Mailbox *mbp, msg_t msg, systime_t time) { msg_t chMBPostS(Mailbox *mbp, msg_t msg, systime_t time) { msg_t rdymsg; + chDbgCheckClassS(); chDbgCheck(mbp != NULL, "chMBPostS"); rdymsg = chSemWaitTimeoutS(&mbp->mb_emptysem, time); @@ -172,6 +173,7 @@ msg_t chMBPostS(Mailbox *mbp, msg_t msg, systime_t time) { */ msg_t chMBPostI(Mailbox *mbp, msg_t msg) { + chDbgCheckClassI(); chDbgCheck(mbp != NULL, "chMBPostI"); if (chSemGetCounterI(&mbp->mb_emptysem) <= 0) @@ -234,6 +236,7 @@ msg_t chMBPostAhead(Mailbox *mbp, msg_t msg, systime_t time) { msg_t chMBPostAheadS(Mailbox *mbp, msg_t msg, systime_t time) { msg_t rdymsg; + chDbgCheckClassS(); chDbgCheck(mbp != NULL, "chMBPostAheadS"); rdymsg = chSemWaitTimeoutS(&mbp->mb_emptysem, time); @@ -263,6 +266,7 @@ msg_t chMBPostAheadS(Mailbox *mbp, msg_t msg, systime_t time) { */ msg_t chMBPostAheadI(Mailbox *mbp, msg_t msg) { + chDbgCheckClassI(); chDbgCheck(mbp != NULL, "chMBPostAheadI"); if (chSemGetCounterI(&mbp->mb_emptysem) <= 0) @@ -325,6 +329,7 @@ msg_t chMBFetch(Mailbox *mbp, msg_t *msgp, systime_t time) { msg_t chMBFetchS(Mailbox *mbp, msg_t *msgp, systime_t time) { msg_t rdymsg; + chDbgCheckClassS(); chDbgCheck((mbp != NULL) && (msgp != NULL), "chMBFetchS"); rdymsg = chSemWaitTimeoutS(&mbp->mb_fullsem, time); @@ -354,6 +359,7 @@ msg_t chMBFetchS(Mailbox *mbp, msg_t *msgp, systime_t time) { */ msg_t chMBFetchI(Mailbox *mbp, msg_t *msgp) { + chDbgCheckClassI(); chDbgCheck((mbp != NULL) && (msgp != NULL), "chMBFetchI"); if (chSemGetCounterI(&mbp->mb_fullsem) <= 0) -- cgit v1.2.3