src/thread/pthread/SDL_syssem.c
changeset 6298 9110462bfc57
parent 6219 8e94af244f2c
child 6885 700f1b25f77f
--- a/src/thread/pthread/SDL_syssem.c	Mon Feb 20 23:37:57 2012 -0500
+++ b/src/thread/pthread/SDL_syssem.c	Mon Feb 20 23:51:53 2012 -0500
@@ -150,7 +150,11 @@
     } while (retval < 0 && errno == EINTR);
 
     if (retval < 0) {
-        SDL_SetError("sem_timedwait() failed");
+        if (errno == ETIMEDOUT) {
+            retval = SDL_MUTEX_TIMEDOUT;
+        } else {
+            SDL_SetError(strerror(errno));
+        }
     }
 #else
     end = SDL_GetTicks() + timeout;