diff --git a/src/audio_core/device/device_session.cpp b/src/audio_core/device/device_session.cpp index 2a1ae1bb3f..4626035070 100644 --- a/src/audio_core/device/device_session.cpp +++ b/src/audio_core/device/device_session.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -19,7 +22,7 @@ using namespace std::literals; constexpr auto INCREMENT_TIME{5ms}; DeviceSession::DeviceSession(Core::System& system_) - : system{system_}, thread_event{Core::Timing::CreateEvent( + : system{system_}, thread_event{Core::Timing::CreateEventWith( "AudioOutSampleTick", [this](s64 time, std::chrono::nanoseconds) { return ThreadFunc(); })} {} diff --git a/src/audio_core/sink/cubeb_sink.cpp b/src/audio_core/sink/cubeb_sink.cpp index ca42810345..8174e7dd41 100644 --- a/src/audio_core/sink/cubeb_sink.cpp +++ b/src/audio_core/sink/cubeb_sink.cpp @@ -16,7 +16,6 @@ #ifdef _WIN32 #include -#undef CreateEvent #endif namespace AudioCore::Sink { diff --git a/src/common/settings_common.h b/src/common/settings_common.h index bbc16f52ec..c7d5f456fc 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h @@ -143,7 +143,7 @@ public: * * @param load String of the input data. */ - virtual void LoadString(const std::string& load) = 0; + virtual void LoadStringWith(const std::string& load) = 0; /** * Returns a string representation of the data. If the data is an enum, it returns a string of diff --git a/src/common/settings_setting.h b/src/common/settings_setting.h index 076aceef29..48ece4f170 100644 --- a/src/common/settings_setting.h +++ b/src/common/settings_setting.h @@ -183,7 +183,7 @@ public: * * @param input The desired value */ - void LoadString(const std::string& input) override final { + void LoadStringWith(const std::string& input) override final { if (input.empty()) { this->SetValue(this->GetDefault()); return; diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index b216dc2094..72b7516924 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -25,7 +25,7 @@ namespace Core::Timing { constexpr s64 MAX_SLICE_LENGTH = 10000; -std::shared_ptr CreateEvent(std::string name, TimedCallback&& callback) { +std::shared_ptr CreateEventWith(std::string name, TimedCallback&& callback) { return std::make_shared(std::move(callback), std::move(name)); } diff --git a/src/core/core_timing.h b/src/core/core_timing.h index ae9f56d519..0eb3c06e4e 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project @@ -188,6 +188,6 @@ private: /// /// @returns An EventType instance representing the created event. /// -std::shared_ptr CreateEvent(std::string name, TimedCallback&& callback); +std::shared_ptr CreateEventWith(std::string name, TimedCallback&& callback); } // namespace Core::Timing diff --git a/src/core/hle/kernel/k_handle_table.h b/src/core/hle/kernel/k_handle_table.h index 731a5284dc..0d10773fb8 100644 --- a/src/core/hle/kernel/k_handle_table.h +++ b/src/core/hle/kernel/k_handle_table.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project @@ -89,7 +89,7 @@ public: } template - KScopedAutoObject GetObject(Handle handle) const { + KScopedAutoObject GetObjectWith(Handle handle) const { // Handle pseudo-handles. if constexpr (std::derived_from) { if (handle == Svc::PseudoHandle::CurrentProcess) { diff --git a/src/core/hle/kernel/k_hardware_timer.cpp b/src/core/hle/kernel/k_hardware_timer.cpp index 019e709fbe..661f744778 100644 --- a/src/core/hle/kernel/k_hardware_timer.cpp +++ b/src/core/hle/kernel/k_hardware_timer.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project @@ -13,7 +13,7 @@ namespace Kernel { void KHardwareTimer::Initialize() { // Create the timing callback to register with CoreTiming. - m_event_type = Core::Timing::CreateEvent("KHardwareTimer::Callback", + m_event_type = Core::Timing::CreateEventWith("KHardwareTimer::Callback", [this](s64, std::chrono::nanoseconds) { this->DoTask(); return std::nullopt; diff --git a/src/core/hle/kernel/k_object_name.cpp b/src/core/hle/kernel/k_object_name.cpp index df3a1c4c56..aa4f6b43ce 100644 --- a/src/core/hle/kernel/k_object_name.cpp +++ b/src/core/hle/kernel/k_object_name.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -61,7 +64,7 @@ Result KObjectName::Delete(KernelCore& kernel, KAutoObject* obj, const char* com // Find a matching entry in the list, and delete it. for (auto& name : gd.GetObjectList()) { - if (name.MatchesName(compare_name) && obj == name.GetObject()) { + if (name.MatchesName(compare_name) && obj == name.GetObjectWith()) { // We found a match, clean up its resources. obj->Close(); gd.GetObjectList().erase(gd.GetObjectList().iterator_to(name)); @@ -91,7 +94,7 @@ KScopedAutoObject KObjectName::FindImpl(KernelCore& kernel, const c // Try to find a matching object in the global list. for (const auto& name : gd.GetObjectList()) { if (name.MatchesName(compare_name)) { - return name.GetObject(); + return name.GetObjectWith(); } } diff --git a/src/core/hle/kernel/k_object_name.h b/src/core/hle/kernel/k_object_name.h index a8876fe370..a1b6ece18c 100644 --- a/src/core/hle/kernel/k_object_name.h +++ b/src/core/hle/kernel/k_object_name.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -58,7 +61,7 @@ private: void Initialize(KAutoObject* obj, const char* name); bool MatchesName(const char* name) const; - KAutoObject* GetObject() const { + KAutoObject* GetObjectWith() const { return m_object; } diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 129bda194a..4c86b81b26 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -256,7 +256,7 @@ struct KernelCore::Impl { } void InitializePreemption(KernelCore& kernel) { - preemption_event = Core::Timing::CreateEvent("PreemptionCallback", [this, &kernel](s64 time, std::chrono::nanoseconds) -> std::optional { + preemption_event = Core::Timing::CreateEventWith("PreemptionCallback", [this, &kernel](s64 time, std::chrono::nanoseconds) -> std::optional { { KScopedSchedulerLock lock(kernel); global_scheduler_context->PreemptThreads(); diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index faf6a6432d..9605ab4f50 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-late @@ -2279,7 +2279,7 @@ static void Call32(Core::System& system, u32 imm, std::span args) { case SvcId::GetProcessId: return SvcWrap_GetProcessId64From32(system, args); case SvcId::GetThreadId: return SvcWrap_GetThreadId64From32(system, args); case SvcId::Break: return SvcWrap_Break64From32(system, args); - case SvcId::OutputDebugString: return SvcWrap_OutputDebugString64From32(system, args); + case SvcId::OutputDebugStringWith: return SvcWrap_OutputDebugString64From32(system, args); case SvcId::ReturnFromException: return SvcWrap_ReturnFromException64From32(system, args); case SvcId::GetInfo: return SvcWrap_GetInfo64From32(system, args); case SvcId::FlushEntireDataCache: return SvcWrap_FlushEntireDataCache64From32(system, args); @@ -2305,7 +2305,7 @@ static void Call32(Core::System& system, u32 imm, std::span args) { case SvcId::ReplyAndReceiveLight: return SvcWrap_ReplyAndReceiveLight64From32(system, args); case SvcId::ReplyAndReceive: return SvcWrap_ReplyAndReceive64From32(system, args); case SvcId::ReplyAndReceiveWithUserBuffer: return SvcWrap_ReplyAndReceiveWithUserBuffer64From32(system, args); - case SvcId::CreateEvent: return SvcWrap_CreateEvent64From32(system, args); + case SvcId::CreateEventWith: return SvcWrap_CreateEvent64From32(system, args); case SvcId::MapIoRegion: return SvcWrap_MapIoRegion64From32(system, args); case SvcId::UnmapIoRegion: return SvcWrap_UnmapIoRegion64From32(system, args); case SvcId::MapPhysicalMemoryUnsafe: return SvcWrap_MapPhysicalMemoryUnsafe64From32(system, args); @@ -2355,7 +2355,7 @@ static void Call32(Core::System& system, u32 imm, std::span args) { case SvcId::QueryProcessMemory: return SvcWrap_QueryProcessMemory64From32(system, args); case SvcId::MapProcessCodeMemory: return SvcWrap_MapProcessCodeMemory64From32(system, args); case SvcId::UnmapProcessCodeMemory: return SvcWrap_UnmapProcessCodeMemory64From32(system, args); - case SvcId::CreateProcess: return SvcWrap_CreateProcess64From32(system, args); + case SvcId::CreateProcessWith: return SvcWrap_CreateProcess64From32(system, args); case SvcId::StartProcess: return SvcWrap_StartProcess64From32(system, args); case SvcId::TerminateProcess: return SvcWrap_TerminateProcess64From32(system, args); case SvcId::GetProcessInfo: return SvcWrap_GetProcessInfo64From32(system, args); @@ -2408,7 +2408,7 @@ static void Call64(Core::System& system, u32 imm, std::span args) { case SvcId::GetProcessId: return SvcWrap_GetProcessId64(system, args); case SvcId::GetThreadId: return SvcWrap_GetThreadId64(system, args); case SvcId::Break: return SvcWrap_Break64(system, args); - case SvcId::OutputDebugString: return SvcWrap_OutputDebugString64(system, args); + case SvcId::OutputDebugStringWith: return SvcWrap_OutputDebugString64(system, args); case SvcId::ReturnFromException: return SvcWrap_ReturnFromException64(system, args); case SvcId::GetInfo: return SvcWrap_GetInfo64(system, args); case SvcId::FlushEntireDataCache: return SvcWrap_FlushEntireDataCache64(system, args); @@ -2434,7 +2434,7 @@ static void Call64(Core::System& system, u32 imm, std::span args) { case SvcId::ReplyAndReceiveLight: return SvcWrap_ReplyAndReceiveLight64(system, args); case SvcId::ReplyAndReceive: return SvcWrap_ReplyAndReceive64(system, args); case SvcId::ReplyAndReceiveWithUserBuffer: return SvcWrap_ReplyAndReceiveWithUserBuffer64(system, args); - case SvcId::CreateEvent: return SvcWrap_CreateEvent64(system, args); + case SvcId::CreateEventWith: return SvcWrap_CreateEvent64(system, args); case SvcId::MapIoRegion: return SvcWrap_MapIoRegion64(system, args); case SvcId::UnmapIoRegion: return SvcWrap_UnmapIoRegion64(system, args); case SvcId::MapPhysicalMemoryUnsafe: return SvcWrap_MapPhysicalMemoryUnsafe64(system, args); @@ -2484,7 +2484,7 @@ static void Call64(Core::System& system, u32 imm, std::span args) { case SvcId::QueryProcessMemory: return SvcWrap_QueryProcessMemory64(system, args); case SvcId::MapProcessCodeMemory: return SvcWrap_MapProcessCodeMemory64(system, args); case SvcId::UnmapProcessCodeMemory: return SvcWrap_UnmapProcessCodeMemory64(system, args); - case SvcId::CreateProcess: return SvcWrap_CreateProcess64(system, args); + case SvcId::CreateProcessWith: return SvcWrap_CreateProcess64(system, args); case SvcId::StartProcess: return SvcWrap_StartProcess64(system, args); case SvcId::TerminateProcess: return SvcWrap_TerminateProcess64(system, args); case SvcId::GetProcessInfo: return SvcWrap_GetProcessInfo64(system, args); diff --git a/src/core/hle/kernel/svc.h b/src/core/hle/kernel/svc.h index 356c1c109a..e88a38350b 100644 --- a/src/core/hle/kernel/svc.h +++ b/src/core/hle/kernel/svc.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-late @@ -56,7 +56,7 @@ Result SendAsyncRequestWithUserBuffer(Core::System& system, Handle* out_event_ha Result GetProcessId(Core::System& system, uint64_t* out_process_id, Handle process_handle); Result GetThreadId(Core::System& system, uint64_t* out_thread_id, Handle thread_handle); void Break(Core::System& system, BreakReason break_reason, uint64_t arg, uint64_t size); -Result OutputDebugString(Core::System& system, uint64_t debug_str, uint64_t len); +Result OutputDebugStringWith(Core::System& system, uint64_t debug_str, uint64_t len); void ReturnFromException(Core::System& system, Result result); Result GetInfo(Core::System& system, uint64_t* out, InfoType info_type, Handle handle, uint64_t info_subtype); void FlushEntireDataCache(Core::System& system); @@ -81,7 +81,7 @@ Result CreateSession(Core::System& system, Handle* out_server_session_handle, Ha Result AcceptSession(Core::System& system, Handle* out_handle, Handle port); Result ReplyAndReceive(Core::System& system, int32_t* out_index, uint64_t handles, int32_t num_handles, Handle reply_target, int64_t timeout_ns); Result ReplyAndReceiveWithUserBuffer(Core::System& system, int32_t* out_index, uint64_t message_buffer, uint64_t message_buffer_size, uint64_t handles, int32_t num_handles, Handle reply_target, int64_t timeout_ns); -Result CreateEvent(Core::System& system, Handle* out_write_handle, Handle* out_read_handle); +Result CreateEventWith(Core::System& system, Handle* out_write_handle, Handle* out_read_handle); Result MapIoRegion(Core::System& system, Handle io_region, uint64_t address, uint64_t size, MemoryPermission perm); Result UnmapIoRegion(Core::System& system, Handle io_region, uint64_t address, uint64_t size); Result MapPhysicalMemoryUnsafe(Core::System& system, uint64_t address, uint64_t size); @@ -131,7 +131,7 @@ Result UnmapProcessMemory(Core::System& system, uint64_t dst_address, Handle pro Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out_page_info, Handle process_handle, uint64_t address); Result MapProcessCodeMemory(Core::System& system, Handle process_handle, uint64_t dst_address, uint64_t src_address, uint64_t size); Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, uint64_t dst_address, uint64_t src_address, uint64_t size); -Result CreateProcess(Core::System& system, Handle* out_handle, uint64_t parameters, uint64_t caps, int32_t num_caps); +Result CreateProcessWith(Core::System& system, Handle* out_handle, uint64_t parameters, uint64_t caps, int32_t num_caps); Result StartProcess(Core::System& system, Handle process_handle, int32_t priority, int32_t core_id, uint64_t main_thread_stack_size); Result TerminateProcess(Core::System& system, Handle process_handle); Result GetProcessInfo(Core::System& system, int64_t* out_info, Handle process_handle, ProcessInfoType info_type); @@ -421,7 +421,7 @@ enum class SvcId : u32 { GetProcessId = 0x24, GetThreadId = 0x25, Break = 0x26, - OutputDebugString = 0x27, + OutputDebugStringWith = 0x27, ReturnFromException = 0x28, GetInfo = 0x29, FlushEntireDataCache = 0x2a, @@ -447,7 +447,7 @@ enum class SvcId : u32 { ReplyAndReceiveLight = 0x42, ReplyAndReceive = 0x43, ReplyAndReceiveWithUserBuffer = 0x44, - CreateEvent = 0x45, + CreateEventWith = 0x45, MapIoRegion = 0x46, UnmapIoRegion = 0x47, MapPhysicalMemoryUnsafe = 0x48, @@ -497,7 +497,7 @@ enum class SvcId : u32 { QueryProcessMemory = 0x76, MapProcessCodeMemory = 0x77, UnmapProcessCodeMemory = 0x78, - CreateProcess = 0x79, + CreateProcessWith = 0x79, StartProcess = 0x7a, TerminateProcess = 0x7b, GetProcessInfo = 0x7c, diff --git a/src/core/hle/kernel/svc/svc_activity.cpp b/src/core/hle/kernel/svc/svc_activity.cpp index 63bc085554..75a4792182 100644 --- a/src/core/hle/kernel/svc/svc_activity.cpp +++ b/src/core/hle/kernel/svc/svc_activity.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -23,7 +26,7 @@ Result SetThreadActivity(Core::System& system, Handle thread_handle, // Get the thread from its handle. KScopedAutoObject thread = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(thread_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(thread_handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Check that the activity is being set on a non-current thread for the current process. diff --git a/src/core/hle/kernel/svc/svc_cache.cpp b/src/core/hle/kernel/svc/svc_cache.cpp index c2c8be10f5..65d13544bf 100644 --- a/src/core/hle/kernel/svc/svc_cache.cpp +++ b/src/core/hle/kernel/svc/svc_cache.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -38,7 +41,7 @@ Result FlushProcessDataCache(Core::System& system, Handle process_handle, u64 ad // Get the process from its handle. KScopedAutoObject process = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(process_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(process_handle); R_UNLESS(process.IsNotNull(), ResultInvalidHandle); // Verify the region is within range. diff --git a/src/core/hle/kernel/svc/svc_code_memory.cpp b/src/core/hle/kernel/svc/svc_code_memory.cpp index 4e7af9f575..37a14d3726 100644 --- a/src/core/hle/kernel/svc/svc_code_memory.cpp +++ b/src/core/hle/kernel/svc/svc_code_memory.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -86,7 +86,7 @@ Result ControlCodeMemory(Core::System& system, Handle code_memory_handle, // Get the code memory from its handle. KScopedAutoObject code_mem = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(code_memory_handle); + .GetObjectWith(code_memory_handle); R_UNLESS(code_mem.IsNotNull(), ResultInvalidHandle); // NOTE: Here, Atmosphere extends the SVC to allow code memory operations on one's own process. diff --git a/src/core/hle/kernel/svc/svc_debug_string.cpp b/src/core/hle/kernel/svc/svc_debug_string.cpp index 00b65429be..bcf70d024b 100644 --- a/src/core/hle/kernel/svc/svc_debug_string.cpp +++ b/src/core/hle/kernel/svc/svc_debug_string.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -9,7 +12,7 @@ namespace Kernel::Svc { /// Used to output a message on a debug hardware unit - does nothing on a retail unit -Result OutputDebugString(Core::System& system, u64 address, u64 len) { +Result OutputDebugStringWith(Core::System& system, u64 address, u64 len) { R_SUCCEED_IF(len == 0); std::string str(len, '\0'); @@ -20,11 +23,11 @@ Result OutputDebugString(Core::System& system, u64 address, u64 len) { } Result OutputDebugString64(Core::System& system, uint64_t debug_str, uint64_t len) { - R_RETURN(OutputDebugString(system, debug_str, len)); + R_RETURN(OutputDebugStringWith(system, debug_str, len)); } Result OutputDebugString64From32(Core::System& system, uint32_t debug_str, uint32_t len) { - R_RETURN(OutputDebugString(system, debug_str, len)); + R_RETURN(OutputDebugStringWith(system, debug_str, len)); } } // namespace Kernel::Svc diff --git a/src/core/hle/kernel/svc/svc_device_address_space.cpp b/src/core/hle/kernel/svc/svc_device_address_space.cpp index ac828320f4..f90bb61519 100644 --- a/src/core/hle/kernel/svc/svc_device_address_space.cpp +++ b/src/core/hle/kernel/svc/svc_device_address_space.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -48,7 +51,7 @@ Result AttachDeviceAddressSpace(Core::System& system, DeviceName device_name, Ha // Get the device address space. KScopedAutoObject das = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(das_handle); + .GetObjectWith(das_handle); R_UNLESS(das.IsNotNull(), ResultInvalidHandle); // Attach. @@ -59,7 +62,7 @@ Result DetachDeviceAddressSpace(Core::System& system, DeviceName device_name, Ha // Get the device address space. KScopedAutoObject das = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(das_handle); + .GetObjectWith(das_handle); R_UNLESS(das.IsNotNull(), ResultInvalidHandle); // Detach. @@ -100,12 +103,12 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han // Get the device address space. KScopedAutoObject das = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(das_handle); + .GetObjectWith(das_handle); R_UNLESS(das.IsNotNull(), ResultInvalidHandle); // Get the process. KScopedAutoObject process = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(process_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(process_handle); R_UNLESS(process.IsNotNull(), ResultInvalidHandle); // Validate that the process address is within range. @@ -141,12 +144,12 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han // Get the device address space. KScopedAutoObject das = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(das_handle); + .GetObjectWith(das_handle); R_UNLESS(das.IsNotNull(), ResultInvalidHandle); // Get the process. KScopedAutoObject process = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(process_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(process_handle); R_UNLESS(process.IsNotNull(), ResultInvalidHandle); // Validate that the process address is within range. @@ -173,12 +176,12 @@ Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle p // Get the device address space. KScopedAutoObject das = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(das_handle); + .GetObjectWith(das_handle); R_UNLESS(das.IsNotNull(), ResultInvalidHandle); // Get the process. KScopedAutoObject process = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(process_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(process_handle); R_UNLESS(process.IsNotNull(), ResultInvalidHandle); // Validate that the process address is within range. diff --git a/src/core/hle/kernel/svc/svc_event.cpp b/src/core/hle/kernel/svc/svc_event.cpp index 586cb2b14e..ebd5a23734 100644 --- a/src/core/hle/kernel/svc/svc_event.cpp +++ b/src/core/hle/kernel/svc/svc_event.cpp @@ -22,7 +22,7 @@ Result SignalEvent(Core::System& system, Handle event_handle) { // Fail-safe for system applets const auto program_id = GetCurrentProcess(system.Kernel()).GetProgramId(); if ((program_id & 0xFFFFFFFFFFFFFF00ull) == 0x0100000000001000ull) { - KScopedAutoObject event = handle_table.GetObject(event_handle); + KScopedAutoObject event = handle_table.GetObjectWith(event_handle); if (event.IsNotNull()) { event->Signal(); } else { @@ -34,7 +34,7 @@ Result SignalEvent(Core::System& system, Handle event_handle) { // Get the event. - KScopedAutoObject event = handle_table.GetObject(event_handle); + KScopedAutoObject event = handle_table.GetObjectWith(event_handle); R_UNLESS(event.IsNotNull(), ResultInvalidHandle); R_RETURN(event->Signal()); @@ -48,7 +48,7 @@ Result ClearEvent(Core::System& system, Handle event_handle) { // Try to clear the writable event. { - KScopedAutoObject event = handle_table.GetObject(event_handle); + KScopedAutoObject event = handle_table.GetObjectWith(event_handle); if (event.IsNotNull()) { event->Clear(); R_SUCCEED(); @@ -57,7 +57,7 @@ Result ClearEvent(Core::System& system, Handle event_handle) { // Try to clear the readable event. { - KScopedAutoObject readable_event = handle_table.GetObject(event_handle); + KScopedAutoObject readable_event = handle_table.GetObjectWith(event_handle); if (readable_event.IsNotNull()) { readable_event->Clear(); R_SUCCEED(); @@ -67,7 +67,7 @@ Result ClearEvent(Core::System& system, Handle event_handle) { R_THROW(ResultInvalidHandle); } -Result CreateEvent(Core::System& system, Handle* out_write, Handle* out_read) { +Result CreateEventWith(Core::System& system, Handle* out_write, Handle* out_read) { LOG_DEBUG(Kernel_SVC, "called"); // Get the kernel reference and handle table. @@ -119,7 +119,7 @@ Result ClearEvent64(Core::System& system, Handle event_handle) { } Result CreateEvent64(Core::System& system, Handle* out_write_handle, Handle* out_read_handle) { - R_RETURN(CreateEvent(system, out_write_handle, out_read_handle)); + R_RETURN(CreateEventWith(system, out_write_handle, out_read_handle)); } Result SignalEvent64From32(Core::System& system, Handle event_handle) { @@ -132,7 +132,7 @@ Result ClearEvent64From32(Core::System& system, Handle event_handle) { Result CreateEvent64From32(Core::System& system, Handle* out_write_handle, Handle* out_read_handle) { - R_RETURN(CreateEvent(system, out_write_handle, out_read_handle)); + R_RETURN(CreateEventWith(system, out_write_handle, out_read_handle)); } } // namespace Kernel::Svc diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp index 9e651e1171..31eb29b662 100644 --- a/src/core/hle/kernel/svc/svc_info.cpp +++ b/src/core/hle/kernel/svc/svc_info.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -46,7 +46,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle R_UNLESS(info_sub_id == 0, ResultInvalidEnumValue); const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); - KScopedAutoObject process = handle_table.GetObject(handle); + KScopedAutoObject process = handle_table.GetObjectWith(handle); R_UNLESS(process.IsNotNull(), ResultInvalidHandle); switch (info_id_type) { @@ -204,7 +204,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle KScopedAutoObject thread = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(static_cast(handle)); + .GetObjectWith(static_cast(handle)); if (thread.IsNull()) { LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", static_cast(handle)); diff --git a/src/core/hle/kernel/svc/svc_ipc.cpp b/src/core/hle/kernel/svc/svc_ipc.cpp index db912b71fb..a0ccae9d94 100644 --- a/src/core/hle/kernel/svc/svc_ipc.cpp +++ b/src/core/hle/kernel/svc/svc_ipc.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -24,7 +24,7 @@ Result SendSyncRequestImpl(KernelCore& kernel, uintptr_t message, size_t buffer_ Handle session_handle) { // Get the client session. KScopedAutoObject session = - GetCurrentProcess(kernel).GetHandleTable().GetObject(session_handle); + GetCurrentProcess(kernel).GetHandleTable().GetObjectWith(session_handle); R_UNLESS(session.IsNotNull(), ResultInvalidHandle); // Get the parent, and persist a reference to it until we're done. @@ -42,7 +42,7 @@ Result ReplyAndReceiveImpl(KernelCore& kernel, int32_t* out_index, uintptr_t mes // Reply to the target, if one is specified. if (reply_target != InvalidHandle) { KScopedAutoObject session = - GetCurrentProcess(kernel).GetHandleTable().GetObject(reply_target); + GetCurrentProcess(kernel).GetHandleTable().GetObjectWith(reply_target); R_UNLESS(session.IsNotNull(), ResultInvalidHandle); // If we fail to reply, we want to set the output index to -1. @@ -193,7 +193,7 @@ Result SendAsyncRequestWithUserBuffer(Core::System& system, Handle* out_event_ha R_UNLESS(event_reservation.Succeeded(), ResultLimitReached); // Get the client session. - KScopedAutoObject session = process.GetHandleTable().GetObject(session_handle); + KScopedAutoObject session = process.GetHandleTable().GetObjectWith(session_handle); R_UNLESS(session.IsNotNull(), ResultInvalidHandle); // Get the parent, and persist a reference to it until we're done. diff --git a/src/core/hle/kernel/svc/svc_light_ipc.cpp b/src/core/hle/kernel/svc/svc_light_ipc.cpp index 4772cbda17..d731c5b403 100644 --- a/src/core/hle/kernel/svc/svc_light_ipc.cpp +++ b/src/core/hle/kernel/svc/svc_light_ipc.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -15,7 +18,7 @@ Result SendSyncRequestLight(Core::System& system, Handle session_handle, u32* ar // Get the light client session from its handle. KScopedAutoObject session = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(session_handle); + .GetObjectWith(session_handle); R_UNLESS(session.IsNotNull(), ResultInvalidHandle); // Send the request. @@ -28,7 +31,7 @@ Result ReplyAndReceiveLight(Core::System& system, Handle session_handle, u32* ar // Get the light server session from its handle. KScopedAutoObject session = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(session_handle); + .GetObjectWith(session_handle); R_UNLESS(session.IsNotNull(), ResultInvalidHandle); // Handle the request. diff --git a/src/core/hle/kernel/svc/svc_port.cpp b/src/core/hle/kernel/svc/svc_port.cpp index 9a22dadaf7..6d5846a897 100644 --- a/src/core/hle/kernel/svc/svc_port.cpp +++ b/src/core/hle/kernel/svc/svc_port.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -93,7 +96,7 @@ Result ConnectToPort(Core::System& system, Handle* out, Handle port) { auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); // Get the client port. - KScopedAutoObject client_port = handle_table.GetObject(port); + KScopedAutoObject client_port = handle_table.GetObjectWith(port); R_UNLESS(client_port.IsNotNull(), ResultInvalidHandle); // Reserve a handle for the port. diff --git a/src/core/hle/kernel/svc/svc_process.cpp b/src/core/hle/kernel/svc/svc_process.cpp index 6d63892a94..b94eb4a6b5 100644 --- a/src/core/hle/kernel/svc/svc_process.cpp +++ b/src/core/hle/kernel/svc/svc_process.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -28,7 +28,7 @@ Result GetProcessId(Core::System& system, u64* out_process_id, Handle handle) { // Get the object from the handle table. KScopedAutoObject obj = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(static_cast(handle)); + .GetObjectWith(static_cast(handle)); R_UNLESS(obj.IsNotNull(), ResultInvalidHandle); // Get the process from the object. @@ -98,7 +98,7 @@ Result GetProcessInfo(Core::System& system, s64* out, Handle process_handle, LOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, type={:#X}", process_handle, info_type); const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); - KScopedAutoObject process = handle_table.GetObject(process_handle); + KScopedAutoObject process = handle_table.GetObjectWith(process_handle); if (process.IsNull()) { LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle=0x{:08X}", process_handle); @@ -115,7 +115,7 @@ Result GetProcessInfo(Core::System& system, s64* out, Handle process_handle, R_SUCCEED(); } -Result CreateProcess(Core::System& system, Handle* out_handle, uint64_t parameters, uint64_t caps, +Result CreateProcessWith(Core::System& system, Handle* out_handle, uint64_t parameters, uint64_t caps, int32_t num_caps) { UNIMPLEMENTED(); R_THROW(ResultNotImplemented); @@ -147,7 +147,7 @@ Result GetProcessList64(Core::System& system, int32_t* out_num_processes, uint64 Result CreateProcess64(Core::System& system, Handle* out_handle, uint64_t parameters, uint64_t caps, int32_t num_caps) { - R_RETURN(CreateProcess(system, out_handle, parameters, caps, num_caps)); + R_RETURN(CreateProcessWith(system, out_handle, parameters, caps, num_caps)); } Result StartProcess64(Core::System& system, Handle process_handle, int32_t priority, @@ -179,7 +179,7 @@ Result GetProcessList64From32(Core::System& system, int32_t* out_num_processes, Result CreateProcess64From32(Core::System& system, Handle* out_handle, uint32_t parameters, uint32_t caps, int32_t num_caps) { - R_RETURN(CreateProcess(system, out_handle, parameters, caps, num_caps)); + R_RETURN(CreateProcessWith(system, out_handle, parameters, caps, num_caps)); } Result StartProcess64From32(Core::System& system, Handle process_handle, int32_t priority, diff --git a/src/core/hle/kernel/svc/svc_process_memory.cpp b/src/core/hle/kernel/svc/svc_process_memory.cpp index fe3b14b2ba..3ded1b2bc6 100644 --- a/src/core/hle/kernel/svc/svc_process_memory.cpp +++ b/src/core/hle/kernel/svc/svc_process_memory.cpp @@ -48,7 +48,7 @@ Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, u // Get the process from its handle. KScopedAutoObject process = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(process_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(process_handle); R_UNLESS(process.IsNotNull(), ResultInvalidHandle); // Validate that the address is in range. @@ -174,7 +174,7 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst } const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); - KScopedAutoObject process = handle_table.GetObject(process_handle); + KScopedAutoObject process = handle_table.GetObjectWith(process_handle); if (process.IsNull()) { LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle=0x{:08X}).", process_handle); @@ -234,7 +234,7 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d } const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); - KScopedAutoObject process = handle_table.GetObject(process_handle); + KScopedAutoObject process = handle_table.GetObjectWith(process_handle); if (process.IsNull()) { LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle=0x{:08X}).", process_handle); diff --git a/src/core/hle/kernel/svc/svc_query_memory.cpp b/src/core/hle/kernel/svc/svc_query_memory.cpp index 816dcb8d0f..d2c868fc62 100644 --- a/src/core/hle/kernel/svc/svc_query_memory.cpp +++ b/src/core/hle/kernel/svc/svc_query_memory.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -23,7 +26,7 @@ Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageIn Handle process_handle, uint64_t address) { LOG_TRACE(Kernel_SVC, "called process=0x{:08X} address={:X}", process_handle, address); const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); - KScopedAutoObject process = handle_table.GetObject(process_handle); + KScopedAutoObject process = handle_table.GetObjectWith(process_handle); if (process.IsNull()) { LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle=0x{:08X}", process_handle); diff --git a/src/core/hle/kernel/svc/svc_resource_limit.cpp b/src/core/hle/kernel/svc/svc_resource_limit.cpp index 6f3972482f..d6067f0f62 100644 --- a/src/core/hle/kernel/svc/svc_resource_limit.cpp +++ b/src/core/hle/kernel/svc/svc_resource_limit.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -43,7 +46,7 @@ Result GetResourceLimitLimitValue(Core::System& system, s64* out_limit_value, // Get the resource limit. KScopedAutoObject resource_limit = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(resource_limit_handle); + .GetObjectWith(resource_limit_handle); R_UNLESS(resource_limit.IsNotNull(), ResultInvalidHandle); // Get the limit value. @@ -63,7 +66,7 @@ Result GetResourceLimitCurrentValue(Core::System& system, s64* out_current_value // Get the resource limit. KScopedAutoObject resource_limit = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(resource_limit_handle); + .GetObjectWith(resource_limit_handle); R_UNLESS(resource_limit.IsNotNull(), ResultInvalidHandle); // Get the current value. @@ -83,7 +86,7 @@ Result SetResourceLimitLimitValue(Core::System& system, Handle resource_limit_ha // Get the resource limit. KScopedAutoObject resource_limit = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(resource_limit_handle); + .GetObjectWith(resource_limit_handle); R_UNLESS(resource_limit.IsNotNull(), ResultInvalidHandle); // Set the limit value. diff --git a/src/core/hle/kernel/svc/svc_session.cpp b/src/core/hle/kernel/svc/svc_session.cpp index b034d21d15..45d2bc8aea 100644 --- a/src/core/hle/kernel/svc/svc_session.cpp +++ b/src/core/hle/kernel/svc/svc_session.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -105,7 +108,7 @@ Result AcceptSession(Core::System& system, Handle* out, Handle port_handle) { auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); // Get the server port. - KScopedAutoObject port = handle_table.GetObject(port_handle); + KScopedAutoObject port = handle_table.GetObjectWith(port_handle); R_UNLESS(port.IsNotNull(), ResultInvalidHandle); // Reserve an entry for the new session. diff --git a/src/core/hle/kernel/svc/svc_shared_memory.cpp b/src/core/hle/kernel/svc/svc_shared_memory.cpp index 3ca07abe8b..421b67fd67 100644 --- a/src/core/hle/kernel/svc/svc_shared_memory.cpp +++ b/src/core/hle/kernel/svc/svc_shared_memory.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -49,7 +49,7 @@ Result MapSharedMemory(Core::System& system, Handle shmem_handle, u64 address, u auto& page_table = process.GetPageTable(); // Get the shared memory. - KScopedAutoObject shmem = process.GetHandleTable().GetObject(shmem_handle); + KScopedAutoObject shmem = process.GetHandleTable().GetObjectWith(shmem_handle); R_UNLESS(shmem.IsNotNull(), ResultInvalidHandle); // Verify that the mapping is in range. @@ -79,7 +79,7 @@ Result UnmapSharedMemory(Core::System& system, Handle shmem_handle, u64 address, auto& page_table = process.GetPageTable(); // Get the shared memory. - KScopedAutoObject shmem = process.GetHandleTable().GetObject(shmem_handle); + KScopedAutoObject shmem = process.GetHandleTable().GetObjectWith(shmem_handle); R_UNLESS(shmem.IsNotNull(), ResultInvalidHandle); // Verify that the mapping is in range. diff --git a/src/core/hle/kernel/svc/svc_synchronization.cpp b/src/core/hle/kernel/svc/svc_synchronization.cpp index fdd4408d4d..f42f57eb3d 100644 --- a/src/core/hle/kernel/svc/svc_synchronization.cpp +++ b/src/core/hle/kernel/svc/svc_synchronization.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -35,7 +35,7 @@ Result ResetSignal(Core::System& system, Handle handle) { // Try to reset as readable event. { - KScopedAutoObject readable_event = handle_table.GetObject(handle); + KScopedAutoObject readable_event = handle_table.GetObjectWith(handle); if (readable_event.IsNotNull()) { R_RETURN(readable_event->Reset()); } @@ -43,7 +43,7 @@ Result ResetSignal(Core::System& system, Handle handle) { // Try to reset as process. { - KScopedAutoObject process = handle_table.GetObject(handle); + KScopedAutoObject process = handle_table.GetObjectWith(handle); if (process.IsNotNull()) { R_RETURN(process->Reset()); } @@ -112,7 +112,7 @@ Result CancelSynchronization(Core::System& system, Handle handle) { // Get the thread from its handle. KScopedAutoObject thread = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Cancel the thread's wait. diff --git a/src/core/hle/kernel/svc/svc_thread.cpp b/src/core/hle/kernel/svc/svc_thread.cpp index ca5ce6fe07..c14e7e5e63 100644 --- a/src/core/hle/kernel/svc/svc_thread.cpp +++ b/src/core/hle/kernel/svc/svc_thread.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -84,7 +84,7 @@ Result StartThread(Core::System& system, Handle thread_handle) { // Get the thread from its handle. KScopedAutoObject thread = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(thread_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(thread_handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Try to start the thread. @@ -146,7 +146,7 @@ Result GetThreadContext3(Core::System& system, u64 out_context, Handle thread_ha // Get the thread from its handle. KScopedAutoObject thread = - GetCurrentProcess(kernel).GetHandleTable().GetObject(thread_handle); + GetCurrentProcess(kernel).GetHandleTable().GetObjectWith(thread_handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Require the handle be to a non-current thread in the current process. @@ -171,7 +171,7 @@ Result GetThreadPriority(Core::System& system, s32* out_priority, Handle handle) // Get the thread from its handle. KScopedAutoObject thread = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Get the thread's priority. @@ -190,7 +190,7 @@ Result SetThreadPriority(Core::System& system, Handle thread_handle, s32 priorit R_UNLESS(process.CheckThreadPriority(priority), ResultInvalidPriority); // Get the thread from its handle. - KScopedAutoObject thread = process.GetHandleTable().GetObject(thread_handle); + KScopedAutoObject thread = process.GetHandleTable().GetObjectWith(thread_handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Set the thread priority. @@ -244,7 +244,7 @@ Result GetThreadCoreMask(Core::System& system, s32* out_core_id, u64* out_affini // Get the thread from its handle. KScopedAutoObject thread = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(thread_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(thread_handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Get the core mask. @@ -274,7 +274,7 @@ Result SetThreadCoreMask(Core::System& system, Handle thread_handle, s32 core_id // Get the thread from its handle. KScopedAutoObject thread = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(thread_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(thread_handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Set the core mask. @@ -285,7 +285,7 @@ Result SetThreadCoreMask(Core::System& system, Handle thread_handle, s32 core_id Result GetThreadId(Core::System& system, u64* out_thread_id, Handle thread_handle) { // Get the thread from its handle. KScopedAutoObject thread = - GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject(thread_handle); + GetCurrentProcess(system.Kernel()).GetHandleTable().GetObjectWith(thread_handle); R_UNLESS(thread.IsNotNull(), ResultInvalidHandle); // Get the thread's id. diff --git a/src/core/hle/kernel/svc/svc_transfer_memory.cpp b/src/core/hle/kernel/svc/svc_transfer_memory.cpp index 2ea0d44215..a5c190c2e3 100644 --- a/src/core/hle/kernel/svc/svc_transfer_memory.cpp +++ b/src/core/hle/kernel/svc/svc_transfer_memory.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -86,7 +89,7 @@ Result MapTransferMemory(Core::System& system, Handle trmem_handle, uint64_t add // Get the transfer memory. KScopedAutoObject trmem = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(trmem_handle); + .GetObjectWith(trmem_handle); R_UNLESS(trmem.IsNotNull(), ResultInvalidHandle); // Verify that the mapping is in range. @@ -113,7 +116,7 @@ Result UnmapTransferMemory(Core::System& system, Handle trmem_handle, uint64_t a // Get the transfer memory. KScopedAutoObject trmem = GetCurrentProcess(system.Kernel()) .GetHandleTable() - .GetObject(trmem_handle); + .GetObjectWith(trmem_handle); R_UNLESS(trmem.IsNotNull(), ResultInvalidHandle); // Verify that the mapping is in range. diff --git a/src/core/hle/kernel/svc_types.h b/src/core/hle/kernel/svc_types.h index fce3dea476..8d3369ce33 100644 --- a/src/core/hle/kernel/svc_types.h +++ b/src/core/hle/kernel/svc_types.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project @@ -177,7 +177,7 @@ enum class BreakReason : u32 { DECLARE_ENUM_FLAG_OPERATORS(BreakReason); enum class DebugEvent : u32 { - CreateProcess = 0, + CreateProcessWith = 0, CreateThread = 1, ExitProcess = 2, ExitThread = 3, diff --git a/src/core/hle/service/acc/async_context.cpp b/src/core/hle/service/acc/async_context.cpp index c9e0af90ce..eb7251506d 100644 --- a/src/core/hle/service/acc/async_context.cpp +++ b/src/core/hle/service/acc/async_context.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -20,7 +23,7 @@ IAsyncContext::IAsyncContext(Core::System& system_) RegisterHandlers(functions); - completion_event = service_context.CreateEvent("IAsyncContext:CompletionEvent"); + completion_event = service_context.CreateEventWith("IAsyncContext:CompletionEvent"); } IAsyncContext::~IAsyncContext() { diff --git a/src/core/hle/service/am/applet_manager.cpp b/src/core/hle/service/am/applet_manager.cpp index c2920f91ae..7eb97d01d7 100644 --- a/src/core/hle/service/am/applet_manager.cpp +++ b/src/core/hle/service/am/applet_manager.cpp @@ -267,7 +267,7 @@ void AppletManager::SetWindowSystem(WindowSystem* window_system) { m_cv.wait(lk, [&] { return m_pending_process != nullptr; }); if (Settings::values.enable_overlay && m_window_system->GetOverlayDisplayApplet() == nullptr) { - if (auto overlay_process = CreateProcess(m_system, static_cast(AppletProgramId::OverlayDisplay), 0, 0)) { + if (auto overlay_process = CreateProcessWith(m_system, static_cast(AppletProgramId::OverlayDisplay), 0, 0)) { auto overlay_applet = std::make_shared(m_system, std::move(overlay_process), false); overlay_applet->program_id = static_cast(AppletProgramId::OverlayDisplay); overlay_applet->applet_id = AppletId::OverlayDisplay; diff --git a/src/core/hle/service/am/frontend/applet_cabinet.cpp b/src/core/hle/service/am/frontend/applet_cabinet.cpp index 24c249fcce..de8b0bd71b 100644 --- a/src/core/hle/service/am/frontend/applet_cabinet.cpp +++ b/src/core/hle/service/am/frontend/applet_cabinet.cpp @@ -26,7 +26,7 @@ Cabinet::Cabinet(Core::System& system_, std::shared_ptr applet_, "CabinetApplet"} { availability_change_event = - service_context.CreateEvent("CabinetApplet:AvailabilityChangeEvent"); + service_context.CreateEventWith("CabinetApplet:AvailabilityChangeEvent"); } Cabinet::~Cabinet() { diff --git a/src/core/hle/service/am/process_creation.cpp b/src/core/hle/service/am/process_creation.cpp index b5e31353a2..2127e0f09d 100644 --- a/src/core/hle/service/am/process_creation.cpp +++ b/src/core/hle/service/am/process_creation.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -59,7 +62,7 @@ std::unique_ptr CreateProcessImpl(std::unique_ptr& o } // Anonymous namespace -std::unique_ptr CreateProcess(Core::System& system, u64 program_id, +std::unique_ptr CreateProcessWith(Core::System& system, u64 program_id, u8 minimum_key_generation, u8 maximum_key_generation) { // Attempt to load program NCA. FileSys::VirtualFile nca_raw{}; diff --git a/src/core/hle/service/am/process_creation.h b/src/core/hle/service/am/process_creation.h index 8cfb9e0c9e..4830851425 100644 --- a/src/core/hle/service/am/process_creation.h +++ b/src/core/hle/service/am/process_creation.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -24,7 +27,7 @@ class Process; namespace Service::AM { -std::unique_ptr CreateProcess(Core::System& system, u64 program_id, +std::unique_ptr CreateProcessWith(Core::System& system, u64 program_id, u8 minimum_key_generation, u8 maximum_key_generation); std::unique_ptr CreateApplicationProcess(std::vector& out_control, std::unique_ptr& out_loader, diff --git a/src/core/hle/service/am/service/application_creator.cpp b/src/core/hle/service/am/service/application_creator.cpp index d16fd7dd84..70c635b6f6 100644 --- a/src/core/hle/service/am/service/application_creator.cpp +++ b/src/core/hle/service/am/service/application_creator.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -92,7 +92,7 @@ Result IApplicationCreator::CreateSystemApplication( std::unique_ptr loader; auto process = - CreateProcess(system, application_id, 1, 21); + CreateProcessWith(system, application_id, 1, 21); R_UNLESS(process != nullptr, ResultUnknown); const auto applet = std::make_shared(system, std::move(process), true); diff --git a/src/core/hle/service/am/service/library_applet_creator.cpp b/src/core/hle/service/am/service/library_applet_creator.cpp index e38729e70a..5ed0d6b3d4 100644 --- a/src/core/hle/service/am/service/library_applet_creator.cpp +++ b/src/core/hle/service/am/service/library_applet_creator.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -120,7 +120,7 @@ std::shared_ptr CreateGuestApplet(Core::System& system, Firmware2100 = 21, }; - auto process = CreateProcess(system, program_id, Firmware1400, Firmware2100); + auto process = CreateProcessWith(system, program_id, Firmware1400, Firmware2100); if (!process) { // Couldn't initialize the guest process return {}; diff --git a/src/core/hle/service/aoc/addon_content_manager.cpp b/src/core/hle/service/aoc/addon_content_manager.cpp index 4d3e640bb3..162cb80619 100644 --- a/src/core/hle/service/aoc/addon_content_manager.cpp +++ b/src/core/hle/service/aoc/addon_content_manager.cpp @@ -81,7 +81,7 @@ IAddOnContentManager::IAddOnContentManager(Core::System& system_) RegisterHandlers(functions); - aoc_change_event = service_context.CreateEvent("GetAddOnContentListChanged:Event"); + aoc_change_event = service_context.CreateEventWith("GetAddOnContentListChanged:Event"); } IAddOnContentManager::~IAddOnContentManager() { diff --git a/src/core/hle/service/aoc/purchase_event_manager.cpp b/src/core/hle/service/aoc/purchase_event_manager.cpp index 9e718510b4..deb00464df 100644 --- a/src/core/hle/service/aoc/purchase_event_manager.cpp +++ b/src/core/hle/service/aoc/purchase_event_manager.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -23,7 +26,7 @@ IPurchaseEventManager::IPurchaseEventManager(Core::System& system_) RegisterHandlers(functions); - purchased_event = service_context.CreateEvent("IPurchaseEventManager:PurchasedEvent"); + purchased_event = service_context.CreateEventWith("IPurchaseEventManager:PurchasedEvent"); } IPurchaseEventManager::~IPurchaseEventManager() { diff --git a/src/core/hle/service/audio/audio_controller.cpp b/src/core/hle/service/audio/audio_controller.cpp index 611e48e8ba..747183c3b0 100644 --- a/src/core/hle/service/audio/audio_controller.cpp +++ b/src/core/hle/service/audio/audio_controller.cpp @@ -1,7 +1,7 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project @@ -91,7 +91,7 @@ IAudioController::IAudioController(Core::System& system_) m_set_sys = system.ServiceManager().GetService("set:sys", true); - notification_event = service_context.CreateEvent("IAudioController:NotificationEvent"); + notification_event = service_context.CreateEventWith("IAudioController:NotificationEvent"); // Probably shouldn't do this in constructor? try { diff --git a/src/core/hle/service/audio/audio_device.cpp b/src/core/hle/service/audio/audio_device.cpp index eb64892ed8..8c3e0191b5 100644 --- a/src/core/hle/service/audio/audio_device.cpp +++ b/src/core/hle/service/audio/audio_device.cpp @@ -16,7 +16,7 @@ IAudioDevice::IAudioDevice(Core::System& system_, u64 applet_resource_user_id, u u32 device_num) : ServiceFramework{system_, "IAudioDevice"}, service_context{system_, "IAudioDevice"}, impl{std::make_unique(system_, applet_resource_user_id, revision)}, - event{service_context.CreateEvent(fmt::format("IAudioDeviceEvent-{}", device_num))} { + event{service_context.CreateEventWith(fmt::format("IAudioDeviceEvent-{}", device_num))} { static const FunctionInfo functions[] = { {0, D<&IAudioDevice::ListAudioDeviceName>, "ListAudioDeviceName"}, {1, D<&IAudioDevice::SetAudioDeviceOutputVolume>, "SetAudioDeviceOutputVolume"}, diff --git a/src/core/hle/service/audio/audio_in.cpp b/src/core/hle/service/audio/audio_in.cpp index c3f0e6aa57..8eb4c6bc2b 100644 --- a/src/core/hle/service/audio/audio_in.cpp +++ b/src/core/hle/service/audio/audio_in.cpp @@ -14,7 +14,7 @@ IAudioIn::IAudioIn(Core::System& system_, AudioCore::AudioIn::Manager& manager, const std::string& device_name, const AudioCore::AudioIn::AudioInParameter& in_params, Kernel::KProcess* handle, u64 applet_resource_user_id) : ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"}, - event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared(system_, + event{service_context.CreateEventWith("AudioInEvent")}, impl{std::make_shared(system_, manager, event, session_id)} { // clang-format off diff --git a/src/core/hle/service/audio/audio_out.cpp b/src/core/hle/service/audio/audio_out.cpp index f53eeb7814..18229db4a5 100644 --- a/src/core/hle/service/audio/audio_out.cpp +++ b/src/core/hle/service/audio/audio_out.cpp @@ -18,7 +18,7 @@ IAudioOut::IAudioOut(Core::System& system_, AudioCore::AudioOut::Manager& manage const std::string& device_name, const AudioCore::AudioOut::AudioOutParameter& in_params, Kernel::KProcess* handle, u64 applet_resource_user_id) : ServiceFramework{system_, "IAudioOut"}, service_context{system_, "IAudioOut"}, - event{service_context.CreateEvent("AudioOutEvent")}, process{handle}, + event{service_context.CreateEventWith("AudioOutEvent")}, process{handle}, impl{std::make_shared(system_, manager, event, session_id)} { // clang-format off diff --git a/src/core/hle/service/audio/audio_renderer.cpp b/src/core/hle/service/audio/audio_renderer.cpp index 654e70fde2..217e77dd6a 100644 --- a/src/core/hle/service/audio/audio_renderer.cpp +++ b/src/core/hle/service/audio/audio_renderer.cpp @@ -16,7 +16,7 @@ IAudioRenderer::IAudioRenderer(Core::System& system_, AudioCore::Renderer::Manag Kernel::KProcess* process_handle_, u64 applet_resource_user_id, s32 session_id) : ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"}, - rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_}, + rendered_event{service_context.CreateEventWith("IAudioRendererEvent")}, manager{manager_}, impl{std::make_unique(system_, manager, rendered_event)}, process_handle{process_handle_} { // clang-format off static const FunctionInfo functions[] = { diff --git a/src/core/hle/service/bcat/backend/backend.cpp b/src/core/hle/service/bcat/backend/backend.cpp index 491416254c..62c9b4e4dd 100644 --- a/src/core/hle/service/bcat/backend/backend.cpp +++ b/src/core/hle/service/bcat/backend/backend.cpp @@ -14,7 +14,7 @@ namespace Service::BCAT { ProgressServiceBackend::ProgressServiceBackend(Core::System& system, std::string_view event_name) : service_context{system, "ProgressServiceBackend"} { - update_event = service_context.CreateEvent("ProgressServiceBackend:UpdateEvent:" + + update_event = service_context.CreateEventWith("ProgressServiceBackend:UpdateEvent:" + std::string(event_name)); } diff --git a/src/core/hle/service/bcat/news/newly_arrived_event_holder.cpp b/src/core/hle/service/bcat/news/newly_arrived_event_holder.cpp index ed393f7a26..aebad5a95c 100644 --- a/src/core/hle/service/bcat/news/newly_arrived_event_holder.cpp +++ b/src/core/hle/service/bcat/news/newly_arrived_event_holder.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later @@ -17,7 +20,7 @@ INewlyArrivedEventHolder::INewlyArrivedEventHolder(Core::System& system_) // clang-format on RegisterHandlers(functions); - arrived_event = service_context.CreateEvent("INewlyArrivedEventHolder::ArrivedEvent"); + arrived_event = service_context.CreateEventWith("INewlyArrivedEventHolder::ArrivedEvent"); } INewlyArrivedEventHolder::~INewlyArrivedEventHolder() { diff --git a/src/core/hle/service/bcat/news/overwrite_event_holder.cpp b/src/core/hle/service/bcat/news/overwrite_event_holder.cpp index 1712971e4d..b0a28f2078 100644 --- a/src/core/hle/service/bcat/news/overwrite_event_holder.cpp +++ b/src/core/hle/service/bcat/news/overwrite_event_holder.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later @@ -16,7 +19,7 @@ IOverwriteEventHolder::IOverwriteEventHolder(Core::System& system_) // clang-format on RegisterHandlers(functions); - overwrite_event = service_context.CreateEvent("IOverwriteEventHolder::OverwriteEvent"); + overwrite_event = service_context.CreateEventWith("IOverwriteEventHolder::OverwriteEvent"); } IOverwriteEventHolder::~IOverwriteEventHolder() { diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp index 256a722a84..406548fdac 100644 --- a/src/core/hle/service/btdrv/btdrv.cpp +++ b/src/core/hle/service/btdrv/btdrv.cpp @@ -37,7 +37,7 @@ public: // clang-format on RegisterHandlers(functions); - register_event = service_context.CreateEvent("BT:RegisterEvent"); + register_event = service_context.CreateEventWith("BT:RegisterEvent"); } ~IBluetoothUser() override { diff --git a/src/core/hle/service/btm/btm_system_core.cpp b/src/core/hle/service/btm/btm_system_core.cpp index f1e623be16..dc7acf24d1 100644 --- a/src/core/hle/service/btm/btm_system_core.cpp +++ b/src/core/hle/service/btm/btm_system_core.cpp @@ -44,9 +44,9 @@ IBtmSystemCore::IBtmSystemCore(Core::System& system_) // clang-format on RegisterHandlers(functions); - radio_event = service_context.CreateEvent("IBtmSystemCore::RadioEvent"); + radio_event = service_context.CreateEventWith("IBtmSystemCore::RadioEvent"); audio_device_connection_event = - service_context.CreateEvent("IBtmSystemCore::AudioDeviceConnectionEvent"); + service_context.CreateEventWith("IBtmSystemCore::AudioDeviceConnectionEvent"); m_set_sys = system.ServiceManager().GetService("set:sys", true); diff --git a/src/core/hle/service/btm/btm_user_core.cpp b/src/core/hle/service/btm/btm_user_core.cpp index b120df14c0..95bccbfa97 100644 --- a/src/core/hle/service/btm/btm_user_core.cpp +++ b/src/core/hle/service/btm/btm_user_core.cpp @@ -54,10 +54,10 @@ IBtmUserCore::IBtmUserCore(Core::System& system_) // clang-format on RegisterHandlers(functions); - scan_event = service_context.CreateEvent("IBtmUserCore:ScanEvent"); - connection_event = service_context.CreateEvent("IBtmUserCore:ConnectionEvent"); - service_discovery_event = service_context.CreateEvent("IBtmUserCore:DiscoveryEvent"); - config_event = service_context.CreateEvent("IBtmUserCore:ConfigEvent"); + scan_event = service_context.CreateEventWith("IBtmUserCore:ScanEvent"); + connection_event = service_context.CreateEventWith("IBtmUserCore:ConnectionEvent"); + service_discovery_event = service_context.CreateEventWith("IBtmUserCore:DiscoveryEvent"); + config_event = service_context.CreateEventWith("IBtmUserCore:ConfigEvent"); } IBtmUserCore::~IBtmUserCore() { diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index b851de8496..96036b7b1d 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp @@ -120,7 +120,7 @@ public: RegisterHandlers(functions); - completion_event = service_context.CreateEvent("IFriendService:CompletionEvent"); + completion_event = service_context.CreateEventWith("IFriendService:CompletionEvent"); } ~IFriendService() override { @@ -366,7 +366,7 @@ public: RegisterHandlers(functions); - notification_event = service_context.CreateEvent("INotificationService:NotifyEvent"); + notification_event = service_context.CreateEventWith("INotificationService:NotifyEvent"); } ~INotificationService() override { diff --git a/src/core/hle/service/glue/notif.cpp b/src/core/hle/service/glue/notif.cpp index 49811bff4f..87e4094dbe 100644 --- a/src/core/hle/service/glue/notif.cpp +++ b/src/core/hle/service/glue/notif.cpp @@ -191,7 +191,7 @@ public: RegisterHandlers(functions); notification_event = - service_context.CreateEvent("INotificationSystemEventAccessor:NotificationEvent"); + service_context.CreateEventWith("INotificationSystemEventAccessor:NotificationEvent"); } ~INotificationSystemEventAccessor() { diff --git a/src/core/hle/service/glue/time/alarm_worker.cpp b/src/core/hle/service/glue/time/alarm_worker.cpp index 3ff071f4a0..409fc7b338 100644 --- a/src/core/hle/service/glue/time/alarm_worker.cpp +++ b/src/core/hle/service/glue/time/alarm_worker.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -23,8 +26,8 @@ AlarmWorker::~AlarmWorker() { void AlarmWorker::Initialize(std::shared_ptr time_m) { m_time_m = std::move(time_m); - m_timer_event = m_ctx.CreateEvent("Glue:AlarmWorker:TimerEvent"); - m_timer_timing_event = Core::Timing::CreateEvent( + m_timer_event = m_ctx.CreateEventWith("Glue:AlarmWorker:TimerEvent"); + m_timer_timing_event = Core::Timing::CreateEventWith( "Glue:AlarmWorker::AlarmTimer", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { diff --git a/src/core/hle/service/glue/time/time_zone.cpp b/src/core/hle/service/glue/time/time_zone.cpp index c358cfbf28..51c73e2114 100644 --- a/src/core/hle/service/glue/time/time_zone.cpp +++ b/src/core/hle/service/glue/time/time_zone.cpp @@ -172,7 +172,7 @@ Result TimeZoneService::GetDeviceLocationNameOperationEventReadableHandle( m_operation_event.m_ctx.CloseEvent(m_operation_event.m_event); m_operation_event.m_event = - m_operation_event.m_ctx.CreateEvent("Psc:TimeZoneService:OperationEvent"); + m_operation_event.m_ctx.CreateEventWith("Psc:TimeZoneService:OperationEvent"); operation_event_initialized = true; std::scoped_lock l{m_mutex}; m_list_nodes.push_back(m_operation_event); diff --git a/src/core/hle/service/glue/time/worker.cpp b/src/core/hle/service/glue/time/worker.cpp index 1dab3e9dcb..bde4b5d13c 100644 --- a/src/core/hle/service/glue/time/worker.cpp +++ b/src/core/hle/service/glue/time/worker.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -19,14 +22,14 @@ namespace Service::Glue::Time { TimeWorker::TimeWorker(Core::System& system, StandardSteadyClockResource& steady_clock_resource, FileTimestampWorker& file_timestamp_worker) - : m_system{system}, m_ctx{m_system, "Glue:TimeWorker"}, m_event{m_ctx.CreateEvent( + : m_system{system}, m_ctx{m_system, "Glue:TimeWorker"}, m_event{m_ctx.CreateEventWith( "Glue:TimeWorker:Event")}, m_steady_clock_resource{steady_clock_resource}, - m_file_timestamp_worker{file_timestamp_worker}, m_timer_steady_clock{m_ctx.CreateEvent( + m_file_timestamp_worker{file_timestamp_worker}, m_timer_steady_clock{m_ctx.CreateEventWith( "Glue:TimeWorker:SteadyClockTimerEvent")}, - m_timer_file_system{m_ctx.CreateEvent("Glue:TimeWorker:FileTimeTimerEvent")}, + m_timer_file_system{m_ctx.CreateEventWith("Glue:TimeWorker:FileTimeTimerEvent")}, m_alarm_worker{m_system, m_steady_clock_resource}, m_pm_state_change_handler{m_alarm_worker} { - m_timer_steady_clock_timing_event = Core::Timing::CreateEvent( + m_timer_steady_clock_timing_event = Core::Timing::CreateEventWith( "Time::SteadyClockEvent", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { @@ -34,7 +37,7 @@ TimeWorker::TimeWorker(Core::System& system, StandardSteadyClockResource& steady return std::nullopt; }); - m_timer_file_system_timing_event = Core::Timing::CreateEvent( + m_timer_file_system_timing_event = Core::Timing::CreateEventWith( "Time::SteadyClockEvent", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { diff --git a/src/core/hle/service/hid/hid_system_server.cpp b/src/core/hle/service/hid/hid_system_server.cpp index 1de5dd6f28..b7c956c7e6 100644 --- a/src/core/hle/service/hid/hid_system_server.cpp +++ b/src/core/hle/service/hid/hid_system_server.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -249,13 +249,13 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr std::optional { diff --git a/src/core/hle/service/kernel_helpers.cpp b/src/core/hle/service/kernel_helpers.cpp index f080f7ffa2..56e730cc5d 100644 --- a/src/core/hle/service/kernel_helpers.cpp +++ b/src/core/hle/service/kernel_helpers.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -36,7 +39,7 @@ ServiceContext::~ServiceContext() { } } -Kernel::KEvent* ServiceContext::CreateEvent(std::string&& name) { +Kernel::KEvent* ServiceContext::CreateEventWith(std::string&& name) { // Reserve a new event from the process resource limit Kernel::KScopedResourceReservation event_reservation(process, Kernel::LimitableResource::EventCountMax); diff --git a/src/core/hle/service/kernel_helpers.h b/src/core/hle/service/kernel_helpers.h index eca9aefb52..23c5a67d1c 100644 --- a/src/core/hle/service/kernel_helpers.h +++ b/src/core/hle/service/kernel_helpers.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -22,7 +25,7 @@ public: ServiceContext(Core::System& system_, std::string name_); ~ServiceContext(); - Kernel::KEvent* CreateEvent(std::string&& name); + Kernel::KEvent* CreateEventWith(std::string&& name); void CloseEvent(Kernel::KEvent* event); diff --git a/src/core/hle/service/ldn/user_local_communication_service.cpp b/src/core/hle/service/ldn/user_local_communication_service.cpp index 1e984a9782..6b31984c59 100644 --- a/src/core/hle/service/ldn/user_local_communication_service.cpp +++ b/src/core/hle/service/ldn/user_local_communication_service.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later @@ -16,9 +16,6 @@ #include "core/internal_network/network_interface.h" #include "network/network.h" -// This is defined by synchapi.h and conflicts with ServiceContext::CreateEvent -#undef CreateEvent - namespace Service::LDN { IUserLocalCommunicationService::IUserLocalCommunicationService(Core::System& system_) @@ -63,7 +60,7 @@ IUserLocalCommunicationService::IUserLocalCommunicationService(Core::System& sys RegisterHandlers(functions); state_change_event = - service_context.CreateEvent("IUserLocalCommunicationService:StateChangeEvent"); + service_context.CreateEventWith("IUserLocalCommunicationService:StateChangeEvent"); } IUserLocalCommunicationService::~IUserLocalCommunicationService() { diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index ba58b3a093..7fc9e6ba45 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -27,7 +30,7 @@ public: explicit ProcessManager(Core::System& system_) : ServiceFramework{system_, "ldr:pm"} { // clang-format off static const FunctionInfo functions[] = { - {0, nullptr, "CreateProcess"}, + {0, nullptr, "CreateProcessWith"}, {1, nullptr, "GetProgramInfo"}, {2, nullptr, "PinProgram"}, {3, nullptr, "UnpinProgram"}, diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index faa2b1f584..f7989311fa 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -46,8 +46,8 @@ NfcDevice::NfcDevice(Core::HID::NpadIdType npad_id_, Core::System& system_, Kernel::KEvent* availability_change_event_) : npad_id{npad_id_}, system{system_}, service_context{service_context_}, availability_change_event{availability_change_event_} { - activate_event = service_context.CreateEvent("NFC:ActivateEvent"); - deactivate_event = service_context.CreateEvent("NFC:DeactivateEvent"); + activate_event = service_context.CreateEventWith("NFC:ActivateEvent"); + deactivate_event = service_context.CreateEventWith("NFC:DeactivateEvent"); npad_device = system.HIDCore().GetEmulatedController(npad_id); Core::HID::ControllerUpdateCallback engine_callback{ diff --git a/src/core/hle/service/nfc/common/device_manager.cpp b/src/core/hle/service/nfc/common/device_manager.cpp index a58b0f2aef..3004928755 100644 --- a/src/core/hle/service/nfc/common/device_manager.cpp +++ b/src/core/hle/service/nfc/common/device_manager.cpp @@ -27,7 +27,7 @@ DeviceManager::DeviceManager(Core::System& system_, KernelHelpers::ServiceContex : system{system_}, service_context{service_context_} { availability_change_event = - service_context.CreateEvent("Nfc:DeviceManager:AvailabilityChangeEvent"); + service_context.CreateEventWith("Nfc:DeviceManager:AvailabilityChangeEvent"); for (u32 device_index = 0; device_index < devices.size(); device_index++) { devices[device_index] = diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 3ce8eb4eef..d3e791d2b5 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -28,7 +28,6 @@ #ifdef _WIN32 #include -#undef CreateEvent #pragma push_macro("interface") #undef interface #include @@ -40,10 +39,10 @@ namespace { -// Avoids name conflict with Windows' CreateEvent macro. +// Avoids name conflict with Windows' CreateEventWith macro. [[nodiscard]] Kernel::KEvent* CreateKEvent(Service::KernelHelpers::ServiceContext& service_context, std::string&& name) { - return service_context.CreateEvent(std::move(name)); + return service_context.CreateEventWith(std::move(name)); } } // Anonymous namespace diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp index 4f465c5da7..a438d34dd8 100644 --- a/src/core/hle/service/nim/nim.cpp +++ b/src/core/hle/service/nim/nim.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project @@ -418,7 +418,7 @@ public: RegisterHandlers(functions); finished_event = - service_context.CreateEvent("IEnsureNetworkClockAvailabilityService:FinishEvent"); + service_context.CreateEventWith("IEnsureNetworkClockAvailabilityService:FinishEvent"); } ~IEnsureNetworkClockAvailabilityService() override { diff --git a/src/core/hle/service/ns/read_only_application_control_data_interface.cpp b/src/core/hle/service/ns/read_only_application_control_data_interface.cpp index 03f0a17865..4d21f59ab6 100644 --- a/src/core/hle/service/ns/read_only_application_control_data_interface.cpp +++ b/src/core/hle/service/ns/read_only_application_control_data_interface.cpp @@ -86,7 +86,7 @@ public: }; RegisterHandlers(functions); - completion_event = service_context.CreateEvent("IAsyncValue:Completion"); + completion_event = service_context.CreateEventWith("IAsyncValue:Completion"); completion_event->GetReadableEvent().Signal(); } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index b2580f2bb9..ded81315e5 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -332,7 +332,7 @@ void nvhost_ctrl::CreateNvEvent(u32 event_id) { ASSERT(!event.kevent); ASSERT(!event.registered); ASSERT(!event.IsBeingUsed()); - event.kevent = events_interface.CreateEvent(fmt::format("NVCTRL::NvEvent_{}", event_id)); + event.kevent = events_interface.CreateEventWith(fmt::format("NVCTRL::NvEvent_{}", event_id)); event.status = EventState::Available; event.registered = true; const u64 mask = 1ULL << event_id; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index ace1f7e8f7..5850f314d6 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp @@ -17,8 +17,8 @@ namespace Service::Nvidia::Devices { nvhost_ctrl_gpu::nvhost_ctrl_gpu(Core::System& system_, EventInterface& events_interface_) : nvdevice{system_}, events_interface{events_interface_} { - error_notifier_event = events_interface.CreateEvent("CtrlGpuErrorNotifier"); - unknown_event = events_interface.CreateEvent("CtrlGpuUnknownEvent"); + error_notifier_event = events_interface.CreateEventWith("CtrlGpuErrorNotifier"); + unknown_event = events_interface.CreateEventWith("CtrlGpuUnknownEvent"); } nvhost_ctrl_gpu::~nvhost_ctrl_gpu() { events_interface.FreeEvent(error_notifier_event); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 5869bec903..491bb4d79d 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -38,10 +38,10 @@ nvhost_gpu::nvhost_gpu(Core::System& system_, EventInterface& events_interface_, channel_state{system.GPU().AllocateChannel()} { channel_syncpoint = syncpoint_manager.AllocateSyncpoint(false); sm_exception_breakpoint_int_report_event = - events_interface.CreateEvent("GpuChannelSMExceptionBreakpointInt"); + events_interface.CreateEventWith("GpuChannelSMExceptionBreakpointInt"); sm_exception_breakpoint_pause_report_event = - events_interface.CreateEvent("GpuChannelSMExceptionBreakpointPause"); - error_notifier_event = events_interface.CreateEvent("GpuChannelErrorNotifier"); + events_interface.CreateEventWith("GpuChannelSMExceptionBreakpointPause"); + error_notifier_event = events_interface.CreateEventWith("GpuChannelErrorNotifier"); } nvhost_gpu::~nvhost_gpu() { diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index 8c618ca258..0958bf4018 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: 2021 yuzu Emulator Project // SPDX-FileCopyrightText: 2021 Skyline Team and Contributors // SPDX-License-Identifier: GPL-3.0-or-later @@ -33,8 +36,8 @@ EventInterface::EventInterface(Module& module_) : module{module_}, guard{}, on_s EventInterface::~EventInterface() = default; -Kernel::KEvent* EventInterface::CreateEvent(std::string name) { - Kernel::KEvent* new_event = module.service_context.CreateEvent(std::move(name)); +Kernel::KEvent* EventInterface::CreateEventWith(std::string name) { + Kernel::KEvent* new_event = module.service_context.CreateEventWith(std::move(name)); return new_event; } diff --git a/src/core/hle/service/nvdrv/nvdrv.h b/src/core/hle/service/nvdrv/nvdrv.h index 329ac91c41..fc43366dbf 100644 --- a/src/core/hle/service/nvdrv/nvdrv.h +++ b/src/core/hle/service/nvdrv/nvdrv.h @@ -47,7 +47,7 @@ public: explicit EventInterface(Module& module_); ~EventInterface(); - Kernel::KEvent* CreateEvent(std::string name); + Kernel::KEvent* CreateEventWith(std::string name); void FreeEvent(Kernel::KEvent* event); diff --git a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp index 436b0f4b05..9ef5127d29 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp @@ -28,7 +28,7 @@ BufferQueueProducer::BufferQueueProducer(Service::KernelHelpers::ServiceContext& Service::Nvidia::NvCore::NvMap& nvmap_) : service_context{service_context_}, core{std::move(buffer_queue_core_)}, slots(core->slots), clock{Common::CreateOptimalClock()}, nvmap(nvmap_) { - buffer_wait_event = service_context.CreateEvent("BufferQueue:WaitEvent"); + buffer_wait_event = service_context.CreateEventWith("BufferQueue:WaitEvent"); } BufferQueueProducer::~BufferQueueProducer() { diff --git a/src/core/hle/service/olsc/native_handle_holder.cpp b/src/core/hle/service/olsc/native_handle_holder.cpp index d381714bc3..e59e377791 100644 --- a/src/core/hle/service/olsc/native_handle_holder.cpp +++ b/src/core/hle/service/olsc/native_handle_holder.cpp @@ -14,7 +14,7 @@ namespace Service::OLSC { INativeHandleHolder::INativeHandleHolder(Core::System& system_) : ServiceFramework{system_, "INativeHandleHolder"}, service_context{system_, "OLSC"} { - event = service_context.CreateEvent("OLSC::INativeHandleHolder"); + event = service_context.CreateEventWith("OLSC::INativeHandleHolder"); // clang-format off static const FunctionInfo functions[] = { {0, D<&INativeHandleHolder::GetNativeHandle>, "GetNativeHandle"}, diff --git a/src/core/hle/service/os/event.cpp b/src/core/hle/service/os/event.cpp index ec52c17fd8..95efa23476 100644 --- a/src/core/hle/service/os/event.cpp +++ b/src/core/hle/service/os/event.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -8,7 +11,7 @@ namespace Service { Event::Event(KernelHelpers::ServiceContext& ctx) { - m_event = ctx.CreateEvent("Event"); + m_event = ctx.CreateEventWith("Event"); } Event::~Event() { diff --git a/src/core/hle/service/psc/ovln/receiver.cpp b/src/core/hle/service/psc/ovln/receiver.cpp index f7d3882a05..945b71e3ff 100644 --- a/src/core/hle/service/psc/ovln/receiver.cpp +++ b/src/core/hle/service/psc/ovln/receiver.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -23,7 +23,7 @@ IReceiver::IReceiver(Core::System& system_) RegisterHandlers(functions); - receive_event = service_context.CreateEvent("IReceiver::ReceiveEvent"); + receive_event = service_context.CreateEventWith("IReceiver::ReceiveEvent"); } IReceiver::~IReceiver() { diff --git a/src/core/hle/service/psc/time/alarms.cpp b/src/core/hle/service/psc/time/alarms.cpp index 5e52c19f82..5399eb2079 100644 --- a/src/core/hle/service/psc/time/alarms.cpp +++ b/src/core/hle/service/psc/time/alarms.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -7,7 +10,7 @@ namespace Service::PSC::Time { Alarm::Alarm(Core::System& system, KernelHelpers::ServiceContext& ctx, AlarmType type) - : m_ctx{ctx}, m_event{ctx.CreateEvent("Psc:Alarm:Event")} { + : m_ctx{ctx}, m_event{ctx.CreateEventWith("Psc:Alarm:Event")} { m_event->Clear(); switch (type) { @@ -30,7 +33,7 @@ Alarm::~Alarm() { Alarms::Alarms(Core::System& system, StandardSteadyClockCore& steady_clock, PowerStateRequestManager& power_state_request_manager) : m_system{system}, m_ctx{system, "Psc:Alarms"}, m_steady_clock{steady_clock}, - m_power_state_request_manager{power_state_request_manager}, m_event{m_ctx.CreateEvent( + m_power_state_request_manager{power_state_request_manager}, m_event{m_ctx.CreateEventWith( "Psc:Alarms:Event")} {} Alarms::~Alarms() { diff --git a/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.cpp b/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.cpp index 31ed273966..62ae7ff84f 100644 --- a/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.cpp +++ b/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -11,7 +14,7 @@ StandardUserSystemClockCore::StandardUserSystemClockCore( StandardNetworkSystemClockCore& network_clock) : SystemClockCore{local_clock.GetSteadyClock()}, m_system{system}, m_ctx{m_system, "Psc:StandardUserSystemClockCore"}, m_local_system_clock{local_clock}, - m_network_system_clock{network_clock}, m_event{m_ctx.CreateEvent( + m_network_system_clock{network_clock}, m_event{m_ctx.CreateEventWith( "Psc:StandardUserSystemClockCore:Event")} {} StandardUserSystemClockCore::~StandardUserSystemClockCore() { diff --git a/src/core/hle/service/psc/time/common.cpp b/src/core/hle/service/psc/time/common.cpp index a6d9f02ca3..2017007baf 100644 --- a/src/core/hle/service/psc/time/common.cpp +++ b/src/core/hle/service/psc/time/common.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -7,7 +10,7 @@ namespace Service::PSC::Time { OperationEvent::OperationEvent(Core::System& system) : m_ctx{system, "Time:OperationEvent"}, m_event{ - m_ctx.CreateEvent("Time:OperationEvent:Event")} {} + m_ctx.CreateEventWith("Time:OperationEvent:Event")} {} OperationEvent::~OperationEvent() { m_ctx.CloseEvent(m_event); diff --git a/src/core/hle/service/psc/time/power_state_request_manager.cpp b/src/core/hle/service/psc/time/power_state_request_manager.cpp index b28b513649..faf2b30c3a 100644 --- a/src/core/hle/service/psc/time/power_state_request_manager.cpp +++ b/src/core/hle/service/psc/time/power_state_request_manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -11,7 +11,7 @@ namespace Service::PSC::Time { PowerStateRequestManager::PowerStateRequestManager(Core::System& system) : m_system{system}, m_ctx{system, "Psc:PowerStateRequestManager"}, - m_event{m_ctx.CreateEvent("Psc:PowerStateRequestManager:Event")} {} + m_event{m_ctx.CreateEventWith("Psc:PowerStateRequestManager:Event")} {} PowerStateRequestManager::~PowerStateRequestManager() { m_ctx.CloseEvent(m_event); diff --git a/src/core/hle/service/ptm/psm.cpp b/src/core/hle/service/ptm/psm.cpp index f144b8e497..0a0c04b0a1 100644 --- a/src/core/hle/service/ptm/psm.cpp +++ b/src/core/hle/service/ptm/psm.cpp @@ -32,7 +32,7 @@ public: RegisterHandlers(functions); - state_change_event = service_context.CreateEvent("IPsmSession::state_change_event"); + state_change_event = service_context.CreateEventWith("IPsmSession::state_change_event"); } ~IPsmSession() override { diff --git a/src/core/hle/service/vi/conductor.cpp b/src/core/hle/service/vi/conductor.cpp index 801a135dd7..8534ac1a7c 100644 --- a/src/core/hle/service/vi/conductor.cpp +++ b/src/core/hle/service/vi/conductor.cpp @@ -23,7 +23,7 @@ Conductor::Conductor(Core::System& system, Container& container, DisplayList& di }); if (system.IsMulticore()) { - m_event = Core::Timing::CreateEvent( + m_event = Core::Timing::CreateEventWith( "ScreenComposition", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { @@ -34,7 +34,7 @@ Conductor::Conductor(Core::System& system, Container& container, DisplayList& di system.CoreTiming().ScheduleLoopingEvent(FrameNs, FrameNs, m_event); m_thread = std::jthread([this](std::stop_token token) { this->VsyncThread(token); }); } else { - m_event = Core::Timing::CreateEvent( + m_event = Core::Timing::CreateEventWith( "ScreenComposition", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index dcfd23644f..3d46291889 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project @@ -233,7 +233,7 @@ CheatEngine::~CheatEngine() { } void CheatEngine::Initialize() { - event = Core::Timing::CreateEvent( + event = Core::Timing::CreateEventWith( "CheatEngine::FrameCallback::" + Common::HexToString(metadata.main_nso_build_id), [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { FrameCallback(ns_late); diff --git a/src/core/tools/freezer.cpp b/src/core/tools/freezer.cpp index 73a86b3c8c..f5985dfe0a 100644 --- a/src/core/tools/freezer.cpp +++ b/src/core/tools/freezer.cpp @@ -54,7 +54,7 @@ void MemoryWriteWidth(Core::Memory::Memory& memory, u32 width, VAddr addr, u64 v Freezer::Freezer(Core::Timing::CoreTiming& core_timing_, Core::Memory::Memory& memory_) : core_timing{core_timing_}, memory{memory_} { - event = Core::Timing::CreateEvent("MemoryFreezer::FrameCallback", + event = Core::Timing::CreateEventWith("MemoryFreezer::FrameCallback", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { FrameCallback(ns_late); diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp index f275727c17..3025aefdb1 100644 --- a/src/frontend_common/config.cpp +++ b/src/frontend_common/config.cpp @@ -928,10 +928,10 @@ void Config::ReadSettingGeneric(Settings::BasicSetting* const setting) { const bool is_default = ReadBooleanSetting(std::string(key).append("\\default"), std::make_optional(true)); if (!is_default) { - setting->LoadString(ReadStringSetting(key, default_value)); + setting->LoadStringWith(ReadStringSetting(key, default_value)); } else { // Empty string resets the Setting to default - setting->LoadString(""); + setting->LoadStringWith(""); } } } diff --git a/src/frontend_common/config.h b/src/frontend_common/config.h index 8a95b09e3a..daa2ae08c9 100644 --- a/src/frontend_common/config.h +++ b/src/frontend_common/config.h @@ -20,7 +20,7 @@ #include // Workaround for conflicting definition in libloaderapi.h caused by SimpleIni -#undef LoadString +#undef LoadStringWith #undef CreateAndOpenFile #undef DeleteAndUnlinkFile #undef CopyAndOpenFile diff --git a/src/hid_core/hidbus/hidbus_base.cpp b/src/hid_core/hidbus/hidbus_base.cpp index 632bb173b6..8499acc1ea 100644 --- a/src/hid_core/hidbus/hidbus_base.cpp +++ b/src/hid_core/hidbus/hidbus_base.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -11,7 +14,7 @@ namespace Service::HID { HidbusBase::HidbusBase(Core::System& system_, KernelHelpers::ServiceContext& service_context_) : system(system_), service_context(service_context_) { - send_command_async_event = service_context.CreateEvent("hidbus:SendCommandAsyncEvent"); + send_command_async_event = service_context.CreateEventWith("hidbus:SendCommandAsyncEvent"); } HidbusBase::~HidbusBase() { diff --git a/src/hid_core/resource_manager.cpp b/src/hid_core/resource_manager.cpp index 0c10d1bec9..911a5c0993 100644 --- a/src/hid_core/resource_manager.cpp +++ b/src/hid_core/resource_manager.cpp @@ -56,27 +56,27 @@ ResourceManager::ResourceManager(Core::System& system_, applet_resource = std::make_shared(system); // Register update callbacks - npad_update_event = Core::Timing::CreateEvent("HID::UpdatePadCallback", + npad_update_event = Core::Timing::CreateEventWith("HID::UpdatePadCallback", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { UpdateNpad(ns_late); return std::nullopt; }); - default_update_event = Core::Timing::CreateEvent( + default_update_event = Core::Timing::CreateEventWith( "HID::UpdateDefaultCallback", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { UpdateControllers(ns_late); return std::nullopt; }); - mouse_keyboard_update_event = Core::Timing::CreateEvent( + mouse_keyboard_update_event = Core::Timing::CreateEventWith( "HID::UpdateMouseKeyboardCallback", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { UpdateMouseKeyboard(ns_late); return std::nullopt; }); - motion_update_event = Core::Timing::CreateEvent( + motion_update_event = Core::Timing::CreateEventWith( "HID::UpdateMotionCallback", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { @@ -101,7 +101,7 @@ void ResourceManager::Initialize() { system.HIDCore().ReloadInputDevices(); - input_event = service_context.CreateEvent("ResourceManager:InputEvent"); + input_event = service_context.CreateEventWith("ResourceManager:InputEvent"); InitializeHandheldConfig(); InitializeHidCommonSampler(); @@ -267,7 +267,7 @@ void ResourceManager::InitializeTouchScreenSampler() { touch_screen = std::make_shared(touch_resource); gesture = std::make_shared(touch_resource); - touch_update_event = Core::Timing::CreateEvent( + touch_update_event = Core::Timing::CreateEventWith( "HID::TouchUpdateCallback", [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional { diff --git a/src/hid_core/resources/npad/npad_resource.cpp b/src/hid_core/resources/npad/npad_resource.cpp index 08546f8dc4..6ef65801a7 100644 --- a/src/hid_core/resources/npad/npad_resource.cpp +++ b/src/hid_core/resources/npad/npad_resource.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -517,7 +517,7 @@ Result NPadResource::AcquireNpadStyleSetUpdateEventHandle(u64 aruid, if (!controller_state.is_styleset_update_event_initialized) { // Auto clear = true controller_state.style_set_update_event = - service_context.CreateEvent("NpadResource:StylesetUpdateEvent"); + service_context.CreateEventWith("NpadResource:StylesetUpdateEvent"); // Assume creating the event succeeds otherwise crash the system here controller_state.is_styleset_update_event_initialized = true; diff --git a/src/hid_core/resources/palma/palma.cpp b/src/hid_core/resources/palma/palma.cpp index 0652455f5f..356565d69c 100644 --- a/src/hid_core/resources/palma/palma.cpp +++ b/src/hid_core/resources/palma/palma.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project @@ -17,7 +17,7 @@ namespace Service::HID { Palma::Palma(Core::HID::HIDCore& hid_core_, KernelHelpers::ServiceContext& service_context_) : ControllerBase{hid_core_}, service_context{service_context_} { controller = hid_core.GetEmulatedController(Core::HID::NpadIdType::Other); - operation_complete_event = service_context.CreateEvent("hid:PalmaOperationCompleteEvent"); + operation_complete_event = service_context.CreateEventWith("hid:PalmaOperationCompleteEvent"); } Palma::~Palma() { diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp index 81898a1d38..08ab706e83 100644 --- a/src/tests/core/core_timing.cpp +++ b/src/tests/core/core_timing.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: 2016 Dolphin Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -56,11 +59,11 @@ TEST_CASE("CoreTiming[BasicOrder]", "[core]") { ScopeInit guard; auto& core_timing = guard.core_timing; std::vector> events{ - Core::Timing::CreateEvent("callbackA", HostCallbackTemplate<0>), - Core::Timing::CreateEvent("callbackB", HostCallbackTemplate<1>), - Core::Timing::CreateEvent("callbackC", HostCallbackTemplate<2>), - Core::Timing::CreateEvent("callbackD", HostCallbackTemplate<3>), - Core::Timing::CreateEvent("callbackE", HostCallbackTemplate<4>), + Core::Timing::CreateEventWith("callbackA", HostCallbackTemplate<0>), + Core::Timing::CreateEventWith("callbackB", HostCallbackTemplate<1>), + Core::Timing::CreateEventWith("callbackC", HostCallbackTemplate<2>), + Core::Timing::CreateEventWith("callbackD", HostCallbackTemplate<3>), + Core::Timing::CreateEventWith("callbackE", HostCallbackTemplate<4>), }; expected_callback = 0; @@ -96,11 +99,11 @@ TEST_CASE("CoreTiming[BasicOrderNoPausing]", "[core]") { ScopeInit guard; auto& core_timing = guard.core_timing; std::vector> events{ - Core::Timing::CreateEvent("callbackA", HostCallbackTemplate<0>), - Core::Timing::CreateEvent("callbackB", HostCallbackTemplate<1>), - Core::Timing::CreateEvent("callbackC", HostCallbackTemplate<2>), - Core::Timing::CreateEvent("callbackD", HostCallbackTemplate<3>), - Core::Timing::CreateEvent("callbackE", HostCallbackTemplate<4>), + Core::Timing::CreateEventWith("callbackA", HostCallbackTemplate<0>), + Core::Timing::CreateEventWith("callbackB", HostCallbackTemplate<1>), + Core::Timing::CreateEventWith("callbackC", HostCallbackTemplate<2>), + Core::Timing::CreateEventWith("callbackD", HostCallbackTemplate<3>), + Core::Timing::CreateEventWith("callbackE", HostCallbackTemplate<4>), }; core_timing.SyncPause(true); diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 6e63bdf18b..bbe6f7333c 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -192,7 +192,7 @@ RasterizerVulkan::RasterizerVulkan(Core::Frontend::EmuWindow& emu_window_, Tegra render_pass_cache, buffer_cache, texture_cache, gpu.ShaderNotify()), accelerate_dma(buffer_cache, texture_cache, scheduler), fence_manager(*this, gpu, texture_cache, buffer_cache, query_cache, device, scheduler), - wfi_event(device.GetLogical().CreateEvent()) { + wfi_event(device.GetLogical().CreateEventWith()) { scheduler.SetQueryCache(query_cache); // Log multi-draw support diff --git a/src/video_core/vulkan_common/vulkan.h b/src/video_core/vulkan_common/vulkan.h index ab0ff73eec..3fc0b48b72 100644 --- a/src/video_core/vulkan_common/vulkan.h +++ b/src/video_core/vulkan_common/vulkan.h @@ -48,7 +48,6 @@ #endif // Sanitize macros -#undef CreateEvent #undef CreateSemaphore #undef Always #undef False diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index a2fa2b50c6..7226ea8de0 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -778,7 +778,7 @@ ShaderModule Device::CreateShaderModule(const VkShaderModuleCreateInfo& ci) cons return ShaderModule(object, handle, *dld); } -Event Device::CreateEvent() const { +Event Device::CreateEventWith() const { static constexpr VkEventCreateInfo ci{ .sType = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, .pNext = nullptr, diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 872fbd858e..679bc9758c 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -1038,7 +1038,7 @@ public: [[nodiscard]] ShaderModule CreateShaderModule(const VkShaderModuleCreateInfo& ci) const; - [[nodiscard]] Event CreateEvent() const; + [[nodiscard]] Event CreateEventWith() const; [[nodiscard]] SwapchainKHR CreateSwapchainKHR(const VkSwapchainCreateInfoKHR& ci) const; diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index ce11763f91..24592433bd 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -656,10 +656,10 @@ void Widget::SetupComponent(const QString& label, std::function& load_fu if (Settings::IsConfiguringGlobal()) { load_func = [this, serializer, checkbox_serializer, require_checkbox, other_setting]() { if (require_checkbox && other_setting->UsingGlobal()) { - other_setting->LoadString(checkbox_serializer()); + other_setting->LoadStringWith(checkbox_serializer()); } if (setting.UsingGlobal()) { - setting.LoadString(serializer()); + setting.LoadStringWith(serializer()); } }; } else { @@ -681,12 +681,12 @@ void Widget::SetupComponent(const QString& label, std::function& load_fu bool using_global = !restore_button->isEnabled(); setting.SetGlobal(using_global); if (!using_global) { - setting.LoadString(serializer()); + setting.LoadStringWith(serializer()); } if (require_checkbox) { other_setting->SetGlobal(using_global); if (!using_global) { - other_setting->LoadString(checkbox_serializer()); + other_setting->LoadStringWith(checkbox_serializer()); } } }; diff --git a/tools/svc_generator.py b/tools/svc_generator.py index d00fe0ba63..078c4b4473 100755 --- a/tools/svc_generator.py +++ b/tools/svc_generator.py @@ -47,7 +47,7 @@ SVCS = [ [0x24, "Result GetProcessId(uint64_t* out_process_id, Handle process_handle);"], [0x25, "Result GetThreadId(uint64_t* out_thread_id, Handle thread_handle);"], [0x26, "void Break(BreakReason break_reason, Address arg, Size size);"], - [0x27, "Result OutputDebugString(Address debug_str, Size len);"], + [0x27, "Result OutputDebugStringWith(Address debug_str, Size len);"], [0x28, "void ReturnFromException(Result result);"], [0x29, "Result GetInfo(uint64_t* out, InfoType info_type, Handle handle, uint64_t info_subtype);"], [0x2A, "void FlushEntireDataCache();"], @@ -76,7 +76,7 @@ SVCS = [ [0x42, "Result ReplyAndReceiveLight(Handle handle);"], [0x43, "Result ReplyAndReceive(int32_t* out_index, Address handles, int32_t num_handles, Handle reply_target, int64_t timeout_ns);"], [0x44, "Result ReplyAndReceiveWithUserBuffer(int32_t* out_index, Address message_buffer, Size message_buffer_size, Address handles, int32_t num_handles, Handle reply_target, int64_t timeout_ns);"], - [0x45, "Result CreateEvent(Handle* out_write_handle, Handle* out_read_handle);"], + [0x45, "Result CreateEventWith(Handle* out_write_handle, Handle* out_read_handle);"], [0x46, "Result MapIoRegion(Handle io_region, Address address, Size size, MemoryPermission perm);"], [0x47, "Result UnmapIoRegion(Handle io_region, Address address, Size size);"], [0x48, "Result MapPhysicalMemoryUnsafe(Address address, Size size);"], @@ -127,7 +127,7 @@ SVCS = [ [0x76, "Result QueryProcessMemory(Address out_memory_info, PageInfo* out_page_info, Handle process_handle, uint64_t address);"], [0x77, "Result MapProcessCodeMemory(Handle process_handle, uint64_t dst_address, uint64_t src_address, uint64_t size);"], [0x78, "Result UnmapProcessCodeMemory(Handle process_handle, uint64_t dst_address, uint64_t src_address, uint64_t size);"], - [0x79, "Result CreateProcess(Handle* out_handle, Address parameters, Address caps, int32_t num_caps);"], + [0x79, "Result CreateProcessWith(Handle* out_handle, Address parameters, Address caps, int32_t num_caps);"], [0x7A, "Result StartProcess(Handle process_handle, int32_t priority, int32_t core_id, uint64_t main_thread_stack_size);"], [0x7B, "Result TerminateProcess(Handle process_handle);"], [0x7C, "Result GetProcessInfo(int64_t* out_info, Handle process_handle, ProcessInfoType info_type);"],