diff --git a/sched/thread.c b/sched/thread.c index 3e3e675..3c28655 100644 --- a/sched/thread.c +++ b/sched/thread.c @@ -136,7 +136,10 @@ void thread_awaken(struct thread *thr) } thr->tr_state = THREAD_READY; + unsigned long flags; + rq_lock(rq, &flags); rq_enqueue(rq, thr); + rq_unlock(rq, flags); } struct thread *create_kernel_thread(void (*fn)(void))