diff options
| author | 2019-06-30 12:54:00 -0400 | |
|---|---|---|
| committer | 2019-06-30 12:54:00 -0400 | |
| commit | d992909636269cde90cf6cb3749ccffcff9a6c56 (patch) | |
| tree | 9dd14057dab85c1ba171df75f2112697cdc85cb6 /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #2653 from FearlessTobi/revert-2474-patch-1 (diff) | |
| parent | Core_Timing: Make core_timing threadsafe by default. (diff) | |
| download | yuzu-d992909636269cde90cf6cb3749ccffcff9a6c56.tar.gz yuzu-d992909636269cde90cf6cb3749ccffcff9a6c56.tar.xz yuzu-d992909636269cde90cf6cb3749ccffcff9a6c56.zip | |
Merge pull request #2583 from FernandoS27/core-timing-safe
Core_Timing: Make core_timing threadsafe by default.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index c73a40977..a055a5002 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -76,13 +76,13 @@ void Thread::WakeAfterDelay(s64 nanoseconds) { | |||
| 76 | // This function might be called from any thread so we have to be cautious and use the | 76 | // This function might be called from any thread so we have to be cautious and use the |
| 77 | // thread-safe version of ScheduleEvent. | 77 | // thread-safe version of ScheduleEvent. |
| 78 | const s64 cycles = Core::Timing::nsToCycles(std::chrono::nanoseconds{nanoseconds}); | 78 | const s64 cycles = Core::Timing::nsToCycles(std::chrono::nanoseconds{nanoseconds}); |
| 79 | Core::System::GetInstance().CoreTiming().ScheduleEventThreadsafe( | 79 | Core::System::GetInstance().CoreTiming().ScheduleEvent( |
| 80 | cycles, kernel.ThreadWakeupCallbackEventType(), callback_handle); | 80 | cycles, kernel.ThreadWakeupCallbackEventType(), callback_handle); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | void Thread::CancelWakeupTimer() { | 83 | void Thread::CancelWakeupTimer() { |
| 84 | Core::System::GetInstance().CoreTiming().UnscheduleEventThreadsafe( | 84 | Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(), |
| 85 | kernel.ThreadWakeupCallbackEventType(), callback_handle); | 85 | callback_handle); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | static std::optional<s32> GetNextProcessorId(u64 mask) { | 88 | static std::optional<s32> GetNextProcessorId(u64 mask) { |