]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - thread_pthread.c
added Sys_PrintfToTerminal function for convenience, this replaces
[xonotic/darkplaces.git] / thread_pthread.c
index 69558da5cb959411c2c145a4a3092d92dd333dfe..c9a1166331b3a52f6de3d17ba0dd1485119c31a0 100644 (file)
@@ -21,7 +21,7 @@ void *_Thread_CreateMutex(const char *filename, int fileline)
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) Z_Malloc(sizeof(pthread_mutex_t));
 #ifdef THREADDEBUG
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) Z_Malloc(sizeof(pthread_mutex_t));
 #ifdef THREADDEBUG
-       printf("%p create %s:%i\n" , mutexp, filename, fileline);
+       Sys_PrintfToTerminal("%p create %s:%i\n" , mutexp, filename, fileline);
 #endif
        pthread_mutex_init(mutexp, NULL);
        return mutexp;
 #endif
        pthread_mutex_init(mutexp, NULL);
        return mutexp;
@@ -31,7 +31,7 @@ void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
-       printf("%p destroy %s:%i\n", mutex, filename, fileline);
+       Sys_PrintfToTerminal("%p destroy %s:%i\n", mutex, filename, fileline);
 #endif
        pthread_mutex_destroy(mutexp);
        Z_Free(mutexp);
 #endif
        pthread_mutex_destroy(mutexp);
        Z_Free(mutexp);
@@ -41,7 +41,7 @@ int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
-       printf("%p lock %s:%i\n"   , mutex, filename, fileline);
+       Sys_PrintfToTerminal("%p lock %s:%i\n"   , mutex, filename, fileline);
 #endif
        return pthread_mutex_lock(mutexp);
 }
 #endif
        return pthread_mutex_lock(mutexp);
 }
@@ -50,7 +50,7 @@ int _Thread_UnlockMutex(void *mutex, const char *filename, int fileline)
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
-       printf("%p unlock %s:%i\n" , mutex, filename, fileline);
+       Sys_PrintfToTerminal("%p unlock %s:%i\n" , mutex, filename, fileline);
 #endif
        return pthread_mutex_unlock(mutexp);
 }
 #endif
        return pthread_mutex_unlock(mutexp);
 }