sched: process scheduler before wd_timer handler
wd_timer handler will change current task, so need process scheduler before wd timer handler, Ensure that the current task is not updated before the RR process Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
This commit is contained in:
parent
24c931c220
commit
38ddf7d59f
|
@ -347,26 +347,23 @@ static clock_t nxsched_timer_process(clock_t ticks, clock_t elapsed,
|
|||
nxsched_process_cpuload_ticks(elapsed);
|
||||
#endif
|
||||
|
||||
/* Process watchdogs */
|
||||
|
||||
tmp = wd_timer(ticks, noswitches);
|
||||
if (tmp > 0)
|
||||
{
|
||||
rettime = tmp;
|
||||
}
|
||||
|
||||
/* Check for operations specific to scheduling policy of the currently
|
||||
* active task.
|
||||
*/
|
||||
|
||||
tmp = nxsched_process_scheduler(ticks, elapsed, noswitches);
|
||||
if (tmp > 0)
|
||||
{
|
||||
rettime = tmp;
|
||||
}
|
||||
|
||||
#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC)
|
||||
/* Process watchdogs */
|
||||
|
||||
tmp = wd_timer(ticks, noswitches);
|
||||
if (tmp > 0 && (rettime == 0 || tmp < rettime))
|
||||
{
|
||||
rettime = tmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
return rettime;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue