diff options
author | bunnei <ericbunnie@gmail.com> | 2014-06-11 04:43:50 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-06-13 15:51:19 +0200 |
commit | f49ac3a2d71f06d603b8401817a6dfd9dbc3c4bc (patch) | |
tree | f416ede76f0efb6f5e9c6365789dbfa2b48b0bd1 | |
parent | Event: Updated several log messages to be assertions. (diff) | |
download | yuzu-f49ac3a2d71f06d603b8401817a6dfd9dbc3c4bc.tar yuzu-f49ac3a2d71f06d603b8401817a6dfd9dbc3c4bc.tar.gz yuzu-f49ac3a2d71f06d603b8401817a6dfd9dbc3c4bc.tar.bz2 yuzu-f49ac3a2d71f06d603b8401817a6dfd9dbc3c4bc.tar.lz yuzu-f49ac3a2d71f06d603b8401817a6dfd9dbc3c4bc.tar.xz yuzu-f49ac3a2d71f06d603b8401817a6dfd9dbc3c4bc.tar.zst yuzu-f49ac3a2d71f06d603b8401817a6dfd9dbc3c4bc.zip |
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/kernel.h | 6 | ||||
-rw-r--r-- | src/core/system.cpp | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index e51a9d45a..739ddd4ef 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -132,12 +132,16 @@ Object* ObjectPool::CreateByIDType(int type) { } } +/// Initialize the kernel void Init() { Kernel::ThreadingInit(); } +/// Shutdown the kernel void Shutdown() { Kernel::ThreadingShutdown(); + + g_object_pool.Clear(); // Free all kernel objects } /** diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index d2d624f6d..3f15da0ac 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -167,6 +167,12 @@ private: extern ObjectPool g_object_pool; extern Handle g_main_thread; +/// Initialize the kernel +void Init(); + +/// Shutdown the kernel +void Shutdown(); + /** * Loads executable stored at specified address * @entry_point Entry point in memory of loaded executable diff --git a/src/core/system.cpp b/src/core/system.cpp index c77092327..9b1e96888 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -8,6 +8,7 @@ #include "core/system.h" #include "core/hw/hw.h" #include "core/hle/hle.h" +#include "core/hle/kernel/kernel.h" #include "video_core/video_core.h" @@ -26,6 +27,7 @@ void Init(EmuWindow* emu_window) { HLE::Init(); CoreTiming::Init(); VideoCore::Init(emu_window); + Kernel::Init(); } void RunLoopFor(int cycles) { @@ -42,6 +44,7 @@ void Shutdown() { HLE::Shutdown(); CoreTiming::Shutdown(); VideoCore::Shutdown(); + Kernel::Shutdown(); g_ctr_file_system.Shutdown(); } |