kernel: k_light_lock: Simplify EmuThreadHandle implementation.

This commit is contained in:
bunnei
2021-01-19 21:07:07 -08:00
parent c0f5830323
commit 1f99f5473c
5 changed files with 33 additions and 51 deletions

View File

@ -46,6 +46,10 @@ class Synchronization;
class KThread;
class TimeManager;
using EmuThreadHandle = uintptr_t;
constexpr EmuThreadHandle EmuThreadHandleInvalid{};
constexpr EmuThreadHandle EmuThreadHandleReserved{1ULL << 63};
/// Represents a single instance of the kernel.
class KernelCore {
private:
@ -162,7 +166,7 @@ public:
bool IsValidNamedPort(NamedPortTable::const_iterator port) const;
/// Gets the current host_thread/guest_thread handle.
Core::EmuThreadHandle GetCurrentEmuThreadID() const;
EmuThreadHandle GetCurrentEmuThreadID() const;
/// Gets the current host_thread handle.
u32 GetCurrentHostThreadID() const;