src/thread/pthread/SDL_syssem.c
changeset 7857 6388f5229bb7
parent 7732 4c0e4274c3f8
child 8093 b43765095a6f
equal deleted inserted replaced
7856:cb37776926ad 7857:6388f5229bb7
   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) {
   159         if ((Sint32)(SDL_GetTicks() - end) >= 0) {
   159         if (SDL_TICKS_PASSED(SDL_GetTicks(), end)) {
   160             break;
   160             break;
   161         }
   161         }
   162         SDL_Delay(1);
   162         SDL_Delay(1);
   163     }
   163     }
   164 #endif /* HAVE_SEM_TIMEDWAIT */
   164 #endif /* HAVE_SEM_TIMEDWAIT */