Change chx_ready_pop implementation.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka
2019-11-18 11:55:22 +09:00
parent 355482550b
commit b70de1b98d
4 changed files with 14 additions and 33 deletions

View File

@@ -271,6 +271,12 @@ chx_ready_pop (void)
tp->state = THREAD_RUNNING;
chx_spin_unlock (&q_ready.lock);
if (tp && tp->flag_sched_rr)
{
chx_spin_lock (&q_timer.lock);
chx_timer_insert (tp, PREEMPTION_USEC);
chx_spin_unlock (&q_timer.lock);
}
return tp;
}