diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-24 11:40:31 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:53 +0200 |
commit | 4b03e6e776e6421c2b2c290b0822b9e5a8556a4c (patch) | |
tree | 87c2925a7adf4109a77b4f015cd36d803d4221fc /src/core/hle/kernel/svc_common.h | |
parent | hle: kernel: KClassToken: Ensure class tokens are correct. (diff) | |
download | yuzu-4b03e6e776e6421c2b2c290b0822b9e5a8556a4c.tar yuzu-4b03e6e776e6421c2b2c290b0822b9e5a8556a4c.tar.gz yuzu-4b03e6e776e6421c2b2c290b0822b9e5a8556a4c.tar.bz2 yuzu-4b03e6e776e6421c2b2c290b0822b9e5a8556a4c.tar.lz yuzu-4b03e6e776e6421c2b2c290b0822b9e5a8556a4c.tar.xz yuzu-4b03e6e776e6421c2b2c290b0822b9e5a8556a4c.tar.zst yuzu-4b03e6e776e6421c2b2c290b0822b9e5a8556a4c.zip |
Diffstat (limited to 'src/core/hle/kernel/svc_common.h')
-rw-r--r-- | src/core/hle/kernel/svc_common.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc_common.h b/src/core/hle/kernel/svc_common.h index 4af049551..8a8f347b5 100644 --- a/src/core/hle/kernel/svc_common.h +++ b/src/core/hle/kernel/svc_common.h @@ -6,9 +6,24 @@ #include "common/common_types.h" +namespace Kernel { +using Handle = u32; +} + namespace Kernel::Svc { constexpr s32 ArgumentHandleCountMax = 0x40; constexpr u32 HandleWaitMask{1u << 30}; +constexpr inline Handle InvalidHandle = Handle(0); + +enum PseudoHandle : Handle { + CurrentThread = 0xFFFF8000, + CurrentProcess = 0xFFFF8001, +}; + +constexpr bool IsPseudoHandle(const Handle& handle) { + return handle == PseudoHandle::CurrentProcess || handle == PseudoHandle::CurrentThread; +} + } // namespace Kernel::Svc |