summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index d3984dfc4..7881c2b90 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -43,7 +43,7 @@ Thread::~Thread() = default;
43 43
44void Thread::Stop() { 44void Thread::Stop() {
45 // Cancel any outstanding wakeup events for this thread 45 // Cancel any outstanding wakeup events for this thread
46 CoreTiming::UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), callback_handle); 46 Core::Timing::UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), callback_handle);
47 kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle); 47 kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle);
48 callback_handle = 0; 48 callback_handle = 0;
49 49
@@ -85,12 +85,13 @@ void Thread::WakeAfterDelay(s64 nanoseconds) {
85 85
86 // This function might be called from any thread so we have to be cautious and use the 86 // This function might be called from any thread so we have to be cautious and use the
87 // thread-safe version of ScheduleEvent. 87 // thread-safe version of ScheduleEvent.
88 CoreTiming::ScheduleEventThreadsafe(CoreTiming::nsToCycles(nanoseconds), 88 Core::Timing::ScheduleEventThreadsafe(Core::Timing::nsToCycles(nanoseconds),
89 kernel.ThreadWakeupCallbackEventType(), callback_handle); 89 kernel.ThreadWakeupCallbackEventType(), callback_handle);
90} 90}
91 91
92void Thread::CancelWakeupTimer() { 92void Thread::CancelWakeupTimer() {
93 CoreTiming::UnscheduleEventThreadsafe(kernel.ThreadWakeupCallbackEventType(), callback_handle); 93 Core::Timing::UnscheduleEventThreadsafe(kernel.ThreadWakeupCallbackEventType(),
94 callback_handle);
94} 95}
95 96
96static std::optional<s32> GetNextProcessorId(u64 mask) { 97static std::optional<s32> GetNextProcessorId(u64 mask) {
@@ -197,7 +198,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(KernelCore& kernel, std::string name
197 thread->stack_top = stack_top; 198 thread->stack_top = stack_top;
198 thread->tpidr_el0 = 0; 199 thread->tpidr_el0 = 0;
199 thread->nominal_priority = thread->current_priority = priority; 200 thread->nominal_priority = thread->current_priority = priority;
200 thread->last_running_ticks = CoreTiming::GetTicks(); 201 thread->last_running_ticks = Core::Timing::GetTicks();
201 thread->processor_id = processor_id; 202 thread->processor_id = processor_id;
202 thread->ideal_core = processor_id; 203 thread->ideal_core = processor_id;
203 thread->affinity_mask = 1ULL << processor_id; 204 thread->affinity_mask = 1ULL << processor_id;
@@ -257,7 +258,7 @@ void Thread::SetStatus(ThreadStatus new_status) {
257 } 258 }
258 259
259 if (status == ThreadStatus::Running) { 260 if (status == ThreadStatus::Running) {
260 last_running_ticks = CoreTiming::GetTicks(); 261 last_running_ticks = Core::Timing::GetTicks();
261 } 262 }
262 263
263 status = new_status; 264 status = new_status;