diff options
author | Lioncash <mathew1800@gmail.com> | 2018-12-04 21:39:49 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-12-04 21:47:59 +0100 |
commit | a543c35962bf070689ac80be9a57f165c2ae9d33 (patch) | |
tree | 8c2b9532d12c2980bb41e9d21dece03de9a1f9ee /src/core/hle/kernel/svc.cpp | |
parent | kernel/svc: Implement svcCreateEvent() (diff) | |
download | yuzu-a543c35962bf070689ac80be9a57f165c2ae9d33.tar yuzu-a543c35962bf070689ac80be9a57f165c2ae9d33.tar.gz yuzu-a543c35962bf070689ac80be9a57f165c2ae9d33.tar.bz2 yuzu-a543c35962bf070689ac80be9a57f165c2ae9d33.tar.lz yuzu-a543c35962bf070689ac80be9a57f165c2ae9d33.tar.xz yuzu-a543c35962bf070689ac80be9a57f165c2ae9d33.tar.zst yuzu-a543c35962bf070689ac80be9a57f165c2ae9d33.zip |
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index a0e3dc470..830594d72 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1647,6 +1647,21 @@ static ResultCode ClearEvent(Handle handle) { return ERR_INVALID_HANDLE; } +static ResultCode SignalEvent(Handle handle) { + LOG_DEBUG(Kernel_SVC, "called. Handle=0x{:08X}", handle); + + HandleTable& handle_table = Core::CurrentProcess()->GetHandleTable(); + auto writable_event = handle_table.Get<WritableEvent>(handle); + + if (!writable_event) { + LOG_ERROR(Kernel_SVC, "Non-existent writable event handle used (0x{:08X})", handle); + return ERR_INVALID_HANDLE; + } + + writable_event->Signal(); + return RESULT_SUCCESS; +} + static ResultCode GetProcessInfo(u64* out, Handle process_handle, u32 type) { LOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, type=0x{:X}", process_handle, type); @@ -1782,7 +1797,7 @@ static const FunctionDef SVC_Table[] = { {0x0E, SvcWrap<GetThreadCoreMask>, "GetThreadCoreMask"}, {0x0F, SvcWrap<SetThreadCoreMask>, "SetThreadCoreMask"}, {0x10, SvcWrap<GetCurrentProcessorNumber>, "GetCurrentProcessorNumber"}, - {0x11, nullptr, "SignalEvent"}, + {0x11, SvcWrap<SignalEvent>, "SignalEvent"}, {0x12, SvcWrap<ClearEvent>, "ClearEvent"}, {0x13, SvcWrap<MapSharedMemory>, "MapSharedMemory"}, {0x14, SvcWrap<UnmapSharedMemory>, "UnmapSharedMemory"}, |