Merge pull request #299 from squidbus/poll-ebusy

Return EBUSY from sceKernelPollEventFlag instead of ETIMEDOUT.
This commit is contained in:
georgemoralis 2024-07-16 15:00:38 +03:00 committed by GitHub
commit c6cdfcfb0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -73,7 +73,12 @@ int EventFlagInternal::Wait(u64 bits, WaitMode wait_mode, ClearMode clear_mode,
int EventFlagInternal::Poll(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result) { int EventFlagInternal::Poll(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result) {
u32 micros = 0; u32 micros = 0;
return Wait(bits, wait_mode, clear_mode, result, &micros); auto ret = Wait(bits, wait_mode, clear_mode, result, &micros);
if (ret == ORBIS_KERNEL_ERROR_ETIMEDOUT) {
// Poll returns EBUSY instead.
ret = ORBIS_KERNEL_ERROR_EBUSY;
}
return ret;
} }
void EventFlagInternal::Set(u64 bits) { void EventFlagInternal::Set(u64 bits) {