summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/mutex.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-07 23:59:42 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:37 +0200
commitcd1c38be8d15d3caf52f566a9e8dc20504c61068 (patch)
tree2fed02ffd4f2151dfca14ddb33ef1939eaee2fba /src/core/hle/kernel/mutex.cpp
parentSVC: WaitSynchronization add Termination Pending Result. (diff)
downloadyuzu-cd1c38be8d15d3caf52f566a9e8dc20504c61068.tar
yuzu-cd1c38be8d15d3caf52f566a9e8dc20504c61068.tar.gz
yuzu-cd1c38be8d15d3caf52f566a9e8dc20504c61068.tar.bz2
yuzu-cd1c38be8d15d3caf52f566a9e8dc20504c61068.tar.lz
yuzu-cd1c38be8d15d3caf52f566a9e8dc20504c61068.tar.xz
yuzu-cd1c38be8d15d3caf52f566a9e8dc20504c61068.tar.zst
yuzu-cd1c38be8d15d3caf52f566a9e8dc20504c61068.zip
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
-rw-r--r--src/core/hle/kernel/mutex.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index ebe3f6050..16c95782a 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -10,6 +10,7 @@
#include "common/logging/log.h"
#include "core/core.h"
#include "core/arm/exclusive_monitor.h"
+#include "core/core.h"
#include "core/hle/kernel/errors.h"
#include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/kernel.h"
@@ -138,7 +139,7 @@ std::pair<ResultCode, std::shared_ptr<Thread>> Mutex::Unlock(std::shared_ptr<Thr
const std::size_t current_core = system.CurrentCoreIndex();
if (new_owner == nullptr) {
do {
- monitor.SetExclusive(current_core, address);
+ monitor.SetExclusive32(current_core, address);
} while (!monitor.ExclusiveWrite32(current_core, address, 0));
return {RESULT_SUCCESS, nullptr};
}
@@ -154,7 +155,7 @@ std::pair<ResultCode, std::shared_ptr<Thread>> Mutex::Unlock(std::shared_ptr<Thr
new_owner->ResumeFromWait();
do {
- monitor.SetExclusive(current_core, address);
+ monitor.SetExclusive32(current_core, address);
} while (!monitor.ExclusiveWrite32(current_core, address, mutex_value));
return {RESULT_SUCCESS, new_owner};
}