mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-05 23:07:53 +00:00
bf45092c61
General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
35 lines
825 B
C++
35 lines
825 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/object.h"
|
|
|
|
namespace Kernel {
|
|
|
|
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::CodeSet:
|
|
case HandleType::ClientPort:
|
|
case HandleType::ClientSession:
|
|
return false;
|
|
}
|
|
|
|
UNREACHABLE();
|
|
}
|
|
|
|
} // namespace Kernel
|