Browse Source
Merge pull request #496 from Subv/waitprocesswidekey_timeout
Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may already have an assigned lock owner.
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
2 deletions
-
src/core/hle/kernel/thread.cpp
|
|
@ -133,8 +133,11 @@ static void ThreadWakeupCallback(u64 thread_handle, int cycles_late) { |
|
|
|
|
|
|
|
|
auto lock_owner = thread->lock_owner; |
|
|
auto lock_owner = thread->lock_owner; |
|
|
// Threads waking up by timeout from WaitProcessWideKey do not perform priority inheritance
|
|
|
// Threads waking up by timeout from WaitProcessWideKey do not perform priority inheritance
|
|
|
// and don't have a lock owner.
|
|
|
|
|
|
ASSERT(lock_owner == nullptr); |
|
|
|
|
|
|
|
|
// and don't have a lock owner unless SignalProcessWideKey was called first and the thread
|
|
|
|
|
|
// wasn't awakened due to the mutex already being acquired.
|
|
|
|
|
|
if (lock_owner) { |
|
|
|
|
|
lock_owner->RemoveMutexWaiter(thread); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (resume) |
|
|
if (resume) |
|
|
|