aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/time_manager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-07-27 19:00:41 -0400
committerLioncash <mathew1800@gmail.com>2020-07-27 21:21:01 -0400
commit7decda6bc2e504211e43a4e391a38efd3d43c01e (patch)
treee337a6e823960cc6b2a7d05c7e33e80cc51a4581 /src/core/hle/kernel/time_manager.cpp
parentf8370efc1b7e58e0e7eb3520ffe5e34eeeca34c7 (diff)
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.
Diffstat (limited to 'src/core/hle/kernel/time_manager.cpp')
-rw-r--r--src/core/hle/kernel/time_manager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/time_manager.cpp b/src/core/hle/kernel/time_manager.cpp
index 88b01b7514..95f2446c99 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<Handle>(thread_handle);
+ "Kernel::TimeManagerCallback",
+ [this](std::uintptr_t thread_handle, std::chrono::nanoseconds) {
+ const SchedulerLock lock(system.Kernel());
+ const auto proper_handle = static_cast<Handle>(thread_handle);
if (cancelled_events[proper_handle]) {
return;
}
- std::shared_ptr<Thread> thread =
- this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle);
+ auto thread = this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle);
thread->OnWakeUp();
});
}