AArch64: Use LDXR/STXR instead of LDAXR/STLXR for bionic_atomic_cmpxchg()

The bionic_atomic_cmpxchg() API states that the cmpxchg() will be done without
explicit memory barriers. LDAXR/STLXR semantics involve half barriers for
load/store.

This patch optimises cmpxchg() by using LDXR/STXR and avoiding unnecessary half
bariers. It also fixes the clobber list for all the bionic_atomic_*() functions.

Change-Id: Iae9468965785cfeeec791d52f1e8cbc524adb682
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Pass a valid stack pointer to __bionic_clone in pthread.__bionic_clone

__bionic_clone modifies the child stack before cloning so the stack
pointer should be valid. The test is expecting an EINVAL error to be
generated from the incorrect flags: CLONE_THREAD set without
CLONE_SIGHAND.

Change-Id: Ic02192081f6f52df6f03d9810efa82d923247a11
Merge "Pass a valid stack pointer to __bionic_clone in pthread.__bionic_clone"
Add cfi directives to x86 syscalls.

Modify the syscalls script to generate the cfi directives for x86
syscalls.

Update the x86 syscalls.

Change-Id: Ia1993dc714a7e79f917087fff8200e9a02c52603
Merge "Add cfi directives to x86 syscalls."
Regenerate the NOTICE files.

Also standardize the orthography in a few places to reduce near-duplicates
in the NOTICE files.

Change-Id: I347c75e817be61ec1b9c5b4b96226feedc8d09ab
Merge "Regenerate the NOTICE files."
Define fsid_t as well as __fsid_t.

Change-Id: Ib8efbd913a0e6bfe27b88c1342bd5cec926dd74e
<fcntl.h> should get you the POSIX_FADV_* constants.

Change-Id: I9de8b840570b228308c12d72b7617b8758237fb8
<sched.h> should offer both __sched_priority and sched_priority.

If glibc hadn't already done things this way round, I'd have
called the field sched_priority and the macro __sched_priority
since that would seem less likely to cause trouble, but glibc
source compatibility is probably more important.

Change-Id: I8a8a477f2aa87cae641069c5c84b4fcab3152a82
Merge "Define fsid_t as well as __fsid_t."
Add SWAP_FLAG_* constants to <sys/swap.h>.

Bug: 9336527
Change-Id: I679be4d8425ba177dd782e714f465caf9daa976c
Merge "Add SWAP_FLAG_* constants to <sys/swap.h>."
Merge "<fcntl.h> should get you the POSIX_FADV_* constants."
Merge "<sched.h> should offer both __sched_priority and sched_priority."
We shouldn't have a <sys/dirent.h> that's a subset of <dirent.h>.

glibc has no <sys/dirent.h>. If we do have to bring this back, we
should probably just have one file #include the other.

Change-Id: I5c0bf9c03769daf3b23f69778e9f01f81c3de9ec
Fix x86_64 register names in <sys/user.h>.

Change-Id: Ieb327247a41f6195589716170e324d1cd1251b96
Merge "We shouldn't have a <sys/dirent.h> that's a subset of <dirent.h>."
Merge "Fix x86_64 register names in <sys/user.h>."
Add <sys/reg.h>.

This describes the offsets into ptrace's returned arrays of registers
for x86 and x86-64.

Change-Id: I044f03e286673999a298b73a813d4ad366625845