From a7af349daee85237384dba07533c9a407cf15592 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 27 Jul 2020 19:00:41 -0400 Subject: core_timing: Make use of uintptr_t to represent user_data Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly. --- src/core/hle/kernel/time_manager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/hle/kernel/time_manager.cpp') diff --git a/src/core/hle/kernel/time_manager.cpp b/src/core/hle/kernel/time_manager.cpp index 88b01b751..95f2446c9 100644 --- a/src/core/hle/kernel/time_manager.cpp +++ b/src/core/hle/kernel/time_manager.cpp @@ -16,14 +16,14 @@ namespace Kernel { TimeManager::TimeManager(Core::System& system_) : system{system_} { time_manager_event_type = Core::Timing::CreateEvent( - "Kernel::TimeManagerCallback", [this](u64 thread_handle, std::chrono::nanoseconds) { - SchedulerLock lock(system.Kernel()); - Handle proper_handle = static_cast(thread_handle); + "Kernel::TimeManagerCallback", + [this](std::uintptr_t thread_handle, std::chrono::nanoseconds) { + const SchedulerLock lock(system.Kernel()); + const auto proper_handle = static_cast(thread_handle); if (cancelled_events[proper_handle]) { return; } - std::shared_ptr thread = - this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle); + auto thread = this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle); thread->OnWakeUp(); }); } -- cgit v1.2.3