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)
|
void __schedule(enum sched_mode mode)
|
||||||
{
|
{
|
||||||
|
if (mode != SCHED_IRQ) {
|
||||||
ml_int_disable();
|
ml_int_disable();
|
||||||
|
}
|
||||||
|
|
||||||
struct cpu_data *this_cpu = get_this_cpu();
|
struct cpu_data *this_cpu = get_this_cpu();
|
||||||
struct runqueue *rq = &this_cpu->c_rq;
|
struct runqueue *rq = &this_cpu->c_rq;
|
||||||
@@ -142,8 +144,10 @@ void __schedule(enum sched_mode mode)
|
|||||||
context_switch(prev, next);
|
context_switch(prev, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mode != SCHED_IRQ) {
|
||||||
ml_int_enable();
|
ml_int_enable();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void schedule(enum sched_mode mode)
|
void schedule(enum sched_mode mode)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user