diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-11-19 13:44:24 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-11-19 13:44:24 +0000 |
commit | ba20b5cd23ae74c1f4f925b7b8d3a84dbd42fd9e (patch) | |
tree | faae635414453d25148f51d20454c636685eb86b | |
parent | b3361bd0e8ca074dbf7f312a87bbcdbf0019ebc7 (diff) | |
download | ChibiOS-ba20b5cd23ae74c1f4f925b7b8d3a84dbd42fd9e.tar.gz ChibiOS-ba20b5cd23ae74c1f4f925b7b8d3a84dbd42fd9e.tar.bz2 ChibiOS-ba20b5cd23ae74c1f4f925b7b8d3a84dbd42fd9e.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@98 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | demos/ARM7-LPC214x-GCC/chcore.h | 1 | ||||
-rw-r--r-- | src/chmsg.c | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/demos/ARM7-LPC214x-GCC/chcore.h b/demos/ARM7-LPC214x-GCC/chcore.h index 268cae39b..5217e30f6 100644 --- a/demos/ARM7-LPC214x-GCC/chcore.h +++ b/demos/ARM7-LPC214x-GCC/chcore.h @@ -101,6 +101,7 @@ extern void chSysUnlock(void); (INT_REQUIRED_STACK) + \
(n))
+/* It requires zero bytes, but better be safe.*/
#define IDLE_THREAD_STACK_SIZE 8
void _IdleThread(void *p) __attribute__((noreturn));
diff --git a/src/chmsg.c b/src/chmsg.c index 0f24b24aa..b70ebbcfe 100644 --- a/src/chmsg.c +++ b/src/chmsg.c @@ -37,9 +37,9 @@ t_msg chMsgSend(Thread *tp, t_msg msg) { chSysLock();
fifo_insert(currp, &tp->p_msgqueue);
+ currp->p_msg = msg;
if (tp->p_state == PRWTMSG)
chSchReadyI(tp);
- currp->p_msg = msg;
chSchGoSleepS(PRSNDMSG);
msg = currp->p_rdymsg;
@@ -184,7 +184,10 @@ void chMsgRelease(t_msg msg) { chSysLock();
-// if (!chMsgIsPendingI(currp)
+#ifdef CH_USE_DEBUG
+ if (!chMsgIsPendingI(currp))
+ chDbgPanic("chmsg.c, chMsgRelease()\r\n");
+#endif
chSchWakeupS(fifo_remove(&currp->p_msgqueue), msg);
chSysUnlock();
|