diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-01-08 13:41:04 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-01-08 13:41:04 +0000 |
commit | ba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8 (patch) | |
tree | 8a1636ebb9308dbf17db0f30d8ecf5dc03587cb6 /src/chmsg.c | |
parent | 79194eae8e198e6a480dcb5d6e5c57b28af07f0b (diff) | |
download | ChibiOS-ba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8.tar.gz ChibiOS-ba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8.tar.bz2 ChibiOS-ba030d32c3e65ec5d4c6c6eaf7f55d7c61aae0b8.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@170 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chmsg.c')
-rw-r--r-- | src/chmsg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/chmsg.c b/src/chmsg.c index 20a59904e..ef8b111dc 100644 --- a/src/chmsg.c +++ b/src/chmsg.c @@ -45,6 +45,7 @@ t_msg chMsgSend(Thread *tp, t_msg msg) { fifo_insert(currp, &tp->p_msgqueue);
#endif
currp->p_msg = msg;
+ currp->p_wtthdp = tp;
if (tp->p_state == PRWTMSG)
chSchReadyI(tp, RDY_OK);
chSchGoSleepS(PRSNDMSG);
@@ -83,6 +84,7 @@ t_msg chMsgSendWithEvent(Thread *tp, t_msg msg, EventSource *esp) { fifo_insert(currp, &tp->p_msgqueue);
#endif
chEvtSendI(esp);
+ currp->p_wtthdp = tp;
currp->p_msg = msg;
chSchGoSleepS(PRSNDMSG);
msg = currp->p_rdymsg;
@@ -129,9 +131,10 @@ t_msg chMsgSendTimeout(Thread *tp, t_msg msg, t_time time) { #else
fifo_insert(currp, &tp->p_msgqueue);
#endif
+ currp->p_msg = msg;
+ currp->p_wtthdp = tp;
if (tp->p_state == PRWTMSG)
chSchReadyI(tp, RDY_OK);
- currp->p_msg = msg;
chSchGoSleepS(PRSNDMSG);
msg = currp->p_rdymsg;
if (chVTIsArmedI(&vt))
|