mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-24 03:32:20 +00:00
PTHREAD_MUTEX_INITIALIZER
This was SVN commit r59.
This commit is contained in:
@@ -271,12 +271,16 @@ static HANDLE m2h(pthread_mutex_t* m)
|
||||
return h;
|
||||
}
|
||||
|
||||
pthread_mutex_t pthread_mutex_initializer()
|
||||
{
|
||||
return CreateMutex(0, 0, 0);
|
||||
}
|
||||
|
||||
int pthread_mutex_init(pthread_mutex_t* m, const pthread_mutexattr_t*)
|
||||
{
|
||||
if(!m)
|
||||
return -1;
|
||||
HANDLE h = CreateMutex(0, 0, 0);
|
||||
*m = ((char*)h - (char*)0);
|
||||
*m = pthread_mutex_initializer();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user