diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-14 14:30:53 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-02-22 16:18:06 +0100 |
commit | 179bafa7cb1efae5405d38ea9b98dc6b3e1ec756 (patch) | |
tree | e26bc705bf9446b335c29e086b84c61916f44f32 /src/core/hle/kernel/thread.cpp | |
parent | Kernel: Make global scheduler depend on KernelCore (diff) | |
download | yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.gz yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.bz2 yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.lz yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.xz yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.zst yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index ae5f2c8bd..bf850e0b2 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -46,9 +46,9 @@ Thread::~Thread() = default; void Thread::Stop() { // Cancel any outstanding wakeup events for this thread Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), - callback_handle); - kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle); - callback_handle = 0; + global_handle); + kernel.GlobalHandleTable().Close(global_handle); + global_handle = 0; SetStatus(ThreadStatus::Dead); Signal(); @@ -73,12 +73,12 @@ void Thread::WakeAfterDelay(s64 nanoseconds) { // thread-safe version of ScheduleEvent. const s64 cycles = Core::Timing::nsToCycles(std::chrono::nanoseconds{nanoseconds}); Core::System::GetInstance().CoreTiming().ScheduleEvent( - cycles, kernel.ThreadWakeupCallbackEventType(), callback_handle); + cycles, kernel.ThreadWakeupCallbackEventType(), global_handle); } void Thread::CancelWakeupTimer() { Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), - callback_handle); + global_handle); } void Thread::ResumeFromWait() { @@ -190,7 +190,7 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(KernelCore& kernel, std::strin thread->condvar_wait_address = 0; thread->wait_handle = 0; thread->name = std::move(name); - thread->callback_handle = kernel.ThreadWakeupCallbackHandleTable().Create(thread).Unwrap(); + thread->global_handle = kernel.GlobalHandleTable().Create(thread).Unwrap(); thread->owner_process = &owner_process; auto& scheduler = kernel.GlobalScheduler(); scheduler.AddThread(thread); |