summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.h
diff options
context:
space:
mode:
authorGravatar bunnei2021-01-19 21:07:07 -0800
committerGravatar bunnei2021-01-28 21:42:26 -0800
commit1f99f5473c7a03c791ea20256c7fc2f1caba8adc (patch)
tree3dea03c0082e6685aeda2769fd7b186f0afbf46c /src/core/hle/kernel/kernel.h
parenthle: kernel: TimeManager: Simplify to not rely on previous EmuThreadHandle im... (diff)
downloadyuzu-1f99f5473c7a03c791ea20256c7fc2f1caba8adc.tar.gz
yuzu-1f99f5473c7a03c791ea20256c7fc2f1caba8adc.tar.xz
yuzu-1f99f5473c7a03c791ea20256c7fc2f1caba8adc.zip
kernel: k_light_lock: Simplify EmuThreadHandle implementation.
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
-rw-r--r--src/core/hle/kernel/kernel.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index fc58f3ecb..b92c017f6 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -46,6 +46,10 @@ class Synchronization;
46class KThread; 46class KThread;
47class TimeManager; 47class TimeManager;
48 48
49using EmuThreadHandle = uintptr_t;
50constexpr EmuThreadHandle EmuThreadHandleInvalid{};
51constexpr EmuThreadHandle EmuThreadHandleReserved{1ULL << 63};
52
49/// Represents a single instance of the kernel. 53/// Represents a single instance of the kernel.
50class KernelCore { 54class KernelCore {
51private: 55private:
@@ -162,7 +166,7 @@ public:
162 bool IsValidNamedPort(NamedPortTable::const_iterator port) const; 166 bool IsValidNamedPort(NamedPortTable::const_iterator port) const;
163 167
164 /// Gets the current host_thread/guest_thread handle. 168 /// Gets the current host_thread/guest_thread handle.
165 Core::EmuThreadHandle GetCurrentEmuThreadID() const; 169 EmuThreadHandle GetCurrentEmuThreadID() const;
166 170
167 /// Gets the current host_thread handle. 171 /// Gets the current host_thread handle.
168 u32 GetCurrentHostThreadID() const; 172 u32 GetCurrentHostThreadID() const;