summaryrefslogtreecommitdiffstats
path: root/libc/private
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-03-05 20:08:21 -0800
committerYabin Cui <yabinc@google.com>2015-03-05 20:39:10 -0800
commitf7e3b3e48ab3ffbf7bbce5102ce1739c200093cb (patch)
tree19fe08cbb0324d67ce277d8f6594f8c126d3b3c6 /libc/private
parentc3307dc43b2526c4031837738b139d22831c5d09 (diff)
downloadbionic-f7e3b3e48ab3ffbf7bbce5102ce1739c200093cb.zip
bionic-f7e3b3e48ab3ffbf7bbce5102ce1739c200093cb.tar.gz
bionic-f7e3b3e48ab3ffbf7bbce5102ce1739c200093cb.tar.bz2
Use pthread_once for g_uselocale_key creation.
Bug: 19625804 Change-Id: I57ec4c965067dc0c157c795c1f7217a3ca403286
Diffstat (limited to 'libc/private')
-rw-r--r--libc/private/bionic_tls.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h
index 724f896..1ab8d4a 100644
--- a/libc/private/bionic_tls.h
+++ b/libc/private/bionic_tls.h
@@ -72,13 +72,13 @@ enum {
/*
* Bionic uses some pthread keys internally. All pthread keys used internally
- * should be created in constructors.
+ * should be created in constructors, except for keys that may be used in or before constructors.
* We need to manually maintain the count of pthread keys used internally, but
* pthread_test should fail if we forget.
* Following are current pthread keys used internally by libc:
* basename libc (GLOBAL_INIT_THREAD_LOCAL_BUFFER)
* dirname libc (GLOBAL_INIT_THREAD_LOCAL_BUFFER)
- * uselocale libc (BIONIC_PTHREAD_KEY_WITH_CONSTRUCTOR)
+ * uselocale libc (can be used in constructors)
* getmntent_mntent libc (GLOBAL_INIT_THREAD_LOCAL_BUFFER)
* getmntent_strings libc (GLOBAL_INIT_THREAD_LOCAL_BUFFER)
* ptsname libc (GLOBAL_INIT_THREAD_LOCAL_BUFFER)