sched: only disable/enable interrupts if schedule() is called from non-IRQ context
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user