mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-06 19:45:33 +00:00
Threading: Handle EINTR on sem_wait()
This commit is contained in:
parent
57883910d6
commit
1ca5782396
@ -670,7 +670,11 @@ void Threading::KernelSemaphore::Wait()
|
|||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
semaphore_wait(m_sema);
|
semaphore_wait(m_sema);
|
||||||
#else
|
#else
|
||||||
sem_wait(&m_sema);
|
do
|
||||||
|
{
|
||||||
|
if (sem_wait(&m_sema) == 0) [[likely]]
|
||||||
|
return;
|
||||||
|
} while (errno == EINTR);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user