diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 8663fe5ee..0c11da1e0 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -41,7 +41,7 @@ Thread::~Thread() = default; | |||
| 41 | 41 | ||
| 42 | void Thread::Stop() { | 42 | void Thread::Stop() { |
| 43 | // Cancel any outstanding wakeup events for this thread | 43 | // Cancel any outstanding wakeup events for this thread |
| 44 | kernel.System().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), | 44 | Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), |
| 45 | callback_handle); | 45 | callback_handle); |
| 46 | kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle); | 46 | kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle); |
| 47 | callback_handle = 0; | 47 | callback_handle = 0; |
| @@ -68,12 +68,12 @@ void Thread::WakeAfterDelay(s64 nanoseconds) { | |||
| 68 | // This function might be called from any thread so we have to be cautious and use the | 68 | // This function might be called from any thread so we have to be cautious and use the |
| 69 | // thread-safe version of ScheduleEvent. | 69 | // thread-safe version of ScheduleEvent. |
| 70 | const s64 cycles = Core::Timing::nsToCycles(std::chrono::nanoseconds{nanoseconds}); | 70 | const s64 cycles = Core::Timing::nsToCycles(std::chrono::nanoseconds{nanoseconds}); |
| 71 | kernel.System().CoreTiming().ScheduleEvent(cycles, kernel.ThreadWakeupCallbackEventType(), | 71 | Core::System::GetInstance().CoreTiming().ScheduleEvent(cycles, kernel.ThreadWakeupCallbackEventType(), |
| 72 | callback_handle); | 72 | callback_handle); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | void Thread::CancelWakeupTimer() { | 75 | void Thread::CancelWakeupTimer() { |
| 76 | kernel.System().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), | 76 | Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), |
| 77 | callback_handle); | 77 | callback_handle); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| @@ -176,7 +176,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(KernelCore& kernel, std::string name | |||
| 176 | return ResultCode(-1); | 176 | return ResultCode(-1); |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | auto& system = kernel.System(); | 179 | auto& system = Core::System::GetInstance(); |
| 180 | SharedPtr<Thread> thread(new Thread(kernel)); | 180 | SharedPtr<Thread> thread(new Thread(kernel)); |
| 181 | 181 | ||
| 182 | thread->thread_id = kernel.CreateNewThreadID(); | 182 | thread->thread_id = kernel.CreateNewThreadID(); |
| @@ -258,7 +258,7 @@ void Thread::SetStatus(ThreadStatus new_status) { | |||
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | if (status == ThreadStatus::Running) { | 260 | if (status == ThreadStatus::Running) { |
| 261 | last_running_ticks = kernel.System().CoreTiming().GetTicks(); | 261 | last_running_ticks = Core::System::GetInstance().CoreTiming().GetTicks(); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | status = new_status; | 264 | status = new_status; |
| @@ -356,7 +356,7 @@ void Thread::SetActivity(ThreadActivity value) { | |||
| 356 | // Set status if not waiting | 356 | // Set status if not waiting |
| 357 | if (status == ThreadStatus::Ready || status == ThreadStatus::Running) { | 357 | if (status == ThreadStatus::Ready || status == ThreadStatus::Running) { |
| 358 | SetStatus(ThreadStatus::Paused); | 358 | SetStatus(ThreadStatus::Paused); |
| 359 | kernel.System().CpuCore(processor_id).PrepareReschedule(); | 359 | Core::System::GetInstance().CpuCore(processor_id).PrepareReschedule(); |
| 360 | } | 360 | } |
| 361 | } else if (status == ThreadStatus::Paused) { | 361 | } else if (status == ThreadStatus::Paused) { |
| 362 | // Ready to reschedule | 362 | // Ready to reschedule |
| @@ -475,7 +475,7 @@ void Thread::AdjustSchedulingOnPriority(u32 old_priority) { | |||
| 475 | if (GetSchedulingStatus() != ThreadSchedStatus::Runnable) { | 475 | if (GetSchedulingStatus() != ThreadSchedStatus::Runnable) { |
| 476 | return; | 476 | return; |
| 477 | } | 477 | } |
| 478 | auto& scheduler = kernel.System().GlobalScheduler(); | 478 | auto& scheduler = Core::System::GetInstance().GlobalScheduler(); |
| 479 | if (processor_id >= 0) { | 479 | if (processor_id >= 0) { |
| 480 | scheduler.Unschedule(old_priority, processor_id, this); | 480 | scheduler.Unschedule(old_priority, processor_id, this); |
| 481 | } | 481 | } |
| @@ -507,7 +507,7 @@ void Thread::AdjustSchedulingOnPriority(u32 old_priority) { | |||
| 507 | } | 507 | } |
| 508 | 508 | ||
| 509 | void Thread::AdjustSchedulingOnAffinity(u64 old_affinity_mask, s32 old_core) { | 509 | void Thread::AdjustSchedulingOnAffinity(u64 old_affinity_mask, s32 old_core) { |
| 510 | auto& scheduler = kernel.System().GlobalScheduler(); | 510 | auto& scheduler = Core::System::GetInstance().GlobalScheduler(); |
| 511 | if (GetSchedulingStatus() != ThreadSchedStatus::Runnable || | 511 | if (GetSchedulingStatus() != ThreadSchedStatus::Runnable || |
| 512 | current_priority >= THREADPRIO_COUNT) { | 512 | current_priority >= THREADPRIO_COUNT) { |
| 513 | return; | 513 | return; |