mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-11-30 11:28:25 -05:00
39 lines
989 B
C++
39 lines
989 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::ReadableEvent:
|
||
|
case HandleType::Thread:
|
||
|
case HandleType::Process:
|
||
|
case HandleType::ServerPort:
|
||
|
case HandleType::ServerSession:
|
||
|
return true;
|
||
|
|
||
|
case HandleType::Unknown:
|
||
|
case HandleType::WritableEvent:
|
||
|
case HandleType::SharedMemory:
|
||
|
case HandleType::TransferMemory:
|
||
|
case HandleType::ResourceLimit:
|
||
|
case HandleType::ClientPort:
|
||
|
case HandleType::ClientSession:
|
||
|
case HandleType::Session:
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
UNREACHABLE();
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
} // namespace Kernel
|