From 98977937cba9a4964151ed195d4cc1cd9f7966dd Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 16 May 2016 18:00:41 +0900 Subject: [PATCH] fix chx_wakeup --- chopstx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chopstx.c b/chopstx.c index 065dd1f..36eb0ea 100644 --- a/chopstx.c +++ b/chopstx.c @@ -928,6 +928,7 @@ chx_wakeup (struct chx_pq *pq) tp = px->master; if (tp->state == THREAD_WAIT_POLL) { + ((struct chx_stack_regs *)tp->tc.reg[REG_SP])->reg[REG_R0] = 1; if (tp->parent == &q_timer.q) chx_timer_dequeue (tp); chx_ready_enqueue (tp); @@ -938,6 +939,7 @@ chx_wakeup (struct chx_pq *pq) } else { + ((struct chx_stack_regs *)tp->tc.reg[REG_SP])->reg[REG_R0] = 1; tp = (struct chx_thread *)pq; chx_ready_enqueue (tp); if (tp->prio > running->prio)