4 #include <SDL_thread.h>
11 void Thread_Shutdown(void)
15 qboolean Thread_HasThreads(void)
20 void *Thread_CreateMutex(void)
22 return SDL_CreateMutex();
25 void Thread_DestroyMutex(void *mutex)
27 SDL_DestroyMutex((SDL_mutex *)mutex);
30 int Thread_LockMutex(void *mutex)
32 return SDL_LockMutex((SDL_mutex *)mutex);
35 int Thread_UnlockMutex(void *mutex)
37 return SDL_UnlockMutex((SDL_mutex *)mutex);
40 void *Thread_CreateCond(void)
42 return SDL_CreateCond();
45 void Thread_DestroyCond(void *cond)
47 SDL_DestroyCond((SDL_cond *)cond);
50 int Thread_CondSignal(void *cond)
52 return SDL_CondSignal((SDL_cond *)cond);
55 int Thread_CondBroadcast(void *cond)
57 return SDL_CondBroadcast((SDL_cond *)cond);
60 int Thread_CondWait(void *cond, void *mutex)
62 return SDL_CondWait((SDL_cond *)cond, (SDL_mutex *)mutex);
65 void *Thread_CreateThread(int (*fn)(void *), void *data)
67 return SDL_CreateThread(fn, data);
70 int Thread_WaitThread(void *thread, int retval)
73 SDL_WaitThread((SDL_Thread *)thread, &status);