diff options
| author | Fernando S <fsahmkow27@gmail.com> | 2022-04-16 00:05:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-16 00:05:04 +0200 |
| commit | 34710065e84ccc3de4433b7dd0ffb569e14788b8 (patch) | |
| tree | 5e96d11546befd9671dff252e8e9e8a693b0bd1a /src/core/hle/kernel/k_scheduler.cpp | |
| parent | 8ae43a1be96c8673a182c2cf92bea4f1c5888adb (diff) | |
| parent | 3f0b93925f082b6defe9454f16f1260539994217 (diff) | |
Merge pull request #8172 from bunnei/kernel-mutex
hle: kernel: Use std::mutex instead of spin locks for most kernel locking.
Diffstat (limited to 'src/core/hle/kernel/k_scheduler.cpp')
| -rw-r--r-- | src/core/hle/kernel/k_scheduler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index 6c0bb1672..526eb4b70 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp @@ -705,7 +705,7 @@ void KScheduler::Unload(KThread* thread) { prev_thread = nullptr; } - thread->context_guard.Unlock(); + thread->context_guard.unlock(); } void KScheduler::Reload(KThread* thread) { @@ -794,13 +794,13 @@ void KScheduler::SwitchToCurrent() { do { auto next_thread = current_thread.load(); if (next_thread != nullptr) { - const auto locked = next_thread->context_guard.TryLock(); + const auto locked = next_thread->context_guard.try_lock(); if (state.needs_scheduling.load()) { - next_thread->context_guard.Unlock(); + next_thread->context_guard.unlock(); break; } if (next_thread->GetActiveCore() != core_id) { - next_thread->context_guard.Unlock(); + next_thread->context_guard.unlock(); break; } if (!locked) { |
