No description
Find a file
Elliott Hughes b30aff405a Revert "Revert "Lose the hand-written futex assembler.""
The problem with the original patch was that using syscall(3) means that
errno can be set, but pthread_create(3) was abusing the TLS errno slot as
a pthread_mutex_t for the thread startup handshake.

There was also a mistake in the check for syscall failures --- it should
have checked against -1 instead of 0 (not just because that's the default
idiom, but also here because futex(2) can legitimately return values > 0).

This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to
pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) >
sizeof(uintptr_t), so we could potentially clobber other TLS slots too.)

I've also rewritten the LP32 compatibility stubs to directly reuse the
code from the .h file.

This reverts commit 75c55ff84e.

Bug: 15195455
Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
2014-05-28 18:31:15 -07:00
benchmarks Switch to g_ for globals. 2014-05-14 10:02:03 -07:00
libc Revert "Revert "Lose the hand-written futex assembler."" 2014-05-28 18:31:15 -07:00
libdl Add android_dlopen_ext() interface to linker. 2014-04-17 13:50:55 +01:00
libm Use -fvisibility=hidden to build libm. 2014-05-19 16:58:52 -07:00
libstdc++ Move libstdc++ into libc. 2014-05-14 18:18:55 -07:00
linker Merge "Do not add arcs to the soinfo graph on dlopen" 2014-05-23 02:19:10 +00:00
tests Add C11 <stdatomic.h>. 2014-05-23 20:06:03 -07:00
.gitignore Merge memory checking functionality from sandbox 2010-02-16 11:43:18 -08:00
ABI-bugs.txt PTHREAD_KEYS_MAX cleanup. 2013-12-12 12:51:08 -08:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:11:41 -07:00
CleanSpec.mk Add an empty CleanSpec.mk 2010-03-08 18:04:02 -08:00
HACKING.txt Clean up and document our hacks for building BSD source. 2014-04-21 17:13:46 -07:00