ICU-1575 don't use global mutex

X-SVN-Rev: 7298
This commit is contained in:
Alan Liu 2001-12-03 23:50:24 +00:00
parent 264c5e2f9a
commit ecdf5e0a92

View file

@ -17,6 +17,11 @@
U_NAMESPACE_BEGIN
/**
* Mutex for statics IN THIS FILE
*/
static UMTX MUTEX = 0;
/**
* Generated in unicodetools, NFSkippable
*/
@ -318,7 +323,7 @@ void NormalizationTransliterator::handleTransliterate(Replaceable& text, UTransP
void NormalizationTransliterator::initStatics() {
if (SKIPPABLES == NULL) {
Mutex lock;
Mutex lock(&MUTEX);
if (SKIPPABLES == NULL) {
SKIPPABLES = new UnicodeSet[4];
UErrorCode ec = U_ZERO_ERROR;
@ -651,6 +656,7 @@ void NormalizationTransliterator::cleanup() {
if (SKIPPABLES != NULL) {
delete[] SKIPPABLES;
SKIPPABLES = NULL;
umtx_destroy(&MUTEX);
}
}