]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - thread.h
factor out thread interface from dpsoftrast
[xonotic/darkplaces.git] / thread.h
diff --git a/thread.h b/thread.h
new file mode 100644 (file)
index 0000000..590da97
--- /dev/null
+++ b/thread.h
@@ -0,0 +1,19 @@
+#ifndef THREAD_H
+
+int Thread_Init(void);
+void Thread_Shutdown(void);
+qboolean Thread_HasThreads(void);
+void *Thread_CreateMutex(void);
+void Thread_DestroyMutex(void *mutex);
+int Thread_LockMutex(void *mutex);
+int Thread_UnlockMutex(void *mutex);
+void *Thread_CreateCond(void);
+void Thread_DestroyCond(void *cond);
+int Thread_CondSignal(void *cond);
+int Thread_CondBroadcast(void *cond);
+int Thread_CondWait(void *cond, void *mutex);
+void *Thread_CreateThread(int (*fn)(void *), void *data);
+int Thread_WaitThread(void *thread, int retval);
+
+#endif
+