src/thread/pthread/SDL_syssem.c
changeset 8831 9326ec96c132
parent 8149 681eb46b8ac4
child 9244 9f8962b9b09e
equal deleted inserted replaced
8830:2d74f0c59cc7 8831:9326ec96c132
   148 
   148 
   149     if (retval < 0) {
   149     if (retval < 0) {
   150         if (errno == ETIMEDOUT) {
   150         if (errno == ETIMEDOUT) {
   151             retval = SDL_MUTEX_TIMEDOUT;
   151             retval = SDL_MUTEX_TIMEDOUT;
   152         } else {
   152         } else {
   153             SDL_SetError(strerror(errno));
   153             SDL_SetError("sem_timedwait returned an error: %s", strerror(errno));
   154         }
   154         }
   155     }
   155     }
   156 #else
   156 #else
   157     end = SDL_GetTicks() + timeout;
   157     end = SDL_GetTicks() + timeout;
   158     while ((retval = SDL_SemTryWait(sem)) == SDL_MUTEX_TIMEDOUT) {
   158     while ((retval = SDL_SemTryWait(sem)) == SDL_MUTEX_TIMEDOUT) {