sched: Don't overwrite shutdown reason if shutdown called while shutdown
If a shutdown occurs while the machine is already shutdown, then keep the original shutdown reason code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -276,6 +276,7 @@ void
|
|||||||
sched_shutdown(unsigned int reason)
|
sched_shutdown(unsigned int reason)
|
||||||
{
|
{
|
||||||
irq_disable();
|
irq_disable();
|
||||||
|
if (!shutdown_status)
|
||||||
shutdown_reason = reason;
|
shutdown_reason = reason;
|
||||||
longjmp(shutdown_jmp, 1);
|
longjmp(shutdown_jmp, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user