Merge pull request #11384 from liamwhite/am-shutdown

am: shorten shutdown timeout when lock is not held
This commit is contained in:
liamwhite
2023-09-02 14:42:35 -04:00
committed by GitHub
4 changed files with 41 additions and 13 deletions

View File

@ -341,7 +341,7 @@ void ISelfController::Exit(HLERequestContext& ctx) {
void ISelfController::LockExit(HLERequestContext& ctx) {
LOG_DEBUG(Service_AM, "called");
system.SetExitLock(true);
system.SetExitLocked(true);
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
@ -350,10 +350,14 @@ void ISelfController::LockExit(HLERequestContext& ctx) {
void ISelfController::UnlockExit(HLERequestContext& ctx) {
LOG_DEBUG(Service_AM, "called");
system.SetExitLock(false);
system.SetExitLocked(false);
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
if (system.GetExitRequested()) {
system.Exit();
}
}
void ISelfController::EnterFatalSection(HLERequestContext& ctx) {