Skip to content
Snippets Groups Projects
Commit a0ac471c authored by Pavel Puchkin's avatar Pavel Puchkin Committed by Craig Robbins
Browse files

Fixes #1687 by extra semaphore retval handle code for OSX

parent 06207ac5
No related branches found
No related tags found
No related merge requests found
......@@ -115,6 +115,13 @@ bool JSemaphore::Wait(unsigned int time_ms) {
errno = 0;
#ifdef __MACH__
int sem_wait_retval = semaphore_timedwait(m_semaphore, waittime);
if (sem_wait_retval == KERN_OPERATION_TIMED_OUT) {
errno = ETIMEDOUT;
} else if (sem_wait_retval == KERN_ABORTED) {
errno = EINTR;
} else if (sem_wait_retval != 0) {
errno = EINVAL;
}
#else
int sem_wait_retval = sem_timedwait(&m_semaphore, &waittime);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment