+
+ // Checked locking to optimize the common case where _S_global
+ // still points to _S_classic (locale::_S_initialize_once()):
+ // - If they are the same, just increment the reference count and
+ // we are done. This effectively constructs a C locale object
+ // identical to the static c_locale.
+ // - Otherwise, _S_global can and may be destroyed due to
+ // locale::global() call on another thread, in which case we
+ // fall back to lock protected access to both _S_global and
+ // its reference count.