diff options
author | Lioncash <mathew1800@gmail.com> | 2018-11-22 00:30:58 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-11-22 00:31:01 +0100 |
commit | 0e35f1bb18b71fcb936b3a00e6bda0fa82a0b59c (patch) | |
tree | 53941cfab7535f6fa7df24ee777d086ce4f495ec /src/core/hle/kernel/handle_table.cpp | |
parent | kernel/handle_table: Restrict handle table size to 1024 entries (diff) | |
download | yuzu-0e35f1bb18b71fcb936b3a00e6bda0fa82a0b59c.tar yuzu-0e35f1bb18b71fcb936b3a00e6bda0fa82a0b59c.tar.gz yuzu-0e35f1bb18b71fcb936b3a00e6bda0fa82a0b59c.tar.bz2 yuzu-0e35f1bb18b71fcb936b3a00e6bda0fa82a0b59c.tar.lz yuzu-0e35f1bb18b71fcb936b3a00e6bda0fa82a0b59c.tar.xz yuzu-0e35f1bb18b71fcb936b3a00e6bda0fa82a0b59c.tar.zst yuzu-0e35f1bb18b71fcb936b3a00e6bda0fa82a0b59c.zip |
Diffstat (limited to 'src/core/hle/kernel/handle_table.cpp')
-rw-r--r-- | src/core/hle/kernel/handle_table.cpp | 9 |
1 files changed, 9 insertions, 0 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 @@ #include "core/hle/kernel/thread.h" namespace Kernel { +namespace { +constexpr u16 GetSlot(Handle handle) { + return handle >> 15; +} + +constexpr u16 GetGeneration(Handle handle) { + return handle & 0x7FFF; +} +} // Anonymous namespace HandleTable::HandleTable() { next_generation = 1; |