summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/object.cpp')
-rw-r--r--src/core/hle/kernel/object.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/core/hle/kernel/object.cpp b/src/core/hle/kernel/object.cpp
new file mode 100644
index 000000000..cdba272f5
--- /dev/null
+++ b/src/core/hle/kernel/object.cpp
@@ -0,0 +1,35 @@
+// 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