mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-14 06:07:55 -05:00
Kernel: Actually wake up the requested number of threads in Semaphore::Release.
Also properly keep track of data in guest memory, this fixes managing the semaphore from userland. It was found that Semaphores are actually Condition Variables, with Release(1) and Release(-1) being equivalent to notify_one and notify_all. We should change the name of the class to reflect this.
This commit is contained in:
@ -501,7 +501,7 @@ static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr semaphore_add
|
||||
semaphore->name = Common::StringFromFormat("semaphore-%llx", semaphore_addr);
|
||||
}
|
||||
|
||||
ASSERT(semaphore->available_count == 0);
|
||||
ASSERT(semaphore->GetAvailableCount() == 0);
|
||||
ASSERT(semaphore->mutex_addr == mutex_addr);
|
||||
|
||||
auto wakeup_callback = [mutex, nano_seconds](ThreadWakeupReason reason,
|
||||
|
Reference in New Issue
Block a user