summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Michael Scire2018-06-21 05:13:06 -0600
committerGravatar Michael Scire2018-06-21 05:13:06 -0600
commit8f8fe62a19060a7c4529c4e0870412e9cd97e841 (patch)
tree709de4b3bbe9f5e5c3370d07cba9004e7ddafac4 /src
parentKernel/Arbiters: Clear WaitAddress in SignalToAddress (diff)
downloadyuzu-8f8fe62a19060a7c4529c4e0870412e9cd97e841.tar.gz
yuzu-8f8fe62a19060a7c4529c4e0870412e9cd97e841.tar.xz
yuzu-8f8fe62a19060a7c4529c4e0870412e9cd97e841.zip
Kernel/Arbiters: Initialize arb_wait_address in thread struct.
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/kernel/svc.cpp4
-rw-r--r--src/core/hle/kernel/thread.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index ba5b02174..051eda98d 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -40,6 +40,8 @@ add_library(core STATIC
40 hle/config_mem.h 40 hle/config_mem.h
41 hle/ipc.h 41 hle/ipc.h
42 hle/ipc_helpers.h 42 hle/ipc_helpers.h
43 hle/kernel/address_arbiter.cpp
44 hle/kernel/address_arbiter.h
43 hle/kernel/client_port.cpp 45 hle/kernel/client_port.cpp
44 hle/kernel/client_port.h 46 hle/kernel/client_port.h
45 hle/kernel/client_session.cpp 47 hle/kernel/client_session.cpp
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 24dd50938..2d8fa6070 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -692,6 +692,8 @@ static ResultCode SignalProcessWideKey(VAddr condition_variable_addr, s32 target
692 692
693// Wait for an address (via Address Arbiter) 693// Wait for an address (via Address Arbiter)
694static ResultCode WaitForAddress(VAddr address, u32 type, s32 value, s64 timeout) { 694static ResultCode WaitForAddress(VAddr address, u32 type, s32 value, s64 timeout) {
695 NGLOG_WARNING(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, timeout={}",
696 address, type, value, timeout);
695 // If the passed address is a kernel virtual address, return invalid memory state. 697 // If the passed address is a kernel virtual address, return invalid memory state.
696 if ((address + 0x8000000000LL) < 0x7FFFE00000LL) { 698 if ((address + 0x8000000000LL) < 0x7FFFE00000LL) {
697 return ERR_INVALID_ADDRESS_STATE; 699 return ERR_INVALID_ADDRESS_STATE;
@@ -715,6 +717,8 @@ static ResultCode WaitForAddress(VAddr address, u32 type, s32 value, s64 timeout
715 717
716// Signals to an address (via Address Arbiter) 718// Signals to an address (via Address Arbiter)
717static ResultCode SignalToAddress(VAddr address, u32 type, s32 value, s32 num_to_wake) { 719static ResultCode SignalToAddress(VAddr address, u32 type, s32 value, s32 num_to_wake) {
720 NGLOG_WARNING(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, num_to_wake=0x{:X}",
721 address, type, value, num_to_wake);
718 // If the passed address is a kernel virtual address, return invalid memory state. 722 // If the passed address is a kernel virtual address, return invalid memory state.
719 if ((address + 0x8000000000LL) < 0x7FFFE00000LL) { 723 if ((address + 0x8000000000LL) < 0x7FFFE00000LL) {
720 return ERR_INVALID_ADDRESS_STATE; 724 return ERR_INVALID_ADDRESS_STATE;
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 0a76bd222..7a28f3c1c 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -232,7 +232,7 @@ public:
232 Handle wait_handle; ///< The handle used to wait for the mutex. 232 Handle wait_handle; ///< The handle used to wait for the mutex.
233 233
234 // If waiting for an AddressArbiter, this is the address being waited on. 234 // If waiting for an AddressArbiter, this is the address being waited on.
235 VAddr arb_wait_address; 235 VAddr arb_wait_address{0};
236 ResultCode arb_wait_result{RESULT_SUCCESS}; ///< Result returned when done waiting on AddressArbiter. 236 ResultCode arb_wait_result{RESULT_SUCCESS}; ///< Result returned when done waiting on AddressArbiter.
237 237
238 std::string name; 238 std::string name;