diff options
author | Elliott Hughes <enh@google.com> | 2014-04-18 13:34:26 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-04-18 13:34:26 -0700 |
commit | 2f68866f371faa8ef727fc91e59e1e93326a3949 (patch) | |
tree | cee363e70470c5aeef3b30b5a6f359469df090f1 /libc/private/bionic_tls.h | |
parent | b88da06580a22d9a1ee5a1c573c49e89207bc71b (diff) | |
download | android_bionic-2f68866f371faa8ef727fc91e59e1e93326a3949.tar.gz android_bionic-2f68866f371faa8ef727fc91e59e1e93326a3949.tar.bz2 android_bionic-2f68866f371faa8ef727fc91e59e1e93326a3949.zip |
Make uselocale(3) claim its pthread key in an ELF constructor.
pthread_once is nice for decoupling, but it makes resource availability less
predictable, which is a bad thing.
This fixes a test failure if uselocale(3) is called before
pthread.pthread_key_create_lots runs.
Change-Id: Ie2634f986a50e7965582d4bd6e5aaf48cf0d55c8
Diffstat (limited to 'libc/private/bionic_tls.h')
-rw-r--r-- | libc/private/bionic_tls.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h index a42a8abed..d0a02011e 100644 --- a/libc/private/bionic_tls.h +++ b/libc/private/bionic_tls.h @@ -80,7 +80,7 @@ enum { * pthread_key_create; grep for GLOBAL_INIT_THREAD_LOCAL_BUFFER to find those. We need to manually * maintain that second number, but pthread_test will fail if we forget. */ -#define GLOBAL_INIT_THREAD_LOCAL_BUFFER_COUNT 4 +#define GLOBAL_INIT_THREAD_LOCAL_BUFFER_COUNT 5 #define BIONIC_ALIGN(x, a) (((x) + (a - 1)) & ~(a - 1)) |