diff options
| author | 2020-06-28 12:37:50 -0400 | |
|---|---|---|
| committer | 2020-06-28 12:37:50 -0400 | |
| commit | b05795d704e0c194215f815a5703db09e524b59a (patch) | |
| tree | ecf4023b4ee0c91555c1d8263762fcb9dcb04a17 /src/common/spin_lock.cpp | |
| parent | Merge pull request #4196 from ogniK5377/nrr-nro-fixes (diff) | |
| parent | Core/Common: Address Feedback. (diff) | |
| download | yuzu-b05795d704e0c194215f815a5703db09e524b59a.tar.gz yuzu-b05795d704e0c194215f815a5703db09e524b59a.tar.xz yuzu-b05795d704e0c194215f815a5703db09e524b59a.zip | |
Merge pull request #3955 from FernandoS27/prometheus-2b
Remake Kernel Scheduling, CPU Management & Boot Management (Prometheus)
Diffstat (limited to 'src/common/spin_lock.cpp')
| -rw-r--r-- | src/common/spin_lock.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/spin_lock.cpp b/src/common/spin_lock.cpp index c7b46aac6..c1524220f 100644 --- a/src/common/spin_lock.cpp +++ b/src/common/spin_lock.cpp | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | namespace { | 21 | namespace { |
| 22 | 22 | ||
| 23 | void thread_pause() { | 23 | void ThreadPause() { |
| 24 | #if __x86_64__ | 24 | #if __x86_64__ |
| 25 | _mm_pause(); | 25 | _mm_pause(); |
| 26 | #elif __aarch64__ && _MSC_VER | 26 | #elif __aarch64__ && _MSC_VER |
| @@ -30,13 +30,13 @@ void thread_pause() { | |||
| 30 | #endif | 30 | #endif |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | } // namespace | 33 | } // Anonymous namespace |
| 34 | 34 | ||
| 35 | namespace Common { | 35 | namespace Common { |
| 36 | 36 | ||
| 37 | void SpinLock::lock() { | 37 | void SpinLock::lock() { |
| 38 | while (lck.test_and_set(std::memory_order_acquire)) { | 38 | while (lck.test_and_set(std::memory_order_acquire)) { |
| 39 | thread_pause(); | 39 | ThreadPause(); |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| 42 | 42 | ||