diff options
| author | 2019-02-12 12:32:15 -0500 | |
|---|---|---|
| committer | 2019-02-12 12:42:17 -0500 | |
| commit | 48d9d66dc585477d26b4cfbf1c4f71fd637b42ea (patch) | |
| tree | f53430f173796e92b2e3dfd2570ed6752d5e8f77 /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #1904 from bunnei/better-fermi-copy (diff) | |
| download | yuzu-48d9d66dc585477d26b4cfbf1c4f71fd637b42ea.tar.gz yuzu-48d9d66dc585477d26b4cfbf1c4f71fd637b42ea.tar.xz yuzu-48d9d66dc585477d26b4cfbf1c4f71fd637b42ea.zip | |
core_timing: Rename CoreTiming namespace to Core::Timing
Places all of the timing-related functionality under the existing Core
namespace to keep things consistent, rather than having the timing
utilities sitting in its own completely separate namespace.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 13 |
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 | ||
| 44 | void Thread::Stop() { | 44 | void 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 | ||
| 92 | void Thread::CancelWakeupTimer() { | 92 | void Thread::CancelWakeupTimer() { |
| 93 | CoreTiming::UnscheduleEventThreadsafe(kernel.ThreadWakeupCallbackEventType(), callback_handle); | 93 | Core::Timing::UnscheduleEventThreadsafe(kernel.ThreadWakeupCallbackEventType(), |
| 94 | callback_handle); | ||
| 94 | } | 95 | } |
| 95 | 96 | ||
| 96 | static std::optional<s32> GetNextProcessorId(u64 mask) { | 97 | static 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; |