summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2016-05-16 18:00:41 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2016-05-16 18:00:41 +0900
commit98977937cba9a4964151ed195d4cc1cd9f7966dd (patch)
tree590258225f7ecb185dd44bdc1b8f8d044fe19cc8
parent06d046b9634568a7fd474fab49610a7070bd0e08 (diff)
fix chx_wakeup
-rw-r--r--chopstx.c2
1 files changed, 2 insertions, 0 deletions
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)