summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-01 20:04:36 +0100
committerbunnei <bunneidev@gmail.com>2018-01-01 20:04:36 +0100
commit9b8afed5f74b0b2be87943d1b417146f59f6de36 (patch)
tree6cfe2f4238d41a67b1c309c52245d00950cb23d1 /src/core/hle
parentsvc: Implement svcLockMutex. (diff)
downloadyuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.tar
yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.tar.gz
yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.tar.bz2
yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.tar.lz
yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.tar.xz
yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.tar.zst
yuzu-9b8afed5f74b0b2be87943d1b417146f59f6de36.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/svc.cpp12
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,
return RESULT_SUCCESS;
}
+/// Unlock a mutex
+static ResultCode UnlockMutex(VAddr mutex_addr) {
+ LOG_TRACE(Kernel_SVC, "called mutex_addr=0x%llx", mutex_addr);
+
+ SharedPtr<Kernel::Mutex> mutex = Kernel::g_object_address_table.Get<Kernel::Mutex>(mutex_addr);
+ ASSERT(mutex);
+
+ return mutex->Release(Kernel::GetCurrentThread());
+}
+
/// Break program execution
static void Break(u64 unk_0, u64 unk_1, u64 unk_2) {
LOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!");
@@ -409,8 +419,8 @@ static const FunctionDef SVC_Table[] = {
{0x17, nullptr, "svcResetSignal"},
{0x18, nullptr, "svcWaitSynchronization"},
{0x19, nullptr, "svcCancelSynchronization"},
- {0x1B, nullptr, "svcUnlockMutex"},
{0x1A, HLE::Wrap<LockMutex>, "svcLockMutex"},
+ {0x1B, HLE::Wrap<UnlockMutex>, "svcUnlockMutex"},
{0x1C, nullptr, "svcWaitProcessWideKeyAtomic"},
{0x1D, HLE::Wrap<SignalProcessWideKey>, "svcSignalProcessWideKey"},
{0x1E, nullptr, "svcGetSystemTick"},