fix a tick list add bug
fix a tick list add bug: if a lower priority task has the same tick_expires with a higher priority task in the tick list, the lower should be added behind the higher one.
This commit is contained in:
@@ -18,6 +18,10 @@ __STATIC__ void tick_task_place(k_task_t *task, k_tick_t timeout)
|
||||
if (task->tick_expires < curr_expires) {
|
||||
break;
|
||||
}
|
||||
if (task->tick_expires == curr_expires &&
|
||||
task->prio < curr_task->prio) {
|
||||
break;
|
||||
}
|
||||
prev_expires = curr_expires;
|
||||
}
|
||||
task->tick_expires -= prev_expires;
|
||||
|
Reference in New Issue
Block a user