sched/sched/sched_timerexpiration: change from sched_time to eventtime

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
zouboan 2022-03-27 17:21:52 +08:00 committed by Petro Karashchenko
parent 01cb137277
commit 466063ac9e
2 changed files with 3 additions and 2 deletions

View File

@ -82,6 +82,7 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_HAVE_PARENT=y
CONFIG_SCHED_HPWORK=y CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_ONEXIT=y CONFIG_SCHED_ONEXIT=y
CONFIG_SCHED_SPORADIC=y
CONFIG_SCHED_WAITPID=y CONFIG_SCHED_WAITPID=y
CONFIG_SIM_M32=y CONFIG_SIM_M32=y
CONFIG_START_MONTH=6 CONFIG_START_MONTH=6

View File

@ -205,8 +205,8 @@ static uint32_t nxsched_cpu_scheduler(int cpu, uint32_t ticks,
* committed to updating the scheduler for this TCB. * committed to updating the scheduler for this TCB.
*/ */
sporadic->sched_time.tv_sec = g_sched_time.tv_sec; sporadic->eventtime = SEC2TICK(g_sched_time.tv_sec) +
sporadic->sched_time.tv_nsec = g_sched_time.tv_nsec; NSEC2TICK(g_sched_time.tv_nsec);
/* Yes, check if the currently executing task has exceeded its /* Yes, check if the currently executing task has exceeded its
* budget. * budget.