aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/kernel/src/chschd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index c561cbd41..d5c8a0a5a 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -112,7 +112,6 @@ void chSchGoSleepS(tstate_t newstate) {
static void wakeup(void *p) {
Thread *tp = (Thread *)p;
- tp->p_u.rdymsg = RDY_TIMEOUT;
#if CH_USE_SEMAPHORES || (CH_USE_CONDVARS && CH_USE_CONDVARS_TIMEOUT)
switch (tp->p_state) {
#if CH_USE_SEMAPHORES
@@ -127,6 +126,8 @@ static void wakeup(void *p) {
dequeue(tp);
}
#endif
+ /* Done this way in order to allow a tail call.*/
+ tp->p_u.rdymsg = RDY_TIMEOUT;
chSchReadyI(tp);
}