diff options
| author | 2021-01-19 21:07:07 -0800 | |
|---|---|---|
| committer | 2021-01-28 21:42:26 -0800 | |
| commit | 1f99f5473c7a03c791ea20256c7fc2f1caba8adc (patch) | |
| tree | 3dea03c0082e6685aeda2769fd7b186f0afbf46c /src/core/hle/kernel/kernel.h | |
| parent | hle: kernel: TimeManager: Simplify to not rely on previous EmuThreadHandle im... (diff) | |
| download | yuzu-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.h | 6 |
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; | |||
| 46 | class KThread; | 46 | class KThread; |
| 47 | class TimeManager; | 47 | class TimeManager; |
| 48 | 48 | ||
| 49 | using EmuThreadHandle = uintptr_t; | ||
| 50 | constexpr EmuThreadHandle EmuThreadHandleInvalid{}; | ||
| 51 | constexpr EmuThreadHandle EmuThreadHandleReserved{1ULL << 63}; | ||
| 52 | |||
| 49 | /// Represents a single instance of the kernel. | 53 | /// Represents a single instance of the kernel. |
| 50 | class KernelCore { | 54 | class KernelCore { |
| 51 | private: | 55 | private: |
| @@ -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; |