sched: only disable/enable interrupts if schedule() is called from non-IRQ context

This commit is contained in:
2026-02-21 11:23:43 +00:00
parent 855440f584
commit 6e39dd45a4

View File

@@ -91,7 +91,9 @@ void context_switch(struct thread *old, struct thread *new)
void __schedule(enum sched_mode mode)
{
if (mode != SCHED_IRQ) {
ml_int_disable();
}
struct cpu_data *this_cpu = get_this_cpu();
struct runqueue *rq = &this_cpu->c_rq;
@@ -142,7 +144,9 @@ void __schedule(enum sched_mode mode)
context_switch(prev, next);
}
if (mode != SCHED_IRQ) {
ml_int_enable();
}
}
void schedule(enum sched_mode mode)