factor out thread interface from dpsoftrast
[xonotic/darkplaces.git] / thread.h
1 #ifndef THREAD_H
2
3 int Thread_Init(void);
4 void Thread_Shutdown(void);
5 qboolean Thread_HasThreads(void);
6 void *Thread_CreateMutex(void);
7 void Thread_DestroyMutex(void *mutex);
8 int Thread_LockMutex(void *mutex);
9 int Thread_UnlockMutex(void *mutex);
10 void *Thread_CreateCond(void);
11 void Thread_DestroyCond(void *cond);
12 int Thread_CondSignal(void *cond);
13 int Thread_CondBroadcast(void *cond);
14 int Thread_CondWait(void *cond, void *mutex);
15 void *Thread_CreateThread(int (*fn)(void *), void *data);
16 int Thread_WaitThread(void *thread, int retval);
17
18 #endif
19