diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-03-07 18:34:22 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-03-07 23:27:20 -0500 |
| commit | 0209de123b0e8dfd793d23c6a9cb825ea6da5b8e (patch) | |
| tree | b089c5609f00730b21c1d7d31d77a0dfd9106b10 /src/core/hle/kernel/address_arbiter.h | |
| parent | 3b63a46ca4dd515ccbf376e9fb4a4afed077b616 (diff) | |
kernel/svc: Move address arbiter waiting behind a unified API function
Rather than let the service call itself work out which function is the
proper one to call, we can make that a behavior of the arbiter itself,
so we don't need to directly expose those implementation details.
Diffstat (limited to 'src/core/hle/kernel/address_arbiter.h')
| -rw-r--r-- | src/core/hle/kernel/address_arbiter.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h index e0c36f2e3..ebda75b2a 100644 --- a/src/core/hle/kernel/address_arbiter.h +++ b/src/core/hle/kernel/address_arbiter.h @@ -51,6 +51,10 @@ 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, @@ -59,9 +63,8 @@ public: /// Waits on an address if the value passed is equal to the argument value. ResultCode WaitForAddressIfEqual(VAddr address, s32 value, s64 timeout); -private: // Waits on the given address with a timeout in nanoseconds - ResultCode WaitForAddress(VAddr address, s64 timeout); + ResultCode WaitForAddressImpl(VAddr address, s64 timeout); // Gets the threads waiting on an address. std::vector<SharedPtr<Thread>> GetThreadsWaitingOnAddress(VAddr address) const; |
