Give 1 tick of CPU time to the idle task

This commit is contained in:
apio 2022-09-20 20:48:49 +02:00
parent 5a271eaab2
commit 1dce3a0cf7

View File

@ -123,6 +123,7 @@ void Scheduler::task_yield(Context* context)
if (original_task->task_sleep > 0) if (original_task->task_sleep > 0)
{ {
sched_current_task = &idle_task; sched_current_task = &idle_task;
sched_current_task->task_time = frequency;
if (!was_idle) { set_context_from_task(*sched_current_task, context); } if (!was_idle) { set_context_from_task(*sched_current_task, context); }
return; return;
} }