diff options
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -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, | |||
| 204 | SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle); | 204 | SharedPtr<Thread> holding_thread = g_handle_table.Get<Thread>(holding_thread_handle); |
| 205 | SharedPtr<Thread> requesting_thread = g_handle_table.Get<Thread>(requesting_thread_handle); | 205 | SharedPtr<Thread> requesting_thread = g_handle_table.Get<Thread>(requesting_thread_handle); |
| 206 | 206 | ||
| 207 | ASSERT(holding_thread); | ||
| 208 | ASSERT(requesting_thread); | 207 | ASSERT(requesting_thread); |
| 209 | 208 | ||
| 210 | SharedPtr<Mutex> mutex = g_object_address_table.Get<Mutex>(mutex_addr); | 209 | 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, | |||
| 214 | mutex->name = Common::StringFromFormat("mutex-%llx", mutex_addr); | 213 | mutex->name = Common::StringFromFormat("mutex-%llx", mutex_addr); |
| 215 | } | 214 | } |
| 216 | 215 | ||
| 216 | ASSERT(holding_thread == mutex->GetHoldingThread()); | ||
| 217 | |||
| 217 | return WaitSynchronization1(mutex, requesting_thread.get()); | 218 | return WaitSynchronization1(mutex, requesting_thread.get()); |
| 218 | } | 219 | } |
| 219 | 220 | ||
| @@ -491,6 +492,8 @@ static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr semaphore_add | |||
| 491 | mutex->name = Common::StringFromFormat("mutex-%llx", mutex_addr); | 492 | mutex->name = Common::StringFromFormat("mutex-%llx", mutex_addr); |
| 492 | } | 493 | } |
| 493 | 494 | ||
| 495 | ASSERT(mutex->GetOwnerHandle() == thread_handle); | ||
| 496 | |||
| 494 | SharedPtr<Semaphore> semaphore = g_object_address_table.Get<Semaphore>(semaphore_addr); | 497 | SharedPtr<Semaphore> semaphore = g_object_address_table.Get<Semaphore>(semaphore_addr); |
| 495 | if (!semaphore) { | 498 | if (!semaphore) { |
| 496 | // Create a new semaphore for the specified address if one does not already exist | 499 | // Create a new semaphore for the specified address if one does not already exist |