OSDN Git Service

Pull the pthread_key_t functions out of pthread.c.
authorElliott Hughes <enh@google.com>
Fri, 8 Feb 2013 23:46:37 +0000 (15:46 -0800)
committerElliott Hughes <enh@google.com>
Mon, 11 Feb 2013 20:00:48 +0000 (12:00 -0800)
commitad59322ae432d11ff36dcf046016af8cfe45fbe4
tree04ea728ddd656079ca4b9f228b32c371370be947
parent9a9bb243b50be5e3910b8edad72327bc216e72d0
Pull the pthread_key_t functions out of pthread.c.

This was originally motivated by noticing that we were setting the
wrong bits for the well-known tls entries. That was a harmless bug
because none of the well-known tls entries has a destructor, but
it's best not to leave land mines lying around.

Also add some missing POSIX constants, a new test, and fix
pthread_key_create's return value when we hit the limit.

Change-Id: Ife26ea2f4b40865308e8410ec803b20bcc3e0ed1
libc/Android.mk
libc/bionic/pthread.c
libc/bionic/pthread_internal.h
libc/bionic/pthread_key.cpp [new file with mode: 0644]
libc/bionic/sysconf.cpp
libc/include/sys/limits.h
libc/private/bionic_tls.h
libm/Android.mk
tests/pthread_test.cpp