From 7e191dccc184ae85ce5ade2bca913ab331002481 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 21 Jun 2018 00:49:43 -0600 Subject: Kernel/Arbiters: Add stubs for 4.x SignalToAddress/WaitForAddres SVCs. --- src/core/hle/kernel/thread.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 1d2da6d50..023c9dbe9 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -45,6 +45,7 @@ enum ThreadStatus { THREADSTATUS_WAIT_SYNCH_ANY, ///< Waiting due to WaitSynch1 or WaitSynchN with wait_all = false THREADSTATUS_WAIT_SYNCH_ALL, ///< Waiting due to WaitSynchronizationN with wait_all = true THREADSTATUS_WAIT_MUTEX, ///< Waiting due to an ArbitrateLock/WaitProcessWideKey svc + THREADSTATUS_WAIT_ARB, ///< Waiting due to a SignalToAddress/WaitForAddress svc THREADSTATUS_DORMANT, ///< Created but not yet made ready THREADSTATUS_DEAD ///< Run to completion, or forcefully terminated }; -- cgit v1.2.3 From 9d71ce88cee58d2e171ec5ed82daf075112fb422 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 21 Jun 2018 01:40:29 -0600 Subject: Kernel/Arbiters: Implement WaitForAddress --- src/core/hle/kernel/thread.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 023c9dbe9..79e5d6e5c 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -228,8 +228,10 @@ public: // If waiting on a ConditionVariable, this is the ConditionVariable address VAddr condvar_wait_address; - VAddr mutex_wait_address; ///< If waiting on a Mutex, this is the mutex address - Handle wait_handle; ///< The handle used to wait for the mutex. + VAddr mutex_wait_address; ///< If waiting on a Mutex, this is the mutex address + Handle wait_handle; ///< The handle used to wait for the mutex. + VAddr arb_wait_address; ///< If waiting for an AddressArbiter, this is the address + ResultCode arb_wait_result; ///< If waiting for an AddressArbiter, this is the result that will be returned. std::string name; -- cgit v1.2.3 From 4f81bc4e1bd12e4df7410c6790ba818d8dbba9c0 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 21 Jun 2018 04:07:03 -0600 Subject: Kernel/Arbiters: Mostly implement SignalToAddress --- src/core/hle/kernel/thread.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 79e5d6e5c..0a76bd222 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -230,8 +230,10 @@ public: VAddr condvar_wait_address; VAddr mutex_wait_address; ///< If waiting on a Mutex, this is the mutex address Handle wait_handle; ///< The handle used to wait for the mutex. - VAddr arb_wait_address; ///< If waiting for an AddressArbiter, this is the address - ResultCode arb_wait_result; ///< If waiting for an AddressArbiter, this is the result that will be returned. + + // If waiting for an AddressArbiter, this is the address being waited on. + VAddr arb_wait_address; + ResultCode arb_wait_result{RESULT_SUCCESS}; ///< Result returned when done waiting on AddressArbiter. std::string name; -- cgit v1.2.3 From 8f8fe62a19060a7c4529c4e0870412e9cd97e841 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 21 Jun 2018 05:13:06 -0600 Subject: Kernel/Arbiters: Initialize arb_wait_address in thread struct. --- src/core/hle/kernel/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/kernel/thread.h') 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: Handle wait_handle; ///< The handle used to wait for the mutex. // If waiting for an AddressArbiter, this is the address being waited on. - VAddr arb_wait_address; + VAddr arb_wait_address{0}; ResultCode arb_wait_result{RESULT_SUCCESS}; ///< Result returned when done waiting on AddressArbiter. std::string name; -- cgit v1.2.3 From dc70a87af1576e29dd6fda1d0313aca260982498 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 21 Jun 2018 20:25:57 -0600 Subject: Kernel/Arbiters: HLE is atomic, adjust code to reflect that. --- src/core/hle/kernel/thread.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 7a28f3c1c..3851d1085 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -233,7 +233,6 @@ public: // If waiting for an AddressArbiter, this is the address being waited on. VAddr arb_wait_address{0}; - ResultCode arb_wait_result{RESULT_SUCCESS}; ///< Result returned when done waiting on AddressArbiter. std::string name; -- cgit v1.2.3 From 08d454e30ddf5031190790c977bfda9422a24118 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 21 Jun 2018 21:05:34 -0600 Subject: Run clang-format on PR. --- src/core/hle/kernel/thread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 3851d1085..f1e759802 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -228,8 +228,8 @@ public: // If waiting on a ConditionVariable, this is the ConditionVariable address VAddr condvar_wait_address; - VAddr mutex_wait_address; ///< If waiting on a Mutex, this is the mutex address - Handle wait_handle; ///< The handle used to wait for the mutex. + VAddr mutex_wait_address; ///< If waiting on a Mutex, this is the mutex address + Handle wait_handle; ///< The handle used to wait for the mutex. // If waiting for an AddressArbiter, this is the address being waited on. VAddr arb_wait_address{0}; -- cgit v1.2.3