]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - thread_null.c
58b22bd57f567c0fa600344226d7659b35f68fd8
[xonotic/darkplaces.git] / thread_null.c
1 #include "quakedef.h"
2 #include "thread.h"
3
4 int Thread_Init(void)
5 {
6         return 0;
7 }
8
9 void Thread_Shutdown(void)
10 {
11 }
12
13 qboolean Thread_HasThreads(void)
14 {
15         return false;
16 }
17
18 void *_Thread_CreateMutex(const char *filename, int fileline)
19 {
20 #ifdef THREADDEBUG
21         Sys_PrintfToTerminal("%p create %s:%i\n" , mutex, filename, fileline);
22 #endif
23         return NULL;
24 }
25
26 void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
27 {
28 #ifdef THREADDEBUG
29         Sys_PrintfToTerminal("%p destroy %s:%i\n", mutex, filename, fileline);
30 #endif
31 }
32
33 int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
34 {
35 #ifdef THREADDEBUG
36         Sys_PrintfToTerminal("%p lock %s:%i\n"   , mutex, filename, fileline);
37 #endif
38         return -1;
39 }
40
41 int _Thread_UnlockMutex(void *mutex, const char *filename, int fileline)
42 {
43 #ifdef THREADDEBUG
44         Sys_PrintfToTerminal("%p unlock %s:%i\n" , mutex, filename, fileline);
45 #endif
46         return -1;
47 }
48
49 void *Thread_CreateCond(void)
50 {
51         return NULL;
52 }
53
54 void Thread_DestroyCond(void *cond)
55 {
56 }
57
58 int Thread_CondSignal(void *cond)
59 {
60         return -1;
61 }
62
63 int Thread_CondBroadcast(void *cond)
64 {
65         return -1;
66 }
67
68 int Thread_CondWait(void *cond, void *mutex)
69 {
70         return -1;
71 }
72
73 void *Thread_CreateThread(int (*fn)(void *), void *data)
74 {
75         return NULL;
76 }
77
78 int Thread_WaitThread(void *thread, int retval)
79 {
80         return retval;
81 }
82