9 Con_Printf(
"Threading disabled in this build\n");
29 void *mutex = SDL_CreateMutex();
31 Sys_Printf(
"%p mutex create %s:%i\n" , mutex, filename, fileline);
39 Sys_Printf(
"%p mutex destroy %s:%i\n", mutex, filename, fileline);
41 SDL_DestroyMutex((SDL_mutex *)mutex);
47 Sys_Printf(
"%p mutex lock %s:%i\n" , mutex, filename, fileline);
49 return SDL_LockMutex((SDL_mutex *)mutex);
55 Sys_Printf(
"%p mutex unlock %s:%i\n" , mutex, filename, fileline);
57 return SDL_UnlockMutex((SDL_mutex *)mutex);
62 void *cond = (
void *)SDL_CreateCond();
64 Sys_Printf(
"%p cond create %s:%i\n" , cond, filename, fileline);
72 Sys_Printf(
"%p cond destroy %s:%i\n" , cond, filename, fileline);
74 SDL_DestroyCond((SDL_cond *)cond);
80 Sys_Printf(
"%p cond signal %s:%i\n" , cond, filename, fileline);
82 return SDL_CondSignal((SDL_cond *)cond);
88 Sys_Printf(
"%p cond broadcast %s:%i\n" , cond, filename, fileline);
90 return SDL_CondBroadcast((SDL_cond *)cond);
96 Sys_Printf(
"%p cond wait %s:%i\n" , cond, filename, fileline);
98 return SDL_CondWait((SDL_cond *)cond, (SDL_mutex *)mutex);
103 void *thread = (
void *)SDL_CreateThread(fn, filename,
data);
105 Sys_Printf(
"%p thread create %s:%i\n" , thread, filename, fileline);
114 Sys_Printf(
"%p thread wait %s:%i\n" , thread, filename, fileline);
116 SDL_WaitThread((SDL_Thread *)thread, &status);
146 Sys_Printf(
"%p barrier destroy %s:%i\n",
b, filename, fileline);
156 Sys_Printf(
"%p barrier wait %s:%i\n",
b, filename, fileline);
160 if (
b->called ==
b->needed) {
174 Sys_Printf(
"%p atomic get at %s:%i\n",
a, filename, fileline);
176 return SDL_AtomicGet((SDL_atomic_t *)
a);
182 Sys_Printf(
"%p atomic set %v at %s:%i\n",
a,
v, filename, fileline);
184 return SDL_AtomicSet((SDL_atomic_t *)
a,
v);
190 Sys_Printf(
"%p atomic add %v at %s:%i\n",
a,
v, filename, fileline);
192 return SDL_AtomicAdd((SDL_atomic_t *)
a,
v);
198 Sys_Printf(
"%p atomic incref %s:%i\n",
a, filename, fileline);
200 SDL_AtomicIncRef((SDL_atomic_t *)
a);
206 Sys_Printf(
"%p atomic decref %s:%i\n",
a, filename, fileline);
208 return SDL_AtomicDecRef((SDL_atomic_t *)
a) != SDL_FALSE;
214 Sys_Printf(
"%p atomic try lock %s:%i\n", lock, filename, fileline);
216 return SDL_AtomicTryLock(lock) != SDL_FALSE;
222 Sys_Printf(
"%p atomic lock %s:%i\n", lock, filename, fileline);
224 SDL_AtomicLock(lock);
230 Sys_Printf(
"%p atomic unlock %s:%i\n", lock, filename, fileline);
232 SDL_AtomicUnlock(lock);
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
GLenum GLenum GLsizei count
GLsizeiptr const GLvoid * data
void Sys_Printf(const char *fmt,...)
used to report failures inside Con_Printf()
#define Thread_CondBroadcast(cond)
#define Thread_DestroyMutex(m)
#define Thread_DestroyCond(cond)
#define Thread_CreateMutex()
#define Thread_LockMutex(m)
#define Thread_CreateCond()
#define Thread_UnlockMutex(m)
#define Thread_CondWait(cond, mutex)
void * _Thread_CreateBarrier(unsigned int count, const char *filename, int fileline)
int _Thread_AtomicSet(Thread_Atomic *a, int v, const char *filename, int fileline)
int _Thread_CondWait(void *cond, void *mutex, const char *filename, int fileline)
void * _Thread_CreateMutex(const char *filename, int fileline)
int _Thread_WaitThread(void *thread, int retval, const char *filename, int fileline)
int _Thread_AtomicAdd(Thread_Atomic *a, int v, const char *filename, int fileline)
qbool _Thread_AtomicTryLock(Thread_SpinLock *lock, const char *filename, int fileline)
void _Thread_WaitBarrier(void *barrier, const char *filename, int fileline)
int _Thread_UnlockMutex(void *mutex, const char *filename, int fileline)
int _Thread_AtomicGet(Thread_Atomic *a, const char *filename, int fileline)
qbool Thread_HasThreads(void)
void * _Thread_CreateThread(int(*fn)(void *), void *data, const char *filename, int fileline)
int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
void * _Thread_CreateCond(const char *filename, int fileline)
void _Thread_AtomicIncRef(Thread_Atomic *a, const char *filename, int fileline)
void _Thread_AtomicLock(Thread_SpinLock *lock, const char *filename, int fileline)
int _Thread_CondSignal(void *cond, const char *filename, int fileline)
void _Thread_DestroyCond(void *cond, const char *filename, int fileline)
void Thread_Shutdown(void)
void _Thread_AtomicUnlock(Thread_SpinLock *lock, const char *filename, int fileline)
qbool _Thread_AtomicDecRef(Thread_Atomic *a, const char *filename, int fileline)
void _Thread_DestroyBarrier(void *barrier, const char *filename, int fileline)
void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
int _Thread_CondBroadcast(void *cond, const char *filename, int fileline)