SMP: I think we have to spinlock before we are possibly suspended
This commit is contained in:
parent
3c46fa3f9f
commit
8399938138
|
@ -170,6 +170,12 @@ void leave_critical_section(irqstate_t flags)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* NO.. Release the spinlock to allow other access. */
|
||||||
|
|
||||||
|
g_cpu_irqset &= ~(1 << this_cpu());
|
||||||
|
rtcb->irqcount = 0;
|
||||||
|
spin_unlock(g_cpu_irqlock);
|
||||||
|
|
||||||
/* Release any ready-to-run tasks that have collected in
|
/* Release any ready-to-run tasks that have collected in
|
||||||
* g_pendingtasks if the scheduler is not locked.
|
* g_pendingtasks if the scheduler is not locked.
|
||||||
*
|
*
|
||||||
|
@ -181,12 +187,6 @@ void leave_critical_section(irqstate_t flags)
|
||||||
{
|
{
|
||||||
up_release_pending();
|
up_release_pending();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NO.. Release the spinlock to allow other access. */
|
|
||||||
|
|
||||||
g_cpu_irqset &= ~(1 << this_cpu());
|
|
||||||
rtcb->irqcount = 0;
|
|
||||||
spin_unlock(g_cpu_irqlock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restore the previous interrupt state which may still be interrupts
|
/* Restore the previous interrupt state which may still be interrupts
|
||||||
|
|
Loading…
Reference in New Issue