kernel: fix yielding between tasks with same deadline
Previously two tasks with the same deadline and priority would always have `z_is_t1_higher_prio_than_t2` `true` in both directions. This is logically inconsistent, and results in `k_yield` not actually yielding between identical threads. Signed-off-by: James Harris <james.harris@intel.com>
This commit is contained in:
parent
ff5b040f78
commit
3330ab12d8
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ bool z_is_t1_higher_prio_than_t2(struct k_thread *thread_1,
|
|||
int32_t d1 = thread_1->base.prio_deadline;
|
||||
int32_t d2 = thread_2->base.prio_deadline;
|
||||
|
||||
return (d2 - d1) >= 0;
|
||||
return (d2 - d1) > 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue