From 53b969bd2685626845b59fdea6037d2c88297d5f Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Wed, 24 Apr 2002 16:10:33 +0000 Subject: [PATCH] ICU-1872 Test for mutex initialization X-SVN-Rev: 8505 --- icu4c/source/common/umutex.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/icu4c/source/common/umutex.c b/icu4c/source/common/umutex.c index f03d9288c7..7447bf2729 100644 --- a/icu4c/source/common/umutex.c +++ b/icu4c/source/common/umutex.c @@ -84,11 +84,15 @@ static pthread_mutex_t gPlatformMutex; U_CAPI UBool U_EXPORT2 umtx_isInitialized(UMTX *mutex) { +#if (ICU_USE_THREADS == 1) if (mutex == NULL) { mutex = &gGlobalMutex; } return (UBool)(*mutex != NULL); +#else + return TRUE; /* Since we don't use threads, it's considered initialized. */ +#endif /* ICU_USE_THREADS==1 */ } U_CAPI void U_EXPORT2