sched: fix thread_awaken manipulating a runqueue without locking it

This commit is contained in:
2026-03-14 22:23:07 +00:00
parent 89dac0c951
commit e73a5c41ce

View File

@@ -136,7 +136,10 @@ void thread_awaken(struct thread *thr)
} }
thr->tr_state = THREAD_READY; thr->tr_state = THREAD_READY;
unsigned long flags;
rq_lock(rq, &flags);
rq_enqueue(rq, thr); rq_enqueue(rq, thr);
rq_unlock(rq, flags);
} }
struct thread *create_kernel_thread(void (*fn)(void)) struct thread *create_kernel_thread(void (*fn)(void))