sched: fix thread_awaken manipulating a runqueue without locking it
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user