X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=thread_pthread.c;h=7bded93dec2d6426c71bc190d7b70e500dfca777;hb=refs%2Fheads%2FDefaultUser%2Fsdl2_gamecontroller;hp=e86b2c3828fde8c2a5f387290ed38d9e11ca270c;hpb=d166de6fb62c40784154bac37c00a7a68ad47daf;p=xonotic%2Fdarkplaces.git diff --git a/thread_pthread.c b/thread_pthread.c index e86b2c38..7bded93d 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -31,8 +31,10 @@ void *_Thread_CreateMutex(const char *filename, int fileline) Sys_PrintfToTerminal("%p mutex create %s:%i\n" , mutexp, filename, fileline); #endif #ifdef THREADRECURSIVE + pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init(mutexp, &attr); + pthread_mutexattr_destroy(&attr); #else pthread_mutex_init(mutexp, NULL); #endif