aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2017-05-18 11:09:03 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2017-05-18 11:09:03 +0900
commit7798e620a6c2508c47d3bbb33dbaa04f87f62ddd (patch)
treeacfde7d119987078d6794e2188f2b3cc04d62d5b
parent89eb54929e610045d6563a1e6ff24d49c06c427e (diff)
Fix access to REG_R0 at chx_wakeup.
-rw-r--r--ChangeLog4
-rw-r--r--chopstx.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7068794..23f5027 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-05-18 NIIBE Yutaka <gniibe@fsij.org>
+
+ * chopstx.c (chx_wakeup): Fix access to REG_R0.
+
2017-02-02 NIIBE Yutaka <gniibe@fsij.org>
* VERSION: 1.3.
diff --git a/chopstx.c b/chopstx.c
index 2f7189f..986bb90 100644
--- a/chopstx.c
+++ b/chopstx.c
@@ -918,8 +918,8 @@ 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;
+ ((struct chx_stack_regs *)tp->tc.reg[REG_SP])->reg[REG_R0] = 1;
chx_ready_enqueue (tp);
if (tp->prio > running->prio)
yield = 1;