mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-06 03:25:36 +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__)
|
||||
semaphore_wait(m_sema);
|
||||
#else
|
||||
sem_wait(&m_sema);
|
||||
do
|
||||
{
|
||||
if (sem_wait(&m_sema) == 0) [[likely]]
|
||||
return;
|
||||
} while (errno == EINTR);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user