23 #ifdef SDL_THREAD_BEOS
27 #include <be/kernel/OS.h>
29 #include "SDL_thread.h"
45 sem->id = create_sem(initial_value,
"SDL semaphore");
46 if (sem->id < B_NO_ERROR) {
62 if (sem->id >= B_NO_ERROR) {
81 val = acquire_sem(sem->id);
84 val = acquire_sem_etc(sem->id, 1, B_RELATIVE_TIMEOUT, timeout);
127 get_sem_count(sem->id, &count);
143 if (release_sem(sem->id) != B_NO_ERROR) {
DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value)
GLuint const GLfloat * val
#define SDL_MUTEX_MAXWAIT
DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem *sem)
struct SDL_semaphore SDL_sem
DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 ms)
DECLSPEC int SDLCALL SDL_SemWait(SDL_sem *sem)
DECLSPEC void SDLCALL SDL_free(void *mem)
uint32_t Uint32
An unsigned 32-bit integer type.
DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem *sem)
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
DECLSPEC void *SDLCALL SDL_malloc(size_t size)
GLbitfield GLuint64 timeout
DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem *sem)
#define SDL_OutOfMemory()
EGLSurface EGLint void ** value
#define SDL_MUTEX_TIMEDOUT
DECLSPEC int SDLCALL SDL_SemPost(SDL_sem *sem)