1abed2f4c4
These only exist to ferry data into a Process instance and end up going out of scope quite early. Because of this, we can just make it a plain struct for holding things and just std::move it into the relevant function. There's no need to make this inherit from the kernel's Object type.
37 lines
925 B
C++
37 lines
925 B
C++
// Copyright 2018 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#include "common/assert.h"
|
|
#include "core/hle/kernel/kernel.h"
|
|
#include "core/hle/kernel/object.h"
|
|
|
|
namespace Kernel {
|
|
|
|
Object::Object(KernelCore& kernel) : kernel{kernel}, object_id{kernel.CreateNewObjectID()} {}
|
|
Object::~Object() = default;
|
|
|
|
bool Object::IsWaitable() const {
|
|
switch (GetHandleType()) {
|
|
case HandleType::Event:
|
|
case HandleType::Thread:
|
|
case HandleType::Timer:
|
|
case HandleType::ServerPort:
|
|
case HandleType::ServerSession:
|
|
return true;
|
|
|
|
case HandleType::Unknown:
|
|
case HandleType::SharedMemory:
|
|
case HandleType::Process:
|
|
case HandleType::AddressArbiter:
|
|
case HandleType::ResourceLimit:
|
|
case HandleType::ClientPort:
|
|
case HandleType::ClientSession:
|
|
return false;
|
|
}
|
|
|
|
UNREACHABLE();
|
|
}
|
|
|
|
} // namespace Kernel
|