diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-03-07 18:42:44 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-03-07 23:27:47 -0500 |
| commit | b7f331afa3db235db39eca041fef720873f3091a (patch) | |
| tree | cf2a5f7a3744fb7ed2104bf166aa65433377f1c1 /src/core/hle/kernel/address_arbiter.h | |
| parent | 0209de123b0e8dfd793d23c6a9cb825ea6da5b8e (diff) | |
kernel/svc: Move address arbiter signaling behind a unified API function
Similar to how WaitForAddress was isolated to its own function, we can
also move the necessary conditional checking into the address arbiter
class itself, allowing us to hide the implementation details of it from
public use.
Diffstat (limited to 'src/core/hle/kernel/address_arbiter.h')
| -rw-r--r-- | src/core/hle/kernel/address_arbiter.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h index ebda75b2a..801ab6dab 100644 --- a/src/core/hle/kernel/address_arbiter.h +++ b/src/core/hle/kernel/address_arbiter.h @@ -40,8 +40,15 @@ public: AddressArbiter(AddressArbiter&&) = default; AddressArbiter& operator=(AddressArbiter&&) = delete; + /// Signals an address being waited on with a particular signaling type. + ResultCode SignalToAddress(VAddr address, SignalType type, s32 value, s32 num_to_wake); + + /// Waits on an address with a particular arbitration type. + ResultCode WaitForAddress(VAddr address, ArbitrationType type, s32 value, s64 timeout_ns); + +private: /// Signals an address being waited on. - ResultCode SignalToAddress(VAddr address, s32 num_to_wake); + ResultCode SignalToAddressOnly(VAddr address, s32 num_to_wake); /// Signals an address being waited on and increments its value if equal to the value argument. ResultCode IncrementAndSignalToAddressIfEqual(VAddr address, s32 value, s32 num_to_wake); @@ -51,10 +58,6 @@ public: ResultCode ModifyByWaitingCountAndSignalToAddressIfEqual(VAddr address, s32 value, s32 num_to_wake); - /// Waits on an address with a particular arbitration type. - ResultCode WaitForAddress(VAddr address, ArbitrationType type, s32 value, s64 timeout_ns); - -private: /// Waits on an address if the value passed is less than the argument value, /// optionally decrementing. ResultCode WaitForAddressIfLessThan(VAddr address, s32 value, s64 timeout, |
