Thread: Keep track of multiple wait objects.

This commit is contained in:
bunnei
2015-01-14 23:41:33 -05:00
parent 14cbbf4d9b
commit 1f7a04f05a
3 changed files with 30 additions and 16 deletions

View File

@ -15,7 +15,7 @@
namespace Kernel {
class AddressArbiter : public Object {
class AddressArbiter : public WaitObject {
public:
std::string GetTypeName() const override { return "Arbiter"; }
std::string GetName() const override { return name; }
@ -30,7 +30,8 @@ public:
/// Arbitrate an address
ResultCode ArbitrateAddress(Handle handle, ArbitrationType type, u32 address, s32 value, u64 nanoseconds) {
Object* object = Kernel::g_handle_table.GetGeneric(handle).get();
WaitObject* object = static_cast<WaitObject*>(Kernel::g_handle_table.GetGeneric(handle).get());
if (object == nullptr)
return InvalidHandle(ErrorModule::Kernel);