mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-13 22:47:57 -05:00
WaitSynchronizationN: Implement return values
This commit is contained in:
@ -32,11 +32,11 @@ public:
|
||||
return available_count > 0;
|
||||
}
|
||||
|
||||
ResultVal<bool> WaitSynchronization() override {
|
||||
ResultVal<bool> WaitSynchronization(unsigned index) override {
|
||||
bool wait = !IsAvailable();
|
||||
|
||||
if (wait) {
|
||||
Kernel::WaitCurrentThread(WAITTYPE_SEMA, this);
|
||||
Kernel::WaitCurrentThread_WaitSynchronization(WAITTYPE_SEMA, this, index);
|
||||
AddWaitingThread(GetCurrentThread());
|
||||
} else {
|
||||
--available_count;
|
||||
@ -82,7 +82,7 @@ ResultCode ReleaseSemaphore(s32* count, Handle handle, s32 release_count) {
|
||||
|
||||
// Notify some of the threads that the semaphore has been released
|
||||
// stop once the semaphore is full again or there are no more waiting threads
|
||||
while (semaphore->IsAvailable() && semaphore->ResumeNextThread() != nullptr) {
|
||||
while (semaphore->IsAvailable() && semaphore->ReleaseNextThread() != nullptr) {
|
||||
--semaphore->available_count;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user