Add optimized AArch64 versions of bcopy and wmemmove based on memmove

Add optimized versions of bcopy and wmemmove for AArch64 based on the
memmove implementation

Change-Id: I82fbe8a7221ce224c567ffcfed7a94a53640fca8
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Remove unnecessary padding in ucontext_t

- removed extra padding from ucontex_t on x86, x86_64 and mips
- force ucontext_t struct to use 64 bits for the sigmask on all arches
(previsouly wrong since sigset_t on arm and x86 is only 32 bits)
- arm and arm64 continue to use padding to match glibc sigset_t

This brings Bionic on par with the kernel w.r.t ucontext padding.

Bug: 12828904
Change-Id: Ia8915ace694ecb4695603a334e697985f4c3e7aa
Merge "Remove unnecessary padding in ucontext_t"
Revert "Lose the hand-written futex assembler."

This reverts commit ced906c849704f379d7191822f6d74993d4fa296.

Causes issues on art / dalvik due to a broken return value
check and other undiagnosed issues.

bug: 15195455

Change-Id: I5d6bbb389ecefb0e33a5237421a9d56d32a9317c
Merge "Revert "Lose the hand-written futex assembler.""
Updated ambiguous comment in pthread_mutex_lock.

The comment used the phrase "normal case" when it more specifically refers to the "recursive case," so I changed it to that.

Change-Id: I8335cce4dee933c6a463aee653b28bd986b5b5e4
Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"
Merge "Updated ambiguous comment in pthread_mutex_lock."
Fixes stdatomic.h test to match C11 spec

C11 defines the expected value to atomic_compare_exchange_* as being non-atomic
types. Using an atomic type is a syntax error in clang.

http://en.cppreference.com/w/c/atomic/atomic_compare_exchange

Change-Id: I74de1061fa1fc50d835451792d902000f368200e
Merge "Fixes stdatomic.h test to match C11 spec"
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 75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4.

Bug: 15195455
Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
Merge "Revert "Revert "Lose the hand-written futex assembler."""
Minor style cleanup of some code I had to look at.

(It turns out that this is the only place we're saying __inline in C++.)

Change-Id: I8095e67a385087817c47caab9a621f82f8e0cfc8
Upgrade to tzdata2014d.

There are no substantive changes to the data in this release. I'm applying
this just for completeness.

Change-Id: Ibe953969cb16db4d8d1ddb7dd3c943316e6e46b4
Merge "Upgrade to tzdata2014d."
Merge "Minor style cleanup of some code I had to look at."
Return the actual success result from __futex.

futex(2) can return non-zero successes.

Bug: 15195455
Change-Id: I7818bc922a5a2df31228ff72c169320b5e69a544
Fix overflow testing in sbrk.

Modify the overflow testing for sbrk.

Bug: 15188366

Change-Id: Ia83f85f7c1789454d872279bd41f38f1ce6b8a34
Merge "Fix overflow testing in sbrk."
Merge "Return the actual success result from __futex."