This test was testing for an undocumented and somewhat hyperspecific behavior: when a process reaches a reschedule point and yields to a higher priority thread, and there is another equal priority thread active, which thread gets to run when the higher priority thread finishes its work? The original scheduler (because it leaves the older thread in place in the list) implements the preemption like an interrupt and returns to the original thread, despite the fact that this then resets is time slice quantum unfairly. In SMP mode, where the current threads cannot live in the active list, the thread gets added back to the end of the queue and the other thread runs. In effect, in UP mode "yield" and "reschedule" mean very slightly different things where in SMP they act the same. We don't document either behavior, as it happens. Relax the test constraints by adding a single deliberate k_yield() to unify behavior. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
|---|---|---|
| .. | ||
| deadline | ||
| preempt | ||
| schedule_api | ||