Date: Sat, 17 Sep 2005 13:38:49 +0200
authorRyan C. Gordon <icculus@icculus.org>
Tue, 27 Sep 2005 11:27:38 +0000
changeset 1146ab0154afe938
parent 1145 d31afac94eff
child 1147 b580f7201543
Date: Sat, 17 Sep 2005 13:38:49 +0200
From: Jon Daniel <forcemaster@gmx.net>
To: sdl@libsdl.org
Subject: [SDL] SDL_SemWaitTimeout patch for BeOS

The current SDL-1.2.9/src/thread/beos/SDL_syssem.c returns -1 if the
acquire_sem timeouts which according to the DocWiki is not correct.
I've added support for the B_TIMED_OUT and B_WOULD_BLOCK in the switch.

Jon Daniel
src/thread/beos/SDL_syssem.c
     1.1 --- a/src/thread/beos/SDL_syssem.c	Tue Sep 27 09:00:42 2005 +0000
     1.2 +++ b/src/thread/beos/SDL_syssem.c	Tue Sep 27 11:27:38 2005 +0000
     1.3 @@ -90,6 +90,12 @@
     1.4  	    case B_NO_ERROR:
     1.5  		retval = 0;
     1.6  		break;
     1.7 +	    case B_TIMED_OUT:
     1.8 +		retval = SDL_MUTEX_TIMEDOUT;
     1.9 +		break;
    1.10 +	    case B_WOULD_BLOCK:
    1.11 +		retval = SDL_MUTEX_TIMEDOUT;
    1.12 +		break;
    1.13  	    default:
    1.14  		SDL_SetError("acquire_sem() failed");
    1.15  		retval = -1;