]> git.xonotic.org Git - xonotic/darkplaces.git/blob - thread_null.c
.gitignore: Update to ignore .cache directory created by clangd and build directory...
[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 qbool Thread_HasThreads(void)
14 {
15         return false;
16 }
17
18 void *_Thread_CreateMutex(const char *filename, int fileline)
19 {
20         return NULL;
21 }
22
23 void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
24 {
25 }
26
27 int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
28 {
29         return -1;
30 }
31
32 int _Thread_UnlockMutex(void *mutex, const char *filename, int fileline)
33 {
34         return -1;
35 }
36
37 void *_Thread_CreateCond(const char *filename, int fileline)
38 {
39         return NULL;
40 }
41
42 void _Thread_DestroyCond(void *cond, const char *filename, int fileline)
43 {
44 }
45
46 int _Thread_CondSignal(void *cond, const char *filename, int fileline)
47 {
48         return -1;
49 }
50
51 int _Thread_CondBroadcast(void *cond, const char *filename, int fileline)
52 {
53         return -1;
54 }
55
56 int _Thread_CondWait(void *cond, void *mutex, const char *filename, int fileline)
57 {
58         return -1;
59 }
60
61 void *_Thread_CreateThread(int (*fn)(void *), void *data, const char *filename, int fileline)
62 {
63         return NULL;
64 }
65
66 int _Thread_WaitThread(void *thread, int retval, const char *filename, int fileline)
67 {
68         return retval;
69 }
70
71 void *_Thread_CreateBarrier(unsigned int count, const char *filename, int fileline)
72 {
73         return NULL;
74 }
75
76 void _Thread_DestroyBarrier(void *barrier, const char *filename, int fileline)
77 {
78 }
79
80 void _Thread_WaitBarrier(void *barrier, const char *filename, int fileline)
81 {
82 }
83
84 int _Thread_AtomicGet(Thread_Atomic *a, const char *filename, int fileline)
85 {
86         return a->value;
87 }
88
89 int _Thread_AtomicSet(Thread_Atomic *a, int v, const char *filename, int fileline)
90 {
91         int value = a->value;
92         a->value = v;
93         return value;
94 }
95
96 int _Thread_AtomicAdd(Thread_Atomic *a, int v, const char *filename, int fileline)
97 {
98         int value = a->value;
99         a->value += v;
100         return value;
101 }
102
103 void _Thread_AtomicIncRef(Thread_Atomic *a, const char *filename, int fileline)
104 {
105         a->value++;
106 }
107
108 qbool _Thread_AtomicDecRef(Thread_Atomic *a, const char *filename, int fileline)
109 {
110         return a->value++ == 1;
111 }
112
113 qbool _Thread_AtomicTryLock(Thread_SpinLock *lock, const char *filename, int fileline)
114 {
115         return true;
116 }
117
118 void _Thread_AtomicLock(Thread_SpinLock *lock, const char *filename, int fileline)
119 {
120 }
121
122 void _Thread_AtomicUnlock(Thread_SpinLock *lock, const char *filename, int fileline)
123 {
124 }