src/thread/pthread/SDL_syssem.c
changeset 11905 29bf3038a246
parent 11811 5d94cb6b24d3
child 12503 806492103856
equal deleted inserted replaced
11904:43dbca2813e1 11905:29bf3038a246
    89 
    89 
    90     if (!sem) {
    90     if (!sem) {
    91         return SDL_SetError("Passed a NULL semaphore");
    91         return SDL_SetError("Passed a NULL semaphore");
    92     }
    92     }
    93 
    93 
    94     retval = sem_wait(&sem->sem);
    94     do {
       
    95         retval = sem_wait(&sem->sem);
       
    96     } while (retval < 0 && errno == EINTR);
       
    97 
    95     if (retval < 0) {
    98     if (retval < 0) {
    96         retval = SDL_SetError("sem_wait() failed");
    99         retval = SDL_SetError("sem_wait() failed");
    97     }
   100     }
    98     return retval;
   101     return retval;
    99 }
   102 }