Replace g_kernel with Core::Global etc.

This commit is contained in:
Hamish Milne 2019-12-25 18:51:56 +00:00 committed by zhupengfei
parent e707685c2a
commit 3e752002c4
15 changed files with 43 additions and 17 deletions

View file

@ -12,6 +12,7 @@
#include "core/hle/kernel/mutex.h"
#include "core/hle/kernel/object.h"
#include "core/hle/kernel/thread.h"
#include "core/global.h"
SERIALIZE_EXPORT_IMPL(Kernel::Mutex)
@ -26,7 +27,7 @@ void ReleaseThreadMutexes(Thread* thread) {
thread->held_mutexes.clear();
}
Mutex::Mutex() : kernel(*g_kernel) {}
Mutex::Mutex() : kernel(Core::Global<KernelSystem>()) {}
Mutex::~Mutex() {}
std::shared_ptr<Mutex> KernelSystem::CreateMutex(bool initial_locked, std::string name) {