diff options
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index db3ae3eb8..dbcdb0b88 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -381,11 +381,12 @@ static ResultCode SendSyncRequest(Core::System& system, Handle handle) { LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName()); - system.PrepareReschedule(); + auto thread = system.CurrentScheduler().GetCurrentThread(); + thread->InvalidateWakeupCallback(); + thread->SetStatus(ThreadStatus::WaitIPC); + system.PrepareReschedule(thread->GetProcessorID()); - // TODO(Subv): svcSendSyncRequest should put the caller thread to sleep while the server - // responds and cause a reschedule. - return session->SendSyncRequest(system.CurrentScheduler().GetCurrentThread(), system.Memory()); + return session->SendSyncRequest(SharedFrom(thread), system.Memory()); } /// Get the ID for the specified thread. @@ -1649,8 +1650,7 @@ static ResultCode WaitProcessWideKeyAtomic(Core::System& system, VAddr mutex_add } /// Signal process wide key -static ResultCode SignalProcessWideKey(Core::System& system, VAddr condition_variable_addr, - s32 target) { +static void SignalProcessWideKey(Core::System& system, VAddr condition_variable_addr, s32 target) { LOG_TRACE(Kernel_SVC, "called, condition_variable_addr=0x{:X}, target=0x{:08X}", condition_variable_addr, target); @@ -1725,8 +1725,6 @@ static ResultCode SignalProcessWideKey(Core::System& system, VAddr condition_var system.PrepareReschedule(thread->GetProcessorID()); } } - - return RESULT_SUCCESS; } // Wait for an address (via Address Arbiter) @@ -1780,6 +1778,17 @@ static ResultCode SignalToAddress(Core::System& system, VAddr address, u32 type, return address_arbiter.SignalToAddress(address, signal_type, value, num_to_wake); } +static void KernelDebug([[maybe_unused]] Core::System& system, + [[maybe_unused]] u32 kernel_debug_type, [[maybe_unused]] u64 param1, + [[maybe_unused]] u64 param2, [[maybe_unused]] u64 param3) { + // Intentionally do nothing, as this does nothing in released kernel binaries. +} + +static void ChangeKernelTraceState([[maybe_unused]] Core::System& system, + [[maybe_unused]] u32 trace_state) { + // Intentionally do nothing, as this does nothing in released kernel binaries. +} + /// This returns the total CPU ticks elapsed since the CPU was powered-on static u64 GetSystemTick(Core::System& system) { LOG_TRACE(Kernel_SVC, "called"); @@ -2417,8 +2426,8 @@ static const FunctionDef SVC_Table[] = { {0x39, nullptr, "Unknown"}, {0x3A, nullptr, "Unknown"}, {0x3B, nullptr, "Unknown"}, - {0x3C, nullptr, "DumpInfo"}, - {0x3D, nullptr, "DumpInfoNew"}, + {0x3C, SvcWrap<KernelDebug>, "KernelDebug"}, + {0x3D, SvcWrap<ChangeKernelTraceState>, "ChangeKernelTraceState"}, {0x3E, nullptr, "Unknown"}, {0x3F, nullptr, "Unknown"}, {0x40, nullptr, "CreateSession"}, |
