summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-03-04 16:52:33 -0500
committerLioncash <mathew1800@gmail.com>2019-03-04 16:52:36 -0500
commitf59040d7525152d53a0b47a4841c76877c4e4bac (patch)
treea7c15edf202f819740e9e1ecf2322094895c07a6 /src
parent07e13d6728868e5cb91615bec3aa6dfe9ec62b7b (diff)
kernel/shared_memory: Get rid of the use of global accessor functions within Create()
Given we already pass in a reference to the kernel that the shared memory instance is created under, we can just use that to check the current process, rather than using the global accessor functions. This allows removing direct dependency on the system instance entirely.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/shared_memory.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index 22d0c1dd5..62861da36 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -6,7 +6,6 @@
#include "common/assert.h"
#include "common/logging/log.h"
-#include "core/core.h"
#include "core/hle/kernel/errors.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/shared_memory.h"
@@ -34,8 +33,8 @@ SharedPtr<SharedMemory> SharedMemory::Create(KernelCore& kernel, Process* owner_
shared_memory->backing_block_offset = 0;
// Refresh the address mappings for the current process.
- if (Core::CurrentProcess() != nullptr) {
- Core::CurrentProcess()->VMManager().RefreshMemoryBlockMappings(
+ if (kernel.CurrentProcess() != nullptr) {
+ kernel.CurrentProcess()->VMManager().RefreshMemoryBlockMappings(
shared_memory->backing_block.get());
}
} else {