kernel/address_arbiter: Pass in system instance to constructor

Allows getting rid of reliance on the global accessor functions and
instead operating on the provided system instance.
This commit is contained in:
Lioncash
2019-03-05 12:28:10 -05:00
parent 9d9676f620
commit c161389a0f
6 changed files with 45 additions and 26 deletions

View File

@ -9,6 +9,10 @@
union ResultCode;
namespace Core {
class System;
}
namespace Kernel {
class Thread;
@ -27,7 +31,7 @@ public:
ModifyByWaitingCountAndSignalIfEqual = 2,
};
AddressArbiter();
explicit AddressArbiter(Core::System& system);
~AddressArbiter();
AddressArbiter(const AddressArbiter&) = delete;
@ -61,6 +65,8 @@ private:
// Gets the threads waiting on an address.
std::vector<SharedPtr<Thread>> GetThreadsWaitingOnAddress(VAddr address) const;
Core::System& system;
};
} // namespace Kernel