diff --git a/os/rt/src/chschd.c b/os/rt/src/chschd.c index 322491ce7..540b1c296 100644 --- a/os/rt/src/chschd.c +++ b/os/rt/src/chschd.c @@ -582,7 +582,7 @@ void chSchDoReschedule(void) { #if CH_CFG_TIME_QUANTUM > 0 /* If CH_CFG_TIME_QUANTUM is enabled then there are two different scenarios to handle on preemption: time quantum elapsed or not.*/ - if (currp->ticks == (tslices_t)0) { + if (otp->ticks == (tslices_t)0) { /* The thread consumed its time quantum so it is enqueued behind threads with same priority level, however, it acquires a new time quantum.*/ diff --git a/readme.txt b/readme.txt index 74d38a330..e1664bb3a 100644 --- a/readme.txt +++ b/readme.txt @@ -93,6 +93,8 @@ MEMS Accelerometers. - NEW: Safer messages mechanism for sandboxes (to be backported to 20.3.1). - NEW: Added latency measurement test application. +- FIX: Schedule anomaly when CH_CFG_TIME_QUANTUM is greater than zero + (bug #1105)(backported to 20.3.2)(backported to 19.1.5). - FIX: Fixed Virtual Timers corner case (bug #1104) (backported to 20.3.2)(backported to 19.1.5). - FIX: Fixed GCC6 problem breaks Cortex-M0 port (bug #985)