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

32 lines
684 B
C++
Raw Normal View History

1999-08-16 21:50:52 +00:00
/*
**********************************************************************
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
1999-08-16 21:50:52 +00:00
*/
#include "unicode/utypes.h"
#include "unicode/uobject.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
U_NAMESPACE_BEGIN
const char Mutex::fgClassID=0;
U_NAMESPACE_END
#endif /* ICU_USE_THREADS==1 */