diff options
| author | 2018-01-01 14:04:36 -0500 | |
|---|---|---|
| committer | 2018-01-01 14:04:36 -0500 | |
| commit | 9b8afed5f74b0b2be87943d1b417146f59f6de36 (patch) | |
| tree | 6cfe2f4238d41a67b1c309c52245d00950cb23d1 /src/core/hle/svc.cpp | |
| parent | svc: Implement svcLockMutex. (diff) | |
| download | yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.tar.gz yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.tar.xz yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.zip | |
svc: Implement svcUnlockMutex.
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index c0e3200d4..cba94eac3 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -160,6 +160,16 @@ static ResultCode LockMutex(Handle holding_thread_handle, VAddr mutex_addr, | |||
| 160 | return RESULT_SUCCESS; | 160 | return RESULT_SUCCESS; |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | /// Unlock a mutex | ||
| 164 | static ResultCode UnlockMutex(VAddr mutex_addr) { | ||
| 165 | LOG_TRACE(Kernel_SVC, "called mutex_addr=0x%llx", mutex_addr); | ||
| 166 | |||
| 167 | SharedPtr<Kernel::Mutex> mutex = Kernel::g_object_address_table.Get<Kernel::Mutex>(mutex_addr); | ||
| 168 | ASSERT(mutex); | ||
| 169 | |||
| 170 | return mutex->Release(Kernel::GetCurrentThread()); | ||
| 171 | } | ||
| 172 | |||
| 163 | /// Break program execution | 173 | /// Break program execution |
| 164 | static void Break(u64 unk_0, u64 unk_1, u64 unk_2) { | 174 | static void Break(u64 unk_0, u64 unk_1, u64 unk_2) { |
| 165 | LOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!"); | 175 | LOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!"); |
| @@ -409,8 +419,8 @@ static const FunctionDef SVC_Table[] = { | |||
| 409 | {0x17, nullptr, "svcResetSignal"}, | 419 | {0x17, nullptr, "svcResetSignal"}, |
| 410 | {0x18, nullptr, "svcWaitSynchronization"}, | 420 | {0x18, nullptr, "svcWaitSynchronization"}, |
| 411 | {0x19, nullptr, "svcCancelSynchronization"}, | 421 | {0x19, nullptr, "svcCancelSynchronization"}, |
| 412 | {0x1B, nullptr, "svcUnlockMutex"}, | ||
| 413 | {0x1A, HLE::Wrap<LockMutex>, "svcLockMutex"}, | 422 | {0x1A, HLE::Wrap<LockMutex>, "svcLockMutex"}, |
| 423 | {0x1B, HLE::Wrap<UnlockMutex>, "svcUnlockMutex"}, | ||
| 414 | {0x1C, nullptr, "svcWaitProcessWideKeyAtomic"}, | 424 | {0x1C, nullptr, "svcWaitProcessWideKeyAtomic"}, |
| 415 | {0x1D, HLE::Wrap<SignalProcessWideKey>, "svcSignalProcessWideKey"}, | 425 | {0x1D, HLE::Wrap<SignalProcessWideKey>, "svcSignalProcessWideKey"}, |
| 416 | {0x1E, nullptr, "svcGetSystemTick"}, | 426 | {0x1E, nullptr, "svcGetSystemTick"}, |