diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-11 17:46:49 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-30 14:47:06 +0100 |
commit | 38e7122f23424d40e0555fa40daeff55e23e4da4 (patch) | |
tree | 37c52c6f20c49fc1093f9228b5c78406b5cdc6ff /src/core/hle/kernel/address_arbiter.h | |
parent | Kernel: Convert Semaphore to not use Handles (diff) | |
download | yuzu-38e7122f23424d40e0555fa40daeff55e23e4da4.tar yuzu-38e7122f23424d40e0555fa40daeff55e23e4da4.tar.gz yuzu-38e7122f23424d40e0555fa40daeff55e23e4da4.tar.bz2 yuzu-38e7122f23424d40e0555fa40daeff55e23e4da4.tar.lz yuzu-38e7122f23424d40e0555fa40daeff55e23e4da4.tar.xz yuzu-38e7122f23424d40e0555fa40daeff55e23e4da4.tar.zst yuzu-38e7122f23424d40e0555fa40daeff55e23e4da4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/address_arbiter.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h index 81084bdc8..536f0f017 100644 --- a/src/core/hle/kernel/address_arbiter.h +++ b/src/core/hle/kernel/address_arbiter.h @@ -26,8 +26,28 @@ enum class ArbitrationType : u32 { DecrementAndWaitIfLessThanWithTimeout, }; -ResultCode ArbitrateAddress(Handle handle, ArbitrationType type, u32 address, s32 value, u64 nanoseconds); +class AddressArbiter : public Object { +public: + /** + * Creates an address arbiter. + * + * @param name Optional name used for debugging. + * @returns The created AddressArbiter. + */ + static ResultVal<SharedPtr<AddressArbiter>> Create(std::string name = "Unknown"); -Handle CreateAddressArbiter(const std::string& name = "Unknown"); + std::string GetTypeName() const override { return "Arbiter"; } + std::string GetName() const override { return name; } + + static const HandleType HANDLE_TYPE = HandleType::AddressArbiter; + HandleType GetHandleType() const override { return HANDLE_TYPE; } + + std::string name; ///< Name of address arbiter object (optional) + + ResultCode ArbitrateAddress(ArbitrationType type, VAddr address, s32 value, u64 nanoseconds); + +private: + AddressArbiter() = default; +}; } // namespace FileSys |