summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-02-25 21:04:24 -0800
committerGravatar GitHub2018-02-25 21:04:24 -0800
commitf1beb69899d9706f0ac37e13703496f6bb75e09c (patch)
tree8559d73b83ca53a6366ce1a5555910e36f34532b /src/core/hle/kernel/svc.cpp
parentMerge pull request #222 from shinyquagsire23/npdm-parsing (diff)
parent(Hopefully) Fix MinGW Build (diff)
downloadyuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.tar.gz
yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.tar.xz
yuzu-f1beb69899d9706f0ac37e13703496f6bb75e09c.zip
Merge pull request #215 from N00byKing/umapsharedmmry
UnmapSharedMemory
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp13
1 files changed, 12 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 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm> 5#include <algorithm>
6#include <cinttypes>
6 7
7#include "common/logging/log.h" 8#include "common/logging/log.h"
8#include "common/microprofile.h" 9#include "common/microprofile.h"
@@ -443,6 +444,16 @@ static ResultCode MapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 s
443 return RESULT_SUCCESS; 444 return RESULT_SUCCESS;
444} 445}
445 446
447static ResultCode UnmapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size) {
448 LOG_WARNING(Kernel_SVC,
449 "called, shared_memory_handle=0x%08X, addr=0x%" PRIx64 ", size=0x%" PRIx64 "",
450 shared_memory_handle, addr, size);
451
452 SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(shared_memory_handle);
453
454 return shared_memory->Unmap(g_current_process.get(), addr);
455}
456
446/// Query process memory 457/// Query process memory
447static ResultCode QueryProcessMemory(MemoryInfo* memory_info, PageInfo* /*page_info*/, 458static ResultCode QueryProcessMemory(MemoryInfo* memory_info, PageInfo* /*page_info*/,
448 Handle process_handle, u64 addr) { 459 Handle process_handle, u64 addr) {
@@ -802,7 +813,7 @@ static const FunctionDef SVC_Table[] = {
802 {0x11, nullptr, "SignalEvent"}, 813 {0x11, nullptr, "SignalEvent"},
803 {0x12, SvcWrap<ClearEvent>, "ClearEvent"}, 814 {0x12, SvcWrap<ClearEvent>, "ClearEvent"},
804 {0x13, SvcWrap<MapSharedMemory>, "MapSharedMemory"}, 815 {0x13, SvcWrap<MapSharedMemory>, "MapSharedMemory"},
805 {0x14, nullptr, "UnmapSharedMemory"}, 816 {0x14, SvcWrap<UnmapSharedMemory>, "UnmapSharedMemory"},
806 {0x15, SvcWrap<CreateTransferMemory>, "CreateTransferMemory"}, 817 {0x15, SvcWrap<CreateTransferMemory>, "CreateTransferMemory"},
807 {0x16, SvcWrap<CloseHandle>, "CloseHandle"}, 818 {0x16, SvcWrap<CloseHandle>, "CloseHandle"},
808 {0x17, SvcWrap<ResetSignal>, "ResetSignal"}, 819 {0x17, SvcWrap<ResetSignal>, "ResetSignal"},