diff options
| author | 2018-01-08 14:14:30 -0500 | |
|---|---|---|
| committer | 2018-01-08 21:12:54 -0500 | |
| commit | db3a5251664ae77f5e67dba571a11d208e448a86 (patch) | |
| tree | f53b53b9620ca36a5b8085e3e9d2b603477142fc /src/core/hle/kernel/svc.cpp | |
| parent | Kernel: Properly keep track of mutex lock data in the guest memory. This fixe... (diff) | |
| download | yuzu-db3a5251664ae77f5e67dba571a11d208e448a86.tar.gz yuzu-db3a5251664ae77f5e67dba571a11d208e448a86.tar.xz yuzu-db3a5251664ae77f5e67dba571a11d208e448a86.zip | |
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.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index a3ac3d782..d18d7a182 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -501,7 +501,7 @@ static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr semaphore_add | |||
| 501 | semaphore->name = Common::StringFromFormat("semaphore-%llx", semaphore_addr); | 501 | semaphore->name = Common::StringFromFormat("semaphore-%llx", semaphore_addr); |
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | ASSERT(semaphore->available_count == 0); | 504 | ASSERT(semaphore->GetAvailableCount() == 0); |
| 505 | ASSERT(semaphore->mutex_addr == mutex_addr); | 505 | ASSERT(semaphore->mutex_addr == mutex_addr); |
| 506 | 506 | ||
| 507 | auto wakeup_callback = [mutex, nano_seconds](ThreadWakeupReason reason, | 507 | auto wakeup_callback = [mutex, nano_seconds](ThreadWakeupReason reason, |