summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/kernel/handle_table.cpp9
-rw-r--r--src/core/hle/kernel/handle_table.h7
2 files changed, 9 insertions, 7 deletions
diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp
index 9f2b996c4..1bf79b692 100644
--- a/src/core/hle/kernel/handle_table.cpp
+++ b/src/core/hle/kernel/handle_table.cpp
@@ -12,6 +12,15 @@
12#include "core/hle/kernel/thread.h" 12#include "core/hle/kernel/thread.h"
13 13
14namespace Kernel { 14namespace Kernel {
15namespace {
16constexpr u16 GetSlot(Handle handle) {
17 return handle >> 15;
18}
19
20constexpr u16 GetGeneration(Handle handle) {
21 return handle & 0x7FFF;
22}
23} // Anonymous namespace
15 24
16HandleTable::HandleTable() { 25HandleTable::HandleTable() {
17 next_generation = 1; 26 next_generation = 1;
diff --git a/src/core/hle/kernel/handle_table.h b/src/core/hle/kernel/handle_table.h
index ae3116afc..e3f3e3fb8 100644
--- a/src/core/hle/kernel/handle_table.h
+++ b/src/core/hle/kernel/handle_table.h
@@ -93,13 +93,6 @@ private:
93 /// This is the maximum limit of handles allowed per process in Horizon 93 /// This is the maximum limit of handles allowed per process in Horizon
94 static constexpr std::size_t MAX_COUNT = 1024; 94 static constexpr std::size_t MAX_COUNT = 1024;
95 95
96 static u16 GetSlot(Handle handle) {
97 return handle >> 15;
98 }
99 static u16 GetGeneration(Handle handle) {
100 return handle & 0x7FFF;
101 }
102
103 /// Stores the Object referenced by the handle or null if the slot is empty. 96 /// Stores the Object referenced by the handle or null if the slot is empty.
104 std::array<SharedPtr<Object>, MAX_COUNT> objects; 97 std::array<SharedPtr<Object>, MAX_COUNT> objects;
105 98