ICU-2970 Add comments regarding replication of Mutex init code in two separate functions
X-SVN-Rev: 12502
This commit is contained in:
parent
8cf2f799e5
commit
c8c04ab85b
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user