OSDN Git Service

Improve pthread_create failure handling.
authorElliott Hughes <enh@google.com>
Tue, 19 Sep 2017 21:02:50 +0000 (14:02 -0700)
committerElliott Hughes <enh@google.com>
Tue, 19 Sep 2017 21:02:50 +0000 (14:02 -0700)
commit53dc9dd70155fd75af744cbebecc563658c69818
tree2c115be9ba0a403a6a42d9e880746275313dbd79
parentcce6ada00ad055ac52791526e44b1f223bec8ce4
Improve pthread_create failure handling.

Return EAGAIN rather than aborting if we fail to set up the TLS for a new
thread.

Add a test that uses all the VMAs so we can properly test these edge cases.

Add an explicit test for pthread_attr_setdetachstate, which we use in the
previous test, but other than that has no tests.

Remove support for ro.logd.timestamp/persist.logd.timestamp, which doesn't
seem to be used, and which prevents us from logging failures in cases where
mmap fails (because we need to mmap in the system property implementation).

Bug: http://b/65608572
Test: ran tests
Change-Id: I9009f06546e1c2cc55eff996d08b55eff3482343
libc/async_safe/async_safe_log.cpp
libc/bionic/__libc_init_main_thread.cpp
libc/bionic/pthread_create.cpp
libc/bionic/pthread_internal.h
tests/pthread_test.cpp