1999-08-16 21:50:52 +00:00
|
|
|
/*
|
1999-12-09 23:27:55 +00:00
|
|
|
**********************************************************************
|
2001-03-21 20:44:20 +00:00
|
|
|
* Copyright (C) 1997-2001, International Business Machines
|
1999-12-09 23:27:55 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
1999-08-16 21:50:52 +00:00
|
|
|
*/
|
|
|
|
|
2002-06-29 00:04:16 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#include "unicode/uobject.h"
|
|
|
|
#include "mutex.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "umutex.h"
|
|
|
|
|
2001-08-30 17:09:43 +00:00
|
|
|
/* 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;
|
|
|
|
}
|
|
|
|
|
2001-08-30 17:09:43 +00:00
|
|
|
static int initializesGlobalMutex = GlobalMutexInitialize();
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2002-06-29 00:04:16 +00:00
|
|
|
|
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
const char Mutex::fgClassID=0;
|
|
|
|
|
|
|
|
U_NAMESPACE_END
|
|
|
|
|
2001-08-30 17:09:43 +00:00
|
|
|
#endif /* ICU_USE_THREADS==1 */
|