git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1535 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-01-20 21:08:28 +00:00
parent 85016e2a26
commit 8cdf2dba5b
2 changed files with 6 additions and 4 deletions

View File

@ -44,17 +44,18 @@
* @return The return message from @p chMsgRelease(). * @return The return message from @p chMsgRelease().
*/ */
msg_t chMsgSend(Thread *tp, msg_t msg) { msg_t chMsgSend(Thread *tp, msg_t msg) {
Thread *ctp = currp;
chDbgCheck(tp != NULL, "chMsgSend"); chDbgCheck(tp != NULL, "chMsgSend");
chSysLock(); chSysLock();
currp->p_msg = msg; ctp->p_msg = msg;
currp->p_u.wtobjp = &tp->p_msgqueue; ctp->p_u.wtobjp = &tp->p_msgqueue;
msg_insert(currp, &tp->p_msgqueue); msg_insert(ctp, &tp->p_msgqueue);
if (tp->p_state == THD_STATE_WTMSG) if (tp->p_state == THD_STATE_WTMSG)
chSchReadyI(tp); chSchReadyI(tp);
chSchGoSleepS(THD_STATE_SNDMSG); chSchGoSleepS(THD_STATE_SNDMSG);
msg = currp->p_u.rdymsg; msg = ctp->p_u.rdymsg;
chSysUnlock(); chSysUnlock();
return msg; return msg;
} }

View File

@ -60,6 +60,7 @@
do not support this non standard construct. do not support this non standard construct.
- CHANGE: Modified the thread-related constant macros to have a THD_ prefix. - CHANGE: Modified the thread-related constant macros to have a THD_ prefix.
- OPT: Optimizations to the priority inheritance code. - OPT: Optimizations to the priority inheritance code.
- OPT: Speed/size optimization to the synchronous messages subsystem.
*** 1.3.8 *** *** 1.3.8 ***
- FIX: Fixed dequeuing in lifo_remove() function (bug 2928142). - FIX: Fixed dequeuing in lifo_remove() function (bug 2928142).