src/thread/pthread/SDL_syssem.c
changeset 1851 536b0704b7d8
parent 1630 eba962f9d603
child 1895 c121d94672cb
child 4159 a1b03ba2fcd0
     1.1 --- a/src/thread/pthread/SDL_syssem.c	Wed May 17 18:57:04 2006 +0000
     1.2 +++ b/src/thread/pthread/SDL_syssem.c	Wed May 17 23:42:48 2006 +0000
     1.3 @@ -23,6 +23,7 @@
     1.4  
     1.5  #include <pthread.h>
     1.6  #include <semaphore.h>
     1.7 +#include <errno.h>
     1.8  
     1.9  #include "SDL_thread.h"
    1.10  #include "SDL_timer.h"
    1.11 @@ -86,7 +87,7 @@
    1.12  		return -1;
    1.13  	}
    1.14  
    1.15 -	retval = sem_wait(&sem->sem);
    1.16 +	while ( ((retval = sem_wait(&sem->sem)) == -1) && (errno == EINTR) ) {}
    1.17  	if ( retval < 0 ) {
    1.18  		SDL_SetError("sem_wait() failed");
    1.19  	}