mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-06 00:59:18 +00:00
Fix sys_rwlock_runlock on waiting readers
readers can wait on the sleep queue if a writer lock has been blocked before it, in this case after runlock: writer should acquire the lock but the r's sleep queue is still not empty!
This commit is contained in:
parent
5141590729
commit
ca08418dc1
@ -246,7 +246,7 @@ error_code sys_rwlock_runlock(ppu_thread& ppu, u32 rw_lock_id)
|
||||
{
|
||||
if (const auto cpu = rwlock->schedule<ppu_thread>(rwlock->wq, rwlock->protocol))
|
||||
{
|
||||
rwlock->owner = cpu->id << 1 | !rwlock->wq.empty();
|
||||
rwlock->owner = cpu->id << 1 | !rwlock->wq.empty() | !rwlock->rq.empty();
|
||||
|
||||
rwlock->awake(*cpu);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user