summaryrefslogtreecommitdiff
path: root/kern/eventcount.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/eventcount.c')
-rw-r--r--kern/eventcount.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kern/eventcount.c b/kern/eventcount.c
index a9d7bd41..1cbc15a2 100644
--- a/kern/eventcount.c
+++ b/kern/eventcount.c
@@ -244,7 +244,7 @@ evc_signal(evc_t ev)
#if (NCPUS > 1)
retry:
while((thread->state & TH_RUN) || thread->lock.lock_data)
- ;
+ cpu_pause();
#endif
thread_lock(thread);
@@ -260,12 +260,12 @@ evc_signal(evc_t ev)
* on run queue.
*/
thread->state = (state &~ TH_WAIT) | TH_RUN;
- thread_unlock(thread);
#if NCPUS > 1
thread_setrun(thread, TRUE);
#else
simpler_thread_setrun(thread, TRUE);
#endif
+ thread_unlock(thread);
break;
case TH_RUN | TH_WAIT:
@@ -339,7 +339,7 @@ simpler_thread_setrun(
ast_on(cpu_number(), AST_BLOCK);
whichq = (th)->sched_pri;
- simple_lock(&(rq)->lock); /* lock the run queue */
+ runq_lock(rq); /* lock the run queue */
enqueue_head(&(rq)->runq[whichq], &((th)->links));
if (whichq < (rq)->low || (rq)->count == 0)
@@ -350,7 +350,7 @@ simpler_thread_setrun(
#else
(th)->runq = (rq);
#endif
- simple_unlock(&(rq)->lock);
+ runq_unlock(rq);
/*
* Turn off first_quantum to allow context switch.