diff options
author | Subv <subv2112@gmail.com> | 2018-01-08 20:12:03 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-09 03:12:51 +0100 |
commit | 1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c (patch) | |
tree | 71a8fc9f6ab552fb242923372238f691caa4e3d6 /src/core/hle/kernel/svc.cpp | |
parent | Kernel: Allow chaining WaitSynchronization calls inside a wakeup callback. (diff) | |
download | yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.tar yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.tar.gz yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.tar.bz2 yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.tar.lz yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.tar.xz yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.tar.zst yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 73793955a..a3ac3d782 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -204,7 +204,6 @@ static ResultCode LockMutex(Handle holding_thread_handle, VAddr mutex_addr, SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle); SharedPtr<Thread> requesting_thread = g_handle_table.Get<Thread>(requesting_thread_handle); - ASSERT(holding_thread); ASSERT(requesting_thread); SharedPtr<Mutex> mutex = g_object_address_table.Get<Mutex>(mutex_addr); @@ -214,6 +213,8 @@ static ResultCode LockMutex(Handle holding_thread_handle, VAddr mutex_addr, mutex->name = Common::StringFromFormat("mutex-%llx", mutex_addr); } + ASSERT(holding_thread == mutex->GetHoldingThread()); + return WaitSynchronization1(mutex, requesting_thread.get()); } @@ -491,6 +492,8 @@ static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr semaphore_add mutex->name = Common::StringFromFormat("mutex-%llx", mutex_addr); } + ASSERT(mutex->GetOwnerHandle() == thread_handle); + SharedPtr<Semaphore> semaphore = g_object_address_table.Get<Semaphore>(semaphore_addr); if (!semaphore) { // Create a new semaphore for the specified address if one does not already exist |