diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-14 09:30:53 -0400 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-02-22 11:18:06 -0400 |
commit | 179bafa7cb1efae5405d38ea9b98dc6b3e1ec756 (patch) | |
tree | e26bc705bf9446b335c29e086b84c61916f44f32 /src/core/hle/kernel/kernel.h | |
parent | 0728dfef84ded5e68bdb3b0781ea00ca7cc85659 (diff) |
Kernel: Rename ThreadCallbackHandleTable and Setup Thread Ids on Kernel.
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
-rw-r--r-- | src/core/hle/kernel/kernel.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 0dfc559e94..c5e05f7b6a 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -8,6 +8,7 @@ #include <string> #include <unordered_map> #include <vector> +#include "core/hardware_properties.h" #include "core/hle/kernel/object.h" namespace Core { @@ -65,7 +66,7 @@ public: std::shared_ptr<ResourceLimit> GetSystemResourceLimit() const; /// Retrieves a shared pointer to a Thread instance within the thread wakeup handle table. - std::shared_ptr<Thread> RetrieveThreadFromWakeupCallbackHandleTable(Handle handle) const; + std::shared_ptr<Thread> RetrieveThreadFromGlobalHandleTable(Handle handle) const; /// Adds the given shared pointer to an internal list of active processes. void AppendNewProcess(std::shared_ptr<Process> process); @@ -127,6 +128,18 @@ public: /// Determines whether or not the given port is a valid named port. bool IsValidNamedPort(NamedPortTable::const_iterator port) const; + /// Gets the current host_thread/guest_thread handle. + Core::EmuThreadHandle GetCurrentEmuThreadId() const; + + /// Gets the current host_thread handle. + u32 GetCurrentHostThreadId() const; + + /// Register the current thread as a CPU Core Thread. + void RegisterCoreThread(std::size_t core_id); + + /// Register the current thread as a non CPU core thread. + void RegisterHostThread(); + private: friend class Object; friend class Process; @@ -147,11 +160,11 @@ private: /// Retrieves the event type used for thread wakeup callbacks. const std::shared_ptr<Core::Timing::EventType>& ThreadWakeupCallbackEventType() const; - /// Provides a reference to the thread wakeup callback handle table. - Kernel::HandleTable& ThreadWakeupCallbackHandleTable(); + /// Provides a reference to the global handle table. + Kernel::HandleTable& GlobalHandleTable(); - /// Provides a const reference to the thread wakeup callback handle table. - const Kernel::HandleTable& ThreadWakeupCallbackHandleTable() const; + /// Provides a const reference to the global handle table. + const Kernel::HandleTable& GlobalHandleTable() const; struct Impl; std::unique_ptr<Impl> impl; |