scuffed-code/icu4c/source/common/mutex.cpp

25 lines
587 B
C++
Raw Normal View History

1999-08-16 21:50:52 +00:00
/*
**********************************************************************
* Copyright (C) 1997-2002, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
1999-08-16 21:50:52 +00:00
*/
#include "unicode/utypes.h"
#include "mutex.h"
1999-08-16 21:50:52 +00:00
#include "umutex.h"
/* Initialize the global mutex only when we can use it. */
#if (ICU_USE_THREADS == 1)
static int GlobalMutexInitialize()
1999-08-16 21:50:52 +00:00
{
umtx_init( NULL );
return 0;
}
static int initializesGlobalMutex = GlobalMutexInitialize();
1999-08-16 21:50:52 +00:00
#endif /* ICU_USE_THREADS==1 */