diff options
author | bunnei <bunneidev@gmail.com> | 2015-02-02 19:04:04 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-02-02 19:04:04 +0100 |
commit | 7f730ed158bc9bba064100b9644b318134ef0bb3 (patch) | |
tree | c4181a69ff882e1af1b7d65bf3596a6cb3dd88b9 /src/core/hle/kernel/address_arbiter.cpp | |
parent | Merge pull request #517 from bunnei/blend-factors (diff) | |
parent | Kernel: Stop creating useless Handles during object creation (diff) | |
download | yuzu-7f730ed158bc9bba064100b9644b318134ef0bb3.tar yuzu-7f730ed158bc9bba064100b9644b318134ef0bb3.tar.gz yuzu-7f730ed158bc9bba064100b9644b318134ef0bb3.tar.bz2 yuzu-7f730ed158bc9bba064100b9644b318134ef0bb3.tar.lz yuzu-7f730ed158bc9bba064100b9644b318134ef0bb3.tar.xz yuzu-7f730ed158bc9bba064100b9644b318134ef0bb3.tar.zst yuzu-7f730ed158bc9bba064100b9644b318134ef0bb3.zip |
Diffstat (limited to 'src/core/hle/kernel/address_arbiter.cpp')
-rw-r--r-- | src/core/hle/kernel/address_arbiter.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index 2d01e2ef5..42f8ce2d9 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp @@ -15,14 +15,15 @@ namespace Kernel { -ResultVal<SharedPtr<AddressArbiter>> AddressArbiter::Create(std::string name) { +AddressArbiter::AddressArbiter() {} +AddressArbiter::~AddressArbiter() {} + +SharedPtr<AddressArbiter> AddressArbiter::Create(std::string name) { SharedPtr<AddressArbiter> address_arbiter(new AddressArbiter); - // TOOD(yuriks): Don't create Handle (see Thread::Create()) - CASCADE_RESULT(auto unused, Kernel::g_handle_table.Create(address_arbiter)); address_arbiter->name = std::move(name); - return MakeResult<SharedPtr<AddressArbiter>>(std::move(address_arbiter)); + return address_arbiter; } ResultCode AddressArbiter::ArbitrateAddress(ArbitrationType type, VAddr address, s32 value, @@ -51,7 +52,7 @@ ResultCode AddressArbiter::ArbitrateAddress(ArbitrationType type, VAddr address, case ArbitrationType::WaitIfLessThanWithTimeout: if ((s32)Memory::Read32(address) <= value) { Kernel::WaitCurrentThread_ArbitrateAddress(address); - Kernel::WakeThreadAfterDelay(GetCurrentThread(), nanoseconds); + GetCurrentThread()->WakeAfterDelay(nanoseconds); HLE::Reschedule(__func__); } break; @@ -71,7 +72,7 @@ ResultCode AddressArbiter::ArbitrateAddress(ArbitrationType type, VAddr address, Memory::Write32(address, memory_value); if (memory_value <= value) { Kernel::WaitCurrentThread_ArbitrateAddress(address); - Kernel::WakeThreadAfterDelay(GetCurrentThread(), nanoseconds); + GetCurrentThread()->WakeAfterDelay(nanoseconds); HLE::Reschedule(__func__); } break; |