aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chschd.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/kernel/src/chschd.c')
-rw-r--r--os/kernel/src/chschd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index 150169481..87c2e2f8c 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -268,7 +268,9 @@ void chSchDoYieldS(void) {
/* Pick the first thread from the ready queue and makes it current.*/
(currp = fifo_remove(&rlist.r_queue))->p_state = PRCURR;
+#if CH_TIME_QUANTUM > 0
rlist.r_preempt = CH_TIME_QUANTUM;
+#endif
chDbgTrace(otp, currp);
chSysSwitchI(otp, currp);
}