]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Add the needed functions for TaskQueue in thread_null.c and add taskqueue.c
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 18 Jan 2020 17:05:06 +0000 (17:05 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 18 Jan 2020 17:05:06 +0000 (17:05 +0000)
to makefile.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12499 d7cf8633-e32d-0410-b094-e92efae38249

makefile.inc
thread_null.c

index 326e3a4a8da2cdc4158cff6f280d2a84efde2ba0..de68b70988fdf3f6ee0817db95dae3015762f8ec 100644 (file)
@@ -148,6 +148,7 @@ OBJ_COMMON= \
        svbsp.o \
        svvm_cmds.o \
        sys_shared.o \
+       taskqueue.o \
        vid_shared.o \
        view.o \
        wad.o \
index 35c4e4b5f4cf319a3d285b8d8a60504c46144d81..6698158314c73e0ba1110df001b49d10f8220681 100644 (file)
@@ -80,3 +80,45 @@ void _Thread_DestroyBarrier(void *barrier, const char *filename, int fileline)
 void _Thread_WaitBarrier(void *barrier, const char *filename, int fileline)
 {
 }
+
+int _Thread_AtomicGet(Thread_Atomic *a, const char *filename, int fileline)
+{
+       return a->value;
+}
+
+int _Thread_AtomicSet(Thread_Atomic *a, int v, const char *filename, int fileline)
+{
+       int value = a->value;
+       a->value = v;
+       return value;
+}
+
+int _Thread_AtomicAdd(Thread_Atomic *a, int v, const char *filename, int fileline)
+{
+       int value = a->value;
+       a->value += v;
+       return value;
+}
+
+void _Thread_AtomicIncRef(Thread_Atomic *a, const char *filename, int fileline)
+{
+       a->value++;
+}
+
+qboolean _Thread_AtomicDecRef(Thread_Atomic *a, const char *filename, int fileline)
+{
+       return a->value++ == 1;
+}
+
+qboolean _Thread_AtomicTryLock(Thread_SpinLock *lock, const char *filename, int fileline)
+{
+       return true;
+}
+
+void _Thread_AtomicLock(Thread_SpinLock *lock, const char *filename, int fileline)
+{
+}
+
+void _Thread_AtomicUnlock(Thread_SpinLock *lock, const char *filename, int fileline)
+{
+}