1
0
forked from 0ad/0ad

no longer register atexit call to free mutex in pthread_mutex_initializer - user code should do that.

brought to light by simon's network / thread util itself freeing the
mutex, leading to invalid handle atexit.

This was SVN commit r1009.
This commit is contained in:
janwas 2004-08-17 13:36:03 +00:00
parent fdaa535fc2
commit af85086e3b

View File

@ -370,7 +370,7 @@ pthread_mutex_t pthread_mutex_initializer()
HANDLE h = CreateMutex(0, 0, 0);
if(h == INVALID_HANDLE_VALUE)
return 0;
atexit2(CloseHandle, (uintptr_t)h, CC_STDCALL_1);
// app is responsible for freeing via pthread_destroy_mutex!
return h;
}