ICU-6543 if U_DARWIN, initGlobalMutex shouldn't call pthread_mutex_init for gMutexes[i]

X-SVN-Rev: 24614
This commit is contained in:
Peter Edberg 2008-09-19 22:09:49 +00:00
parent 41f11a47de
commit 5173db6231

View file

@ -351,6 +351,11 @@ static void initGlobalMutex() {
}
gMutexPoolInitialized = TRUE;
}
#elif defined (U_DARWIN)
/* PTHREAD_MUTEX_INITIALIZER works, don't need to call pthread_mutex_init
* as below (which is subject to a race condition)
*/
gMutexPoolInitialized = TRUE;
#elif defined (POSIX)
/* TODO: experimental code. Shouldn't need to explicitly init the mutexes. */
if (gMutexPoolInitialized == FALSE) {