![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "qtypes.h"
Go to the source code of this file.
Data Structures | |
struct | Thread_Atomic |
Macros | |
#define | Thread_AtomicAdd(a, v) |
#define | Thread_AtomicDecRef(a) |
#define | Thread_AtomicGet(a) |
#define | Thread_AtomicIncRef(a) |
#define | Thread_AtomicLock(lock) |
#define | Thread_AtomicSet(a, v) |
#define | Thread_AtomicTryLock(lock) |
#define | Thread_AtomicUnlock(lock) |
#define | Thread_CondBroadcast(cond) |
#define | Thread_CondSignal(cond) |
#define | Thread_CondWait(cond, mutex) |
#define | Thread_CreateBarrier(count) |
#define | Thread_CreateCond() |
#define | Thread_CreateMutex() |
#define | Thread_CreateThread(fn, data) |
#define | Thread_DestroyBarrier(barrier) |
#define | Thread_DestroyCond(cond) |
#define | Thread_DestroyMutex(m) |
#define | Thread_LockMutex(m) |
#define | Thread_UnlockMutex(m) |
#define | Thread_WaitBarrier(barrier) |
#define | Thread_WaitThread(thread, retval) |
#define | THREADRECURSIVE |
Typedefs | |
typedef int | Thread_SpinLock |
Functions | |
int | _Thread_AtomicAdd (Thread_Atomic *ref, int v, const char *filename, int fileline) |
qbool | _Thread_AtomicDecRef (Thread_Atomic *ref, const char *filename, int fileline) |
int | _Thread_AtomicGet (Thread_Atomic *ref, const char *filename, int fileline) |
void | _Thread_AtomicIncRef (Thread_Atomic *ref, const char *filename, int fileline) |
void | _Thread_AtomicLock (Thread_SpinLock *lock, const char *filename, int fileline) |
int | _Thread_AtomicSet (Thread_Atomic *ref, int v, const char *filename, int fileline) |
qbool | _Thread_AtomicTryLock (Thread_SpinLock *lock, const char *filename, int fileline) |
void | _Thread_AtomicUnlock (Thread_SpinLock *lock, const char *filename, int fileline) |
int | _Thread_CondBroadcast (void *cond, const char *filename, int fileline) |
int | _Thread_CondSignal (void *cond, const char *filename, int fileline) |
int | _Thread_CondWait (void *cond, void *mutex, const char *filename, int fileline) |
void * | _Thread_CreateBarrier (unsigned int count, const char *filename, int fileline) |
void * | _Thread_CreateCond (const char *filename, int fileline) |
void * | _Thread_CreateMutex (const char *filename, int fileline) |
void * | _Thread_CreateThread (int(*fn)(void *), void *data, const char *filename, int fileline) |
void | _Thread_DestroyBarrier (void *barrier, const char *filename, int fileline) |
void | _Thread_DestroyCond (void *cond, const char *filename, int fileline) |
void | _Thread_DestroyMutex (void *mutex, const char *filename, int fileline) |
int | _Thread_LockMutex (void *mutex, const char *filename, int fileline) |
int | _Thread_UnlockMutex (void *mutex, const char *filename, int fileline) |
void | _Thread_WaitBarrier (void *barrier, const char *filename, int fileline) |
int | _Thread_WaitThread (void *thread, int retval, const char *filename, int fileline) |
qbool | Thread_HasThreads (void) |
int | Thread_Init (void) |
void | Thread_Shutdown (void) |
#define Thread_AtomicDecRef | ( | a | ) |
#define Thread_AtomicGet | ( | a | ) |
#define Thread_AtomicIncRef | ( | a | ) |
#define Thread_AtomicLock | ( | lock | ) |
Definition at line 35 of file thread.h.
Referenced by TaskQueue_DistributeTasks(), TaskQueue_Enqueue(), TaskQueue_Frame(), TaskQueue_ThreadFunc(), and TaskQueue_WaitForTaskDone().
#define Thread_AtomicTryLock | ( | lock | ) |
#define Thread_AtomicUnlock | ( | lock | ) |
Definition at line 36 of file thread.h.
Referenced by TaskQueue_DistributeTasks(), TaskQueue_Enqueue(), TaskQueue_Frame(), TaskQueue_ThreadFunc(), and TaskQueue_WaitForTaskDone().
#define Thread_CondBroadcast | ( | cond | ) |
Definition at line 22 of file thread.h.
Referenced by _Thread_WaitBarrier().
#define Thread_CondSignal | ( | cond | ) |
#define Thread_CondWait | ( | cond, | |
mutex ) |
Definition at line 23 of file thread.h.
Referenced by _Thread_WaitBarrier().
#define Thread_CreateBarrier | ( | count | ) |
#define Thread_CreateCond | ( | ) |
Definition at line 19 of file thread.h.
Referenced by _Thread_CreateBarrier().
#define Thread_CreateMutex | ( | ) |
Definition at line 15 of file thread.h.
Referenced by _Thread_CreateBarrier(), Cmd_Init(), Con_Init(), Crypto_d0_createmutex(), Curl_Init(), FS_Init_Dir(), Memory_Init(), NetConn_Init(), and SV_StartThread().
#define Thread_CreateThread | ( | fn, | |
data ) |
Definition at line 24 of file thread.h.
Referenced by SV_StartThread(), and TaskQueue_Frame().
#define Thread_DestroyBarrier | ( | barrier | ) |
#define Thread_DestroyCond | ( | cond | ) |
Definition at line 20 of file thread.h.
Referenced by _Thread_DestroyBarrier().
#define Thread_DestroyMutex | ( | m | ) |
Definition at line 16 of file thread.h.
Referenced by _Thread_DestroyBarrier(), Con_Shutdown(), Crypto_d0_destroymutex(), Curl_Shutdown(), FS_Shutdown(), Memory_Shutdown(), NetConn_Shutdown(), and SV_StopThread().
#define Thread_LockMutex | ( | m | ) |
Definition at line 17 of file thread.h.
Referenced by _Mem_Alloc(), _Mem_FreeBlock(), _Thread_WaitBarrier(), Cbuf_Lock(), Con_Clear_f(), Con_ConDump_f(), Con_DrawConsole(), Con_DrawNotify(), Con_MaskPrint(), Con_Shutdown(), Crypto_d0_lockmutex(), Curl_Begin(), Curl_CancelAll(), Curl_Clear_forthismap(), Curl_Frame(), Curl_GetDownloadInfo(), Curl_Info_f(), Curl_Register_predownload(), FS_OpenVirtualFile(), Log_DestBuffer_Flush(), NetConn_Read(), and NetConn_Write().
#define Thread_UnlockMutex | ( | m | ) |
Definition at line 18 of file thread.h.
Referenced by _Mem_Alloc(), _Mem_FreeBlock(), _Thread_WaitBarrier(), Cbuf_Unlock(), Con_Clear_f(), Con_ConDump_f(), Con_DrawConsole(), Con_DrawNotify(), Con_MaskPrint(), Con_Shutdown(), Crypto_d0_unlockmutex(), Curl_Begin(), Curl_CancelAll(), Curl_Clear_forthismap(), Curl_Frame(), Curl_GetDownloadInfo(), Curl_Info_f(), Curl_Register_predownload(), FS_OpenVirtualFile(), Log_DestBuffer_Flush(), NetConn_Read(), and NetConn_Write().
#define Thread_WaitBarrier | ( | barrier | ) |
#define Thread_WaitThread | ( | thread, | |
retval ) |
Definition at line 25 of file thread.h.
Referenced by SV_StopThread(), and TaskQueue_Frame().
typedef int Thread_SpinLock |
int _Thread_AtomicAdd | ( | Thread_Atomic * | ref, |
int | v, | ||
const char * | filename, | ||
int | fileline ) |
qbool _Thread_AtomicDecRef | ( | Thread_Atomic * | ref, |
const char * | filename, | ||
int | fileline ) |
Definition at line 108 of file thread_null.c.
References a, and Sys_Printf().
int _Thread_AtomicGet | ( | Thread_Atomic * | ref, |
const char * | filename, | ||
int | fileline ) |
Definition at line 84 of file thread_null.c.
References a, and Sys_Printf().
void _Thread_AtomicIncRef | ( | Thread_Atomic * | ref, |
const char * | filename, | ||
int | fileline ) |
Definition at line 103 of file thread_null.c.
References a, and Sys_Printf().
void _Thread_AtomicLock | ( | Thread_SpinLock * | lock, |
const char * | filename, | ||
int | fileline ) |
int _Thread_AtomicSet | ( | Thread_Atomic * | ref, |
int | v, | ||
const char * | filename, | ||
int | fileline ) |
qbool _Thread_AtomicTryLock | ( | Thread_SpinLock * | lock, |
const char * | filename, | ||
int | fileline ) |
void _Thread_AtomicUnlock | ( | Thread_SpinLock * | lock, |
const char * | filename, | ||
int | fileline ) |
Definition at line 51 of file thread_null.c.
References thread_cond_t::done, i, thread_cond_t::mutex, n, thread_cond_t::sem, thread_cond_t::signals, Sys_Printf(), Thread_PostSemaphore(), Thread_WaitSemaphore(), and thread_cond_t::waiting.
Definition at line 46 of file thread_null.c.
References thread_cond_t::done, thread_cond_t::mutex, n, thread_cond_t::sem, thread_cond_t::signals, Sys_Printf(), Thread_PostSemaphore(), Thread_WaitSemaphore(), and thread_cond_t::waiting.
Definition at line 56 of file thread_null.c.
References thread_cond_t::done, thread_cond_t::mutex, thread_cond_t::sem, thread_cond_t::signals, Sys_Printf(), Thread_PostSemaphore(), Thread_WaitSemaphore(), and thread_cond_t::waiting.
Definition at line 71 of file thread_null.c.
References b, count, NULL, Sys_Printf(), Thread_CreateCond, Thread_CreateMutex, and Z_Malloc.
Definition at line 37 of file thread_null.c.
References thread_cond_t::done, FALSE, thread_cond_t::mutex, NULL, thread_cond_t::sem, thread_cond_t::signals, Sys_Printf(), Thread_CreateSemaphore(), thread_cond_t::waiting, and Z_Malloc.
Definition at line 18 of file thread_null.c.
References FALSE, NULL, Sys_Printf(), and Z_Malloc.
void * _Thread_CreateThread | ( | int(* | fn )(void *), |
void * | data, | ||
const char * | filename, | ||
int | fileline ) |
Definition at line 61 of file thread_null.c.
References data, NULL, r, Sys_Printf(), Thread_WrapperFunc(), w, Z_Free, and Z_Malloc.
Definition at line 76 of file thread_null.c.
References b, Sys_Printf(), Thread_DestroyCond, and Thread_DestroyMutex.
Definition at line 42 of file thread_null.c.
References thread_cond_t::done, thread_cond_t::mutex, thread_cond_t::sem, Sys_Printf(), Thread_DestroySemaphore(), and Z_Free.
Definition at line 80 of file thread_null.c.
References b, Sys_Printf(), Thread_CondBroadcast, Thread_CondWait, Thread_LockMutex, and Thread_UnlockMutex.
Definition at line 66 of file thread_null.c.
References Sys_Printf(), w, and Z_Free.
Definition at line 13 of file thread_null.c.
Referenced by Con_Init(), Crypto_Init(), Curl_Init(), FS_Init_Dir(), Memory_Init(), NetConn_Init(), and SV_StartThread().
Definition at line 4 of file thread_null.c.
References Con_Printf().
Referenced by Host_Init().