Fix timer expiration.

This commit is contained in:
NIIBE Yutaka
2017-12-16 15:00:55 +09:00
parent 19b0590c1f
commit 530ddcfeda
3 changed files with 8 additions and 1 deletions

View File

@@ -403,6 +403,7 @@ chx_timer_expired (void)
tp = tp_next)
{
next_tick = tp->v;
tp->v = (uintptr_t)0;
tp_next = (struct chx_thread *)tp->next;
ll_dequeue ((struct chx_pq *)tp);
chx_ready_enqueue (tp);
@@ -575,6 +576,7 @@ chx_mutex_unlock (chopstx_mutex_t *mutex)
uint16_t newprio = running->prio_orig;
chopstx_mutex_t *m;
tp->v = (uintptr_t)0;
chx_ready_enqueue (tp);
/* Examine mutexes we hold, and determine new priority for running. */