diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2015-09-08 17:14:43 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2015-09-08 17:14:43 +0900 |
commit | 1b25cc5dcb32562bb92ca5e8e4e8cf1fedcc1943 (patch) | |
tree | 5bd2cb3a6d509b0362f53038726e970c3408cf17 | |
parent | ee3c5d4e6f7b8ef003d940a9e2c75b5068599577 (diff) |
fix more spin lock
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | chopstx.c | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -4,6 +4,8 @@ the condition inside. (chx_timer_expired, chx_handle_intr): Call unconditionally. (intr_lock): New variable. + (chx_handle_intr, chopstx_claim_irq, chopstx_release_irq) + (chopstx_release_irq_thread): Add spin lock with intr_lock. * chopstx.h (chx_intr): Remove member LOCK. @@ -1331,6 +1331,7 @@ chopstx_release_irq_thread (struct chx_thread *tp) chopstx_intr_t *intr, *intr_prev; chx_cpu_sched_lock (); + chx_spin_lock (&intr_lock); intr_prev = intr_top; for (intr = intr_top; intr; intr = intr->next) if (intr->tp == tp) @@ -1344,6 +1345,7 @@ chopstx_release_irq_thread (struct chx_thread *tp) else intr_prev->next = intr->next; } + chx_spin_unlock (&intr_lock); chx_cpu_sched_unlock (); } |