Mercurial > sdl-ios-xcode
diff src/thread/riscos/SDL_syssem.c @ 1851:536b0704b7d8
Make sure sem_wait didn't return early with EINTR. Fixes Bugzilla #231.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 17 May 2006 23:42:48 +0000 |
parents | d910939febfa |
children | c121d94672cb a1b03ba2fcd0 |
line wrap: on
line diff
--- a/src/thread/riscos/SDL_syssem.c Wed May 17 18:57:04 2006 +0000 +++ b/src/thread/riscos/SDL_syssem.c Wed May 17 23:42:48 2006 +0000 @@ -19,6 +19,9 @@ Sam Lantinga slouken@libsdl.org */ + +#include <errno.h> + #include "SDL_config.h" /* RISC OS semiphores based on linux code */ @@ -132,7 +135,7 @@ return -1; } - retval = sem_wait(sem->sem); + while ( ((retval = sem_wait(sem->sem)) == -1) && (errno == EINTR) ) {} if ( retval < 0 ) { SDL_SetError("sem_wait() failed"); }