azahar/src/core/hle/kernel
Masamune3210 d19e6086fa kernel: suppress async IPC wakeups during shutdown
Async IPC continuations can finish while System::Shutdown is tearing down service, kernel, and timing state. The dump showed an HTTP ReceiveData RunAsync task calling Thread::WakeAfterDelay after shutdown had begun, which reached Core::Timing::ScheduleEvent with invalid timing state and crashed.

Mark KernelSystem as shutting down at the start of System::Shutdown and in the kernel destructor. Route RunAsync and RunOnThreadWorker completions through HLERequestContext::WakeAfterAsync, which skips scheduling guest-thread wakes once shutdown starts and balances the pending async counter instead.

Validation: git diff --check
2026-05-15 10:02:59 -05:00
..
ipc_debugger hle: Eliminate need to specify command headers for IPC. (#6678) 2023-07-14 17:32:59 -07:00
address_arbiter.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
address_arbiter.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
client_port.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
client_port.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
client_session.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
client_session.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
config_mem.cpp Core: update kernel config memory to latest 11.17 (#7460) 2024-02-22 15:43:33 -08:00
config_mem.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
errors.h kernel: Update to use atmosphere macros and correct Result (#7242) 2023-12-31 09:01:40 -08:00
event.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
event.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
handle_table.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
handle_table.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
hle_ipc.cpp kernel: suppress async IPC wakeups during shutdown 2026-05-15 10:02:59 -05:00
hle_ipc.h kernel: suppress async IPC wakeups during shutdown 2026-05-15 10:02:59 -05:00
ipc.cpp Major revamps to match game loading decisions. 2025-02-27 14:22:50 +01:00
ipc.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
kernel.cpp kernel: suppress async IPC wakeups during shutdown 2026-05-15 10:02:59 -05:00
kernel.h kernel: suppress async IPC wakeups during shutdown 2026-05-15 10:02:59 -05:00
memory.cpp core: Fix memory mode handling during app launch (#1534) 2025-12-27 13:38:06 +01:00
memory.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
mutex.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
mutex.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
object.cpp APT/kernel: fix HOME button crash, region detection, GetSdmcCtrRootPath 2026-05-14 15:52:32 -05:00
object.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
process.cpp APT/kernel: fix HOME button crash, region detection, GetSdmcCtrRootPath 2026-05-14 15:52:32 -05:00
process.h APT/kernel: fix HOME button crash, region detection, GetSdmcCtrRootPath 2026-05-14 15:52:32 -05:00
resource_limit.cpp core: kernel: Implement thread cpu time limit for core1 (#1934) 2026-03-28 12:20:33 +01:00
resource_limit.h core: kernel: Implement thread cpu time limit for core1 (#1934) 2026-03-28 12:20:33 +01:00
semaphore.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
semaphore.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
server_port.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
server_port.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
server_session.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
server_session.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
session.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
session.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
shared_memory.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
shared_memory.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
shared_page.cpp kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
shared_page.h Add 'Set Up System Files' option (#642) 2025-03-10 10:48:11 +00:00
svc.cpp kernel: extend NullWaitObject fix to WaitSynchronization1 (svc 0x24) 2026-05-15 10:02:59 -05:00
svc.h Refactor out the wakeup_callback function pointer 2020-02-13 17:42:05 +08:00
svc_wrapper.h core: svc: Add better logging to svc failures (#1948) 2026-03-28 12:03:16 +01:00
thread.cpp Revamp GDB implemenation and add a some minor debug features (#2086) 2026-05-07 13:48:35 +02:00
thread.h Revamp GDB implemenation and add a some minor debug features (#2086) 2026-05-07 13:48:35 +02:00
timer.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
timer.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
vm_manager.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
vm_manager.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00
wait_object.cpp Applied clang-format-18 to codebase 2024-11-10 21:02:54 +00:00
wait_object.h kernel: Move serialization code out of headers. (#7312) 2024-01-14 16:18:31 -08:00