summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/address_arbiter.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-15 20:54:40 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:50 +0200
commit25565dffd588006aace7530486e71ff318dc5550 (patch)
treee30556e18f3dae60ea6cb8d32b84fbcc42860d24 /src/core/hle/kernel/address_arbiter.cpp
parentCPU_Manager: Correct stopping on SingleCore. (diff)
downloadyuzu-25565dffd588006aace7530486e71ff318dc5550.tar
yuzu-25565dffd588006aace7530486e71ff318dc5550.tar.gz
yuzu-25565dffd588006aace7530486e71ff318dc5550.tar.bz2
yuzu-25565dffd588006aace7530486e71ff318dc5550.tar.lz
yuzu-25565dffd588006aace7530486e71ff318dc5550.tar.xz
yuzu-25565dffd588006aace7530486e71ff318dc5550.tar.zst
yuzu-25565dffd588006aace7530486e71ff318dc5550.zip
Diffstat (limited to 'src/core/hle/kernel/address_arbiter.cpp')
-rw-r--r--src/core/hle/kernel/address_arbiter.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp
index e8f22b598..4d2a9b35d 100644
--- a/src/core/hle/kernel/address_arbiter.cpp
+++ b/src/core/hle/kernel/address_arbiter.cpp
@@ -80,8 +80,7 @@ ResultCode AddressArbiter::IncrementAndSignalToAddressIfEqual(VAddr address, s32
auto& monitor = system.Monitor();
u32 current_value;
do {
- monitor.SetExclusive32(current_core, address);
- current_value = memory.Read32(address);
+ current_value = monitor.ExclusiveRead32(current_core, address);
if (current_value != value) {
return ERR_INVALID_STATE;
@@ -110,8 +109,7 @@ ResultCode AddressArbiter::ModifyByWaitingCountAndSignalToAddressIfEqual(VAddr a
auto& monitor = system.Monitor();
s32 updated_value;
do {
- monitor.SetExclusive32(current_core, address);
- updated_value = memory.Read32(address);
+ updated_value = monitor.ExclusiveRead32(current_core, address);
if (updated_value != value) {
return ERR_INVALID_STATE;
@@ -186,8 +184,7 @@ ResultCode AddressArbiter::WaitForAddressIfLessThan(VAddr address, s32 value, s6
const std::size_t current_core = system.CurrentCoreIndex();
auto& monitor = system.Monitor();
do {
- monitor.SetExclusive32(current_core, address);
- current_value = static_cast<s32>(memory.Read32(address));
+ current_value = static_cast<s32>(monitor.ExclusiveRead32(current_core, address));
if (should_decrement) {
decrement_value = current_value - 1;
} else {