diff options
author | David <25727384+ogniK5377@users.noreply.github.com> | 2018-01-20 01:35:25 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-20 01:35:25 +0100 |
commit | 0b6da0c1abaa34a082b627dfe909b6651d8b6fee (patch) | |
tree | a1aa6aeee7e4b435a9d6673b6b829c0e16aedca2 /src/core/hle/kernel/svc.cpp | |
parent | Fixes some cast warnings, partial port of citra #3064 (#106) (diff) | |
download | yuzu-0b6da0c1abaa34a082b627dfe909b6651d8b6fee.tar yuzu-0b6da0c1abaa34a082b627dfe909b6651d8b6fee.tar.gz yuzu-0b6da0c1abaa34a082b627dfe909b6651d8b6fee.tar.bz2 yuzu-0b6da0c1abaa34a082b627dfe909b6651d8b6fee.tar.lz yuzu-0b6da0c1abaa34a082b627dfe909b6651d8b6fee.tar.xz yuzu-0b6da0c1abaa34a082b627dfe909b6651d8b6fee.tar.zst yuzu-0b6da0c1abaa34a082b627dfe909b6651d8b6fee.zip |
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 339374aff..d267b6c2e 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -737,6 +737,18 @@ static ResultCode SetThreadCoreMask(u64, u64, u64) { return RESULT_SUCCESS; } +static ResultCode CreateSharedMemory(Handle* handle, u64 sz, u32 local_permissions, + u32 remote_permissions) { + LOG_TRACE(Kernel_SVC, "called, sz=0x%llx, localPerms=0x%08x, remotePerms=0x%08x", sz, + local_permissions, remote_permissions); + auto sharedMemHandle = SharedMemory::Create( + g_handle_table.Get<Process>(KernelHandle::CurrentProcess), sz, + (Kernel::MemoryPermission)local_permissions, (Kernel::MemoryPermission)remote_permissions); + + CASCADE_RESULT(*handle, g_handle_table.Create(sharedMemHandle)); + return RESULT_SUCCESS; +} + namespace { struct FunctionDef { using Func = void(); @@ -828,7 +840,7 @@ static const FunctionDef SVC_Table[] = { {0x4D, nullptr, "SleepSystem"}, {0x4E, nullptr, "ReadWriteRegister"}, {0x4F, nullptr, "SetProcessActivity"}, - {0x50, nullptr, "CreateSharedMemory"}, + {0x50, SvcWrap<CreateSharedMemory>, "CreateSharedMemory"}, {0x51, nullptr, "MapTransferMemory"}, {0x52, nullptr, "UnmapTransferMemory"}, {0x53, nullptr, "CreateInterruptEvent"}, |