diff options
author | bunnei <bunneidev@gmail.com> | 2018-02-26 06:04:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 06:04:24 +0100 |
commit | f1beb69899d9706f0ac37e13703496f6bb75e09c (patch) | |
tree | 8559d73b83ca53a6366ce1a5555910e36f34532b /src/core | |
parent | Merge pull request #222 from shinyquagsire23/npdm-parsing (diff) | |
parent | (Hopefully) Fix MinGW Build (diff) | |
download | yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.tar yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.tar.gz yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.tar.bz2 yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.tar.lz yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.tar.xz yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.tar.zst yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 13 | ||||
-rw-r--r-- | src/core/hle/kernel/svc_wrap.h | 5 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 533787ce2..1ab8cbd88 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include <algorithm> +#include <cinttypes> #include "common/logging/log.h" #include "common/microprofile.h" @@ -443,6 +444,16 @@ static ResultCode MapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 s return RESULT_SUCCESS; } +static ResultCode UnmapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size) { + LOG_WARNING(Kernel_SVC, + "called, shared_memory_handle=0x%08X, addr=0x%" PRIx64 ", size=0x%" PRIx64 "", + shared_memory_handle, addr, size); + + SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(shared_memory_handle); + + return shared_memory->Unmap(g_current_process.get(), addr); +} + /// Query process memory static ResultCode QueryProcessMemory(MemoryInfo* memory_info, PageInfo* /*page_info*/, Handle process_handle, u64 addr) { @@ -802,7 +813,7 @@ static const FunctionDef SVC_Table[] = { {0x11, nullptr, "SignalEvent"}, {0x12, SvcWrap<ClearEvent>, "ClearEvent"}, {0x13, SvcWrap<MapSharedMemory>, "MapSharedMemory"}, - {0x14, nullptr, "UnmapSharedMemory"}, + {0x14, SvcWrap<UnmapSharedMemory>, "UnmapSharedMemory"}, {0x15, SvcWrap<CreateTransferMemory>, "CreateTransferMemory"}, {0x16, SvcWrap<CloseHandle>, "CloseHandle"}, {0x17, SvcWrap<ResetSignal>, "ResetSignal"}, diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h index 7a165d8dc..b224f5e67 100644 --- a/src/core/hle/kernel/svc_wrap.h +++ b/src/core/hle/kernel/svc_wrap.h @@ -91,6 +91,11 @@ void SvcWrap() { FuncReturn(func((u32)PARAM(0), PARAM(1), PARAM(2), (u32)PARAM(3)).raw); } +template <ResultCode func(u32, u64, u64)> +void SvcWrap() { + FuncReturn(func((u32)PARAM(0), PARAM(1), PARAM(2)).raw); +} + template <ResultCode func(u32*, u64, u64, s64)> void SvcWrap() { u32 param_1 = 0; |