diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2014-12-29 13:55:30 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-09 22:43:52 +0100 |
commit | 8ad41775ccae67e54e9f03cbe054d7562b1c66ce (patch) | |
tree | 79d176bd9805cae0a2cfdd12e4c91c108bec0c8d /src/core/hle/kernel/timer.cpp | |
parent | Kernel: Don't re-assign object's handle when duplicating one (diff) | |
download | yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.gz yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.bz2 yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.lz yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.xz yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.zst yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/timer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp index 685a202c0..3b0452d4d 100644 --- a/src/core/hle/kernel/timer.cpp +++ b/src/core/hle/kernel/timer.cpp @@ -66,7 +66,7 @@ ResultCode CreateTimer(Handle* handle, const ResetType reset_type, const std::st } ResultCode ClearTimer(Handle handle) { - Timer* timer = Kernel::g_handle_table.Get<Timer>(handle); + SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle); if (timer == nullptr) return InvalidHandle(ErrorModule::Kernel); @@ -80,7 +80,7 @@ static int TimerCallbackEventType = -1; /// The timer callback event, called when a timer is fired static void TimerCallback(u64 timer_handle, int cycles_late) { - Timer* timer = Kernel::g_handle_table.Get<Timer>(timer_handle); + SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(timer_handle); if (timer == nullptr) { LOG_CRITICAL(Kernel, "Callback fired for invalid timer %u", timer_handle); @@ -93,7 +93,7 @@ static void TimerCallback(u64 timer_handle, int cycles_late) { // Resume all waiting threads for (Handle thread_handle : timer->waiting_threads) { - if (Thread* thread = Kernel::g_handle_table.Get<Thread>(thread_handle)) + if (SharedPtr<Thread> thread = Kernel::g_handle_table.Get<Thread>(thread_handle)) thread->ResumeFromWait(); } @@ -111,7 +111,7 @@ static void TimerCallback(u64 timer_handle, int cycles_late) { } ResultCode SetTimer(Handle handle, s64 initial, s64 interval) { - Timer* timer = Kernel::g_handle_table.Get<Timer>(handle); + SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle); if (timer == nullptr) return InvalidHandle(ErrorModule::Kernel); @@ -125,7 +125,7 @@ ResultCode SetTimer(Handle handle, s64 initial, s64 interval) { } ResultCode CancelTimer(Handle handle) { - Timer* timer = Kernel::g_handle_table.Get<Timer>(handle); + SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle); if (timer == nullptr) return InvalidHandle(ErrorModule::Kernel); |