aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-28 11:54:36 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-28 11:54:36 +0000
commitc4299aa2dac83bfe3cee1bf65bfa4ee9f84233bd (patch)
treeb2a0fd90af82b60376b7f0389f362566b22ae124 /os/kernel
parent8b55cb9767ce881b7a22c5af34605ed3a261582d (diff)
downloadChibiOS-c4299aa2dac83bfe3cee1bf65bfa4ee9f84233bd.tar.gz
ChibiOS-c4299aa2dac83bfe3cee1bf65bfa4ee9f84233bd.tar.bz2
ChibiOS-c4299aa2dac83bfe3cee1bf65bfa4ee9f84233bd.zip
Fixed bug 2846162.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1110 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel')
-rw-r--r--os/kernel/src/chschd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index 3ba8b29e9..846833286 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -138,18 +138,19 @@ static void wakeup(void *p) {
* @retval RDY_TIMEOUT if a timeout occurs.
*/
msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t time) {
+ Thread *tp = currp;
if (TIME_INFINITE != time) {
VirtualTimer vt;
- chVTSetI(&vt, time, wakeup, currp);
+ chVTSetI(&vt, time, wakeup, tp);
chSchGoSleepS(newstate);
if (chVTIsArmedI(&vt))
chVTResetI(&vt);
}
else
chSchGoSleepS(newstate);
- return currp->p_rdymsg;
+ return tp->p_rdymsg;
}
/**