summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/address_arbiter.cpp6
-rw-r--r--src/core/hle/kernel/mutex.cpp5
-rw-r--r--src/core/hle/kernel/svc.cpp2
-rw-r--r--src/core/hle/kernel/thread.cpp6
4 files changed, 10 insertions, 9 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp
index ebabde921..07acabc1d 100644
--- a/src/core/hle/kernel/address_arbiter.cpp
+++ b/src/core/hle/kernel/address_arbiter.cpp
@@ -90,7 +90,7 @@ ResultCode AddressArbiter::IncrementAndSignalToAddressIfEqual(VAddr address, s32
auto& monitor = system.Monitor();
u32 current_value;
do {
- monitor.SetExclusive(current_core, address);
+ monitor.SetExclusive32(current_core, address);
current_value = memory.Read32(address);
if (current_value != value) {
@@ -120,7 +120,7 @@ ResultCode AddressArbiter::ModifyByWaitingCountAndSignalToAddressIfEqual(VAddr a
auto& monitor = system.Monitor();
s32 updated_value;
do {
- monitor.SetExclusive(current_core, address);
+ monitor.SetExclusive32(current_core, address);
updated_value = memory.Read32(address);
if (updated_value != value) {
@@ -191,7 +191,7 @@ ResultCode AddressArbiter::WaitForAddressIfLessThan(VAddr address, s32 value, s6
const std::size_t current_core = system.CurrentCoreIndex();
auto& monitor = system.Monitor();
do {
- monitor.SetExclusive(current_core, address);
+ monitor.SetExclusive32(current_core, address);
current_value = static_cast<s32>(memory.Read32(address));
if (should_decrement) {
decrement_value = current_value - 1;
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};
}
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index da2f90a1d..371beed0d 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1641,7 +1641,7 @@ static void SignalProcessWideKey(Core::System& system, VAddr condition_variable_
u32 update_val = 0;
const VAddr mutex_address = thread->GetMutexWaitAddress();
do {
- monitor.SetExclusive(current_core, mutex_address);
+ monitor.SetExclusive32(current_core, mutex_address);
// If the mutex is not yet acquired, acquire it.
mutex_val = memory.Read32(mutex_address);
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index b99e3b7a5..51cc5dcca 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -236,7 +236,7 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(Core::System& system, ThreadTy
ResetThreadContext64(thread->context_64, stack_top, entry_point, arg);
}
thread->host_context =
- std::make_shared<Common::Fiber>(std::move(thread_start_func), thread_start_parameter);
+ std::make_shared<Common::Fiber>(std::move(thread_start_func), thread_start_parameter);
return MakeResult<std::shared_ptr<Thread>>(std::move(thread));
}
@@ -412,12 +412,12 @@ ResultCode Thread::SetActivity(ThreadActivity value) {
}
if (value == ThreadActivity::Paused) {
- if (pausing_state & static_cast<u32>(ThreadSchedFlags::ThreadPauseFlag) != 0) {
+ if ((pausing_state & static_cast<u32>(ThreadSchedFlags::ThreadPauseFlag)) != 0) {
return ERR_INVALID_STATE;
}
AddSchedulingFlag(ThreadSchedFlags::ThreadPauseFlag);
} else {
- if (pausing_state & static_cast<u32>(ThreadSchedFlags::ThreadPauseFlag) == 0) {
+ if ((pausing_state & static_cast<u32>(ThreadSchedFlags::ThreadPauseFlag)) == 0) {
return ERR_INVALID_STATE;
}
RemoveSchedulingFlag(ThreadSchedFlags::ThreadPauseFlag);