aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'os/kernel')
-rw-r--r--os/kernel/src/chschd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index 846833286..3ba8b29e9 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -138,19 +138,18 @@ 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, tp);
+ chVTSetI(&vt, time, wakeup, currp);
chSchGoSleepS(newstate);
if (chVTIsArmedI(&vt))
chVTResetI(&vt);
}
else
chSchGoSleepS(newstate);
- return tp->p_rdymsg;
+ return currp->p_rdymsg;
}
/**