Skip to content

Commit

Permalink
Date: Sat, 17 Sep 2005 13:38:49 +0200
Browse files Browse the repository at this point in the history
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
  • Loading branch information
icculus committed Sep 27, 2005
1 parent bfb885a commit 64a9364
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/thread/beos/SDL_syssem.c
Expand Up @@ -90,6 +90,12 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
case B_NO_ERROR:
retval = 0;
break;
case B_TIMED_OUT:
retval = SDL_MUTEX_TIMEDOUT;
break;
case B_WOULD_BLOCK:
retval = SDL_MUTEX_TIMEDOUT;
break;
default:
SDL_SetError("acquire_sem() failed");
retval = -1;
Expand Down

0 comments on commit 64a9364

Please sign in to comment.