diff options
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
-rw-r--r-- | src/core/hle/kernel/kernel.h | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 8a21568f7..2e22fe0f6 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -34,13 +34,16 @@ class KClientPort; class GlobalSchedulerContext; class KAutoObjectWithListContainer; class KClientSession; +class KDebug; +class KDynamicPageManager; class KEvent; +class KEventInfo; class KHandleTable; class KLinkedListNode; -class KMemoryBlockSlabManager; class KMemoryLayout; class KMemoryManager; class KPageBuffer; +class KPageBufferSlabHeap; class KPort; class KProcess; class KResourceLimit; @@ -51,6 +54,7 @@ class KSession; class KSessionRequest; class KSharedMemory; class KSharedMemoryInfo; +class KSecureSystemResource; class KThread; class KThreadLocalPage; class KTransferMemory; @@ -244,11 +248,11 @@ public: /// Gets the virtual memory manager for the kernel. const KMemoryManager& MemoryManager() const; - /// Gets the application memory block manager for the kernel. - KMemoryBlockSlabManager& GetApplicationMemoryBlockManager(); + /// Gets the system resource manager. + KSystemResource& GetSystemSystemResource(); - /// Gets the application memory block manager for the kernel. - const KMemoryBlockSlabManager& GetApplicationMemoryBlockManager() const; + /// Gets the system resource manager. + const KSystemResource& GetSystemSystemResource() const; /// Gets the shared memory object for HID services. Kernel::KSharedMemory& GetHidSharedMem(); @@ -305,24 +309,24 @@ public: * See GetDefaultServiceThread. * @param name String name for the ServerSession creating this thread, used for debug * purposes. - * @returns The a weak pointer newly created service thread. + * @returns A reference to the newly created service thread. */ - std::weak_ptr<Kernel::ServiceThread> CreateServiceThread(const std::string& name); + Kernel::ServiceThread& CreateServiceThread(const std::string& name); /** * Gets the default host service thread, which executes HLE service requests. Unless service * requests need to block on the host, the default service thread should be used in favor of * creating a new service thread. - * @returns The a weak pointer for the default service thread. + * @returns A reference to the default service thread. */ - std::weak_ptr<Kernel::ServiceThread> GetDefaultServiceThread() const; + Kernel::ServiceThread& GetDefaultServiceThread() const; /** * Releases a HLE service thread, instructing KernelCore to free it. This should be called when * the ServerSession associated with the thread is destroyed. * @param service_thread Service thread to release. */ - void ReleaseServiceThread(std::weak_ptr<Kernel::ServiceThread> service_thread); + void ReleaseServiceThread(Kernel::ServiceThread& service_thread); /// Workaround for single-core mode when preempting threads while idle. bool IsPhantomModeForSingleCore() const; @@ -364,6 +368,12 @@ public: return slab_heap_container->thread_local_page; } else if constexpr (std::is_same_v<T, KSessionRequest>) { return slab_heap_container->session_request; + } else if constexpr (std::is_same_v<T, KSecureSystemResource>) { + return slab_heap_container->secure_system_resource; + } else if constexpr (std::is_same_v<T, KEventInfo>) { + return slab_heap_container->event_info; + } else if constexpr (std::is_same_v<T, KDebug>) { + return slab_heap_container->debug; } } @@ -427,6 +437,9 @@ private: KSlabHeap<KPageBuffer> page_buffer; KSlabHeap<KThreadLocalPage> thread_local_page; KSlabHeap<KSessionRequest> session_request; + KSlabHeap<KSecureSystemResource> secure_system_resource; + KSlabHeap<KEventInfo> event_info; + KSlabHeap<KDebug> debug; }; std::unique_ptr<SlabHeapContainer> slab_heap_container; |