diff options
author | Yabin Cui <yabinc@google.com> | 2014-12-13 02:51:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-12-13 02:51:27 +0000 |
commit | 0e32e39df0e487ec86d86627f1d4b43d1c8c524d (patch) | |
tree | 8bd99549e9cd7ff8d30742864b86ecc2dcb0ec36 /libc/bionic/pthread_create.cpp | |
parent | 732d65c1b1d33b2eadb5d6f2b1771c6fc536e23f (diff) | |
parent | 6c238f2926e69a950f0671ae5519584c20d84196 (diff) | |
download | android_bionic-0e32e39df0e487ec86d86627f1d4b43d1c8c524d.tar.gz android_bionic-0e32e39df0e487ec86d86627f1d4b43d1c8c524d.tar.bz2 android_bionic-0e32e39df0e487ec86d86627f1d4b43d1c8c524d.zip |
Merge "Fix pthread key num calculation."
Diffstat (limited to 'libc/bionic/pthread_create.cpp')
-rw-r--r-- | libc/bionic/pthread_create.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp index 8bb1be9d9..c99e69c90 100644 --- a/libc/bionic/pthread_create.cpp +++ b/libc/bionic/pthread_create.cpp @@ -191,7 +191,7 @@ int pthread_create(pthread_t* thread_out, pthread_attr_t const* attr, // At offsets >= 0, we have the TLS slots. // At offsets < 0, we have the child stack. thread->tls = reinterpret_cast<void**>(reinterpret_cast<uint8_t*>(thread->attr.stack_base) + - thread->attr.stack_size - BIONIC_TLS_SLOTS * sizeof(void*)); + thread->attr.stack_size - BIONIC_ALIGN(BIONIC_TLS_SLOTS * sizeof(void*), 16)); void* child_stack = thread->tls; __init_tls(thread); |