diff options
Diffstat (limited to 'kern/sched_prim.c')
-rw-r--r-- | kern/sched_prim.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kern/sched_prim.c b/kern/sched_prim.c index be34e7dd..11de69cf 100644 --- a/kern/sched_prim.c +++ b/kern/sched_prim.c @@ -1765,7 +1765,9 @@ retry: */ if ((new_thread = (thread_t)*threadp)!= THREAD_NULL) { *threadp = (volatile thread_t) THREAD_NULL; + thread_lock(new_thread); thread_setrun(new_thread, FALSE); + thread_unlock(new_thread); } counter(c_idle_thread_block++); |