mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-27 10:51:21 -08:00
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.
This commit is contained in:
parent
07e13d6728
commit
f59040d752
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
|
||||||
#include "core/hle/kernel/errors.h"
|
#include "core/hle/kernel/errors.h"
|
||||||
#include "core/hle/kernel/kernel.h"
|
#include "core/hle/kernel/kernel.h"
|
||||||
#include "core/hle/kernel/shared_memory.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;
|
shared_memory->backing_block_offset = 0;
|
||||||
|
|
||||||
// Refresh the address mappings for the current process.
|
// Refresh the address mappings for the current process.
|
||||||
if (Core::CurrentProcess() != nullptr) {
|
if (kernel.CurrentProcess() != nullptr) {
|
||||||
Core::CurrentProcess()->VMManager().RefreshMemoryBlockMappings(
|
kernel.CurrentProcess()->VMManager().RefreshMemoryBlockMappings(
|
||||||
shared_memory->backing_block.get());
|
shared_memory->backing_block.get());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user