ICU-2970 Add comments regarding replication of Mutex init code in two separate functions

X-SVN-Rev: 12502
This commit is contained in:
Andy Heninger 2003-06-12 22:48:09 +00:00
parent 8cf2f799e5
commit c8c04ab85b
2 changed files with 13 additions and 1 deletions

View File

@ -11,6 +11,13 @@
/* Initialize the global mutex only when we can use it. */
#if (ICU_USE_THREADS == 1)
/*
* NOTE: This function replicates functionality from the start
* u_init(). Any changes must be made in both places.
* TODO: combine them.
*
* This function runs only during C++ static initialization.
*/
static int GlobalMutexInitialize()
{
UErrorCode status = U_ZERO_ERROR;

View File

@ -102,7 +102,12 @@ u_cleanup(void)
U_CAPI void U_EXPORT2
u_init(UErrorCode *status) {
/* Make sure the global mutex is initialized. */
/* Make sure the global mutexes are initialized. */
/*
* NOTE: This section of code replicates functionality from GlobalMutexInitialize()
* in the file mutex.cpp. Any changes must be made in both places.
* TODO: combine them.
*/
umtx_init(NULL);
ucnv_init(status);
ures_init(status);