diff options
author | bunnei <bunneidev@gmail.com> | 2019-03-12 22:54:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-12 22:54:48 +0100 |
commit | 3bfd199497bd016e79ba27f338c0dd77923080d1 (patch) | |
tree | a34b9dd33b3250026d9164037d2266593b5af568 /src/core/hle/kernel/address_arbiter.h | |
parent | Merge pull request #2222 from lioncash/cstr (diff) | |
parent | kernel: Make the address arbiter instance per-process (diff) | |
download | yuzu-3bfd199497bd016e79ba27f338c0dd77923080d1.tar yuzu-3bfd199497bd016e79ba27f338c0dd77923080d1.tar.gz yuzu-3bfd199497bd016e79ba27f338c0dd77923080d1.tar.bz2 yuzu-3bfd199497bd016e79ba27f338c0dd77923080d1.tar.lz yuzu-3bfd199497bd016e79ba27f338c0dd77923080d1.tar.xz yuzu-3bfd199497bd016e79ba27f338c0dd77923080d1.tar.zst yuzu-3bfd199497bd016e79ba27f338c0dd77923080d1.zip |
Diffstat (limited to 'src/core/hle/kernel/address_arbiter.h')
-rw-r--r-- | src/core/hle/kernel/address_arbiter.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h index e0c36f2e3..ed0d0e69f 100644 --- a/src/core/hle/kernel/address_arbiter.h +++ b/src/core/hle/kernel/address_arbiter.h @@ -4,8 +4,10 @@ #pragma once +#include <vector> + #include "common/common_types.h" -#include "core/hle/kernel/address_arbiter.h" +#include "core/hle/kernel/object.h" union ResultCode; @@ -40,8 +42,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); @@ -59,9 +68,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; |