summaryrefslogtreecommitdiffstats
path: root/libc/bionic/libc_init_common.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-11-15 11:51:07 -0800
committerElliott Hughes <enh@google.com>2013-11-15 14:41:19 -0800
commit70b24b1cc2a1a4436b1fea3f8b76616fdcb27224 (patch)
tree70c8e04ccd256eaeda3c7e516776f4c9bca25628 /libc/bionic/libc_init_common.cpp
parent05ec00bf62ac168c9787a3d0640879ab3e502fe5 (diff)
downloadbionic-70b24b1cc2a1a4436b1fea3f8b76616fdcb27224.zip
bionic-70b24b1cc2a1a4436b1fea3f8b76616fdcb27224.tar.gz
bionic-70b24b1cc2a1a4436b1fea3f8b76616fdcb27224.tar.bz2
Switch pthread_create over to __bionic_clone.
Bug: 8206355 Bug: 11693195 Change-Id: I04aadbc36c87e1b7e33324b9a930a1e441fbfed6
Diffstat (limited to 'libc/bionic/libc_init_common.cpp')
-rw-r--r--libc/bionic/libc_init_common.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index f88a26d..3e092ae 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -49,6 +49,7 @@
extern "C" abort_msg_t** __abort_message_ptr;
extern "C" uintptr_t __get_sp(void);
extern "C" int __system_properties_init(void);
+extern "C" int __set_tls(void* ptr);
// Not public, but well-known in the BSDs.
const char* __progname;
@@ -96,7 +97,10 @@ void __libc_init_tls(KernelArgumentBlock& args) {
pthread_attr_setstack(&thread.attr, (void*) stack_bottom, stack_size);
_init_thread(&thread, false);
__init_tls(&thread);
+ __set_tls(thread.tls);
tls[TLS_SLOT_BIONIC_PREINIT] = &args;
+
+ __init_alternate_signal_stack(&thread);
}
void __libc_init_common(KernelArgumentBlock& args) {