diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-07-15 13:18:03 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-07-15 13:40:15 -0400 |
| commit | 52e83f0d5c5dbef89fa789ef1da1245781ee183d (patch) | |
| tree | fed5fa3fc37d890a6187ed18fc87dfb4890efb0e /src/core/hle/kernel/handle_table.h | |
| parent | 4ad69ca96e747c2ed23edf7f35c5fedda28b2008 (diff) | |
kernel/handle_table: Remove usages of the global system instance
Removes even more usages of the global system instance, trimming away
more dependencies on global variables and making them explicit in the
interface.
Diffstat (limited to 'src/core/hle/kernel/handle_table.h')
| -rw-r--r-- | src/core/hle/kernel/handle_table.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/hle/kernel/handle_table.h b/src/core/hle/kernel/handle_table.h index 8029660ed..c9dab8cdd 100644 --- a/src/core/hle/kernel/handle_table.h +++ b/src/core/hle/kernel/handle_table.h @@ -14,6 +14,8 @@ namespace Kernel { +class KernelCore; + enum KernelHandle : Handle { InvalidHandle = 0, CurrentThread = 0xFFFF8000, @@ -48,7 +50,7 @@ public: /// This is the maximum limit of handles allowed per process in Horizon static constexpr std::size_t MAX_COUNT = 1024; - HandleTable(); + explicit HandleTable(KernelCore& kernel); ~HandleTable(); /** @@ -134,6 +136,9 @@ private: /// Head of the free slots linked list. u16 next_free_slot = 0; + + /// Underlying kernel instance that this handle table operates under. + KernelCore& kernel; }; } // namespace Kernel |
