summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc_common.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-08 08:30:17 +0200
committerGitHub <noreply@github.com>2021-05-08 08:30:17 +0200
commitfaa067f175cbf5e916ed75776817f0046e6731c4 (patch)
tree8ab02a72a6e4d6578848c8da2c02af02684aeec7 /src/core/hle/kernel/svc_common.h
parentMerge pull request #6287 from lioncash/ldr-copy (diff)
parenthle: kernel: KPageTable: CanContain should not be constexpr. (diff)
downloadyuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.gz
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.bz2
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.lz
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.xz
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.zst
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc_common.h15
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..60ea2c405 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(Handle handle) {
+ return handle == PseudoHandle::CurrentProcess || handle == PseudoHandle::CurrentThread;
+}
+
} // namespace Kernel::Svc