git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@98 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
b3361bd0e8
commit
ba20b5cd23
|
@ -101,6 +101,7 @@ extern void chSysUnlock(void);
|
||||||
(INT_REQUIRED_STACK) + \
|
(INT_REQUIRED_STACK) + \
|
||||||
(n))
|
(n))
|
||||||
|
|
||||||
|
/* It requires zero bytes, but better be safe.*/
|
||||||
#define IDLE_THREAD_STACK_SIZE 8
|
#define IDLE_THREAD_STACK_SIZE 8
|
||||||
void _IdleThread(void *p) __attribute__((noreturn));
|
void _IdleThread(void *p) __attribute__((noreturn));
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,9 @@ t_msg chMsgSend(Thread *tp, t_msg msg) {
|
||||||
chSysLock();
|
chSysLock();
|
||||||
|
|
||||||
fifo_insert(currp, &tp->p_msgqueue);
|
fifo_insert(currp, &tp->p_msgqueue);
|
||||||
|
currp->p_msg = msg;
|
||||||
if (tp->p_state == PRWTMSG)
|
if (tp->p_state == PRWTMSG)
|
||||||
chSchReadyI(tp);
|
chSchReadyI(tp);
|
||||||
currp->p_msg = msg;
|
|
||||||
chSchGoSleepS(PRSNDMSG);
|
chSchGoSleepS(PRSNDMSG);
|
||||||
msg = currp->p_rdymsg;
|
msg = currp->p_rdymsg;
|
||||||
|
|
||||||
|
@ -184,7 +184,10 @@ void chMsgRelease(t_msg msg) {
|
||||||
|
|
||||||
chSysLock();
|
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);
|
chSchWakeupS(fifo_remove(&currp->p_msgqueue), msg);
|
||||||
|
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
|
|
Loading…
Reference in New Issue