diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-14 14:30:53 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-02-22 16:18:06 +0100 |
commit | 179bafa7cb1efae5405d38ea9b98dc6b3e1ec756 (patch) | |
tree | e26bc705bf9446b335c29e086b84c61916f44f32 /src/core/hle/kernel/kernel.h | |
parent | Kernel: Make global scheduler depend on KernelCore (diff) | |
download | yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.gz yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.bz2 yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.lz yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.xz yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.zst yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.zip |
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 0dfc559e9..c5e05f7b6 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; |