History log of /bionic/libc/arch-mips/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9e833bf0cf2c5bc0e6b65e4d96aa4f2b33113771 11-Sep-2014 Elliott Hughes <enh@google.com> Fix mips __fadvise64.S build failure.

Bug: 12449798

(cherry picked from commit 9990b3973bdfcda5419c06886215147a878222f1)

Change-Id: Iba92e2aa262666a59fc38b870dfd9f4082eeb628
yscalls/__fadvise64.S
00008263782e484020420c606f7d145fe7d0a4d8 11-Sep-2014 Elliott Hughes <enh@google.com> Add posix_fadvise(3).

Bug: 12449798
Change-Id: I07cbf3f670a0d1304b68148325a774f266b5c433
yscalls/__fadvise64.S
7efad83d430f4d824f2aaa75edea5106f6ff8aae 09-Sep-2014 Elliott Hughes <enh@google.com> Ensure __set_errno is still visible on LP32.

The use of the .hidden directive to avoid going via the PLT for
__set_errno had the side-effect of actually making __set_errno
hidden (which is odd because assembler directives don't usually
affect symbols defined in a different file --- you can't even
create a weak reference to a symbol that's defined in a different
file).

This change switches the system call stubs over to a new always-hidden
__set_errno_internal and has a visible __set_errno on LP32 just for
binary compatibility with old NDK apps.

Bug: 17423135
Change-Id: I6b6d7a05dda85f923d22e5ffd169a91e23499b7b
ionic/__bionic_clone.S
ionic/syscall.S
ionic/vfork.S
yscalls/__accept4.S
yscalls/__brk.S
yscalls/__connect.S
yscalls/__epoll_pwait.S
yscalls/__exit.S
yscalls/__fcntl64.S
yscalls/__fstatfs64.S
yscalls/__getcpu.S
yscalls/__getcwd.S
yscalls/__getdents64.S
yscalls/__getpid.S
yscalls/__getpriority.S
yscalls/__ioctl.S
yscalls/__llseek.S
yscalls/__mmap2.S
yscalls/__openat.S
yscalls/__ppoll.S
yscalls/__pselect6.S
yscalls/__ptrace.S
yscalls/__reboot.S
yscalls/__rt_sigaction.S
yscalls/__rt_sigpending.S
yscalls/__rt_sigprocmask.S
yscalls/__rt_sigsuspend.S
yscalls/__rt_sigtimedwait.S
yscalls/__sched_getaffinity.S
yscalls/__set_tid_address.S
yscalls/__set_tls.S
yscalls/__sigaction.S
yscalls/__signalfd4.S
yscalls/__socket.S
yscalls/__statfs64.S
yscalls/__timer_create.S
yscalls/__timer_delete.S
yscalls/__timer_getoverrun.S
yscalls/__timer_gettime.S
yscalls/__timer_settime.S
yscalls/__waitid.S
yscalls/_exit.S
yscalls/_flush_cache.S
yscalls/acct.S
yscalls/bind.S
yscalls/capget.S
yscalls/capset.S
yscalls/chdir.S
yscalls/chroot.S
yscalls/clock_getres.S
yscalls/clock_gettime.S
yscalls/clock_nanosleep.S
yscalls/clock_settime.S
yscalls/close.S
yscalls/delete_module.S
yscalls/dup.S
yscalls/dup3.S
yscalls/epoll_create1.S
yscalls/epoll_ctl.S
yscalls/eventfd.S
yscalls/execve.S
yscalls/faccessat.S
yscalls/fallocate64.S
yscalls/fchdir.S
yscalls/fchmod.S
yscalls/fchmodat.S
yscalls/fchown.S
yscalls/fchownat.S
yscalls/fdatasync.S
yscalls/fgetxattr.S
yscalls/flistxattr.S
yscalls/flock.S
yscalls/fremovexattr.S
yscalls/fsetxattr.S
yscalls/fstat64.S
yscalls/fstatat64.S
yscalls/fsync.S
yscalls/ftruncate.S
yscalls/ftruncate64.S
yscalls/getegid.S
yscalls/geteuid.S
yscalls/getgid.S
yscalls/getgroups.S
yscalls/getitimer.S
yscalls/getpeername.S
yscalls/getpgid.S
yscalls/getppid.S
yscalls/getresgid.S
yscalls/getresuid.S
yscalls/getrlimit.S
yscalls/getrusage.S
yscalls/getsid.S
yscalls/getsockname.S
yscalls/getsockopt.S
yscalls/gettimeofday.S
yscalls/getuid.S
yscalls/getxattr.S
yscalls/init_module.S
yscalls/inotify_add_watch.S
yscalls/inotify_init1.S
yscalls/inotify_rm_watch.S
yscalls/kill.S
yscalls/klogctl.S
yscalls/lgetxattr.S
yscalls/linkat.S
yscalls/listen.S
yscalls/listxattr.S
yscalls/llistxattr.S
yscalls/lremovexattr.S
yscalls/lseek.S
yscalls/lsetxattr.S
yscalls/madvise.S
yscalls/mincore.S
yscalls/mkdirat.S
yscalls/mknodat.S
yscalls/mlock.S
yscalls/mlockall.S
yscalls/mount.S
yscalls/mprotect.S
yscalls/mremap.S
yscalls/msync.S
yscalls/munlock.S
yscalls/munlockall.S
yscalls/munmap.S
yscalls/nanosleep.S
yscalls/personality.S
yscalls/pipe2.S
yscalls/prctl.S
yscalls/pread64.S
yscalls/prlimit64.S
yscalls/pwrite64.S
yscalls/read.S
yscalls/readahead.S
yscalls/readlinkat.S
yscalls/readv.S
yscalls/recvfrom.S
yscalls/recvmmsg.S
yscalls/recvmsg.S
yscalls/removexattr.S
yscalls/renameat.S
yscalls/sched_get_priority_max.S
yscalls/sched_get_priority_min.S
yscalls/sched_getparam.S
yscalls/sched_getscheduler.S
yscalls/sched_rr_get_interval.S
yscalls/sched_setaffinity.S
yscalls/sched_setparam.S
yscalls/sched_setscheduler.S
yscalls/sched_yield.S
yscalls/sendfile.S
yscalls/sendfile64.S
yscalls/sendmmsg.S
yscalls/sendmsg.S
yscalls/sendto.S
yscalls/setfsgid.S
yscalls/setfsuid.S
yscalls/setgid.S
yscalls/setgroups.S
yscalls/setitimer.S
yscalls/setns.S
yscalls/setpgid.S
yscalls/setpriority.S
yscalls/setregid.S
yscalls/setresgid.S
yscalls/setresuid.S
yscalls/setreuid.S
yscalls/setrlimit.S
yscalls/setsid.S
yscalls/setsockopt.S
yscalls/settimeofday.S
yscalls/setuid.S
yscalls/setxattr.S
yscalls/shutdown.S
yscalls/sigaltstack.S
yscalls/socketpair.S
yscalls/splice.S
yscalls/swapoff.S
yscalls/swapon.S
yscalls/symlinkat.S
yscalls/sync.S
yscalls/sysinfo.S
yscalls/tee.S
yscalls/tgkill.S
yscalls/timerfd_create.S
yscalls/timerfd_gettime.S
yscalls/timerfd_settime.S
yscalls/times.S
yscalls/truncate.S
yscalls/truncate64.S
yscalls/umask.S
yscalls/umount2.S
yscalls/uname.S
yscalls/unlinkat.S
yscalls/unshare.S
yscalls/utimensat.S
yscalls/vmsplice.S
yscalls/wait4.S
yscalls/write.S
yscalls/writev.S
642182341018b282148280a7bdb771493e15bd7d 26-Aug-2014 Elliott Hughes <enh@google.com> Fix pthread_getattr_np for the main thread.

On most architectures the kernel subtracts a random offset to the stack
pointer in create_elf_tables by calling arch_align_stack before writing
the auxval table and so on. On all but x86 this doesn't cause a problem
because the random offset is less than a page, but on x86 it's up to two
pages. This means that our old technique of rounding the stack pointer
doesn't work. (Our old implementation of that technique was wrong too.)

It's also incorrect to assume that the main thread's stack base and size
are constant. Likewise to assume that the main thread has a guard page.
The main thread is not like other threads.

This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK)
whenever we're asked.

Bug: 17111575
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>

(cherry picked from commit 57b7a6110e7e8b446fc23cce4765ff625ee0a105)

Change-Id: I87e679ee1c0db8092f2d1221c8e7c1461545c5a4
ionic/__get_sp.S
ips.mk
e35fd48a832cddbedcf84773fd1922f735ae7829 09-Aug-2014 Dan Albert <danalbert@google.com> Make __set_errno hidden in asm.

This fixes the build after the -Bsymbolic change.

Bug: 16853291
Change-Id: I989c9fec3c32e0289ea257a3bd2b7fd2709b6ce2
(cherry picked from commit bc9f9f25bf1247a6a638a2a2df8441bdd9fabad7)
yscalls/__accept4.S
yscalls/__brk.S
yscalls/__connect.S
yscalls/__epoll_pwait.S
yscalls/__exit.S
yscalls/__fcntl64.S
yscalls/__fstatfs64.S
yscalls/__getcpu.S
yscalls/__getcwd.S
yscalls/__getdents64.S
yscalls/__getpid.S
yscalls/__getpriority.S
yscalls/__ioctl.S
yscalls/__llseek.S
yscalls/__mmap2.S
yscalls/__openat.S
yscalls/__ppoll.S
yscalls/__pselect6.S
yscalls/__ptrace.S
yscalls/__reboot.S
yscalls/__rt_sigaction.S
yscalls/__rt_sigpending.S
yscalls/__rt_sigprocmask.S
yscalls/__rt_sigsuspend.S
yscalls/__rt_sigtimedwait.S
yscalls/__sched_getaffinity.S
yscalls/__set_tid_address.S
yscalls/__set_tls.S
yscalls/__sigaction.S
yscalls/__signalfd4.S
yscalls/__socket.S
yscalls/__statfs64.S
yscalls/__timer_create.S
yscalls/__timer_delete.S
yscalls/__timer_getoverrun.S
yscalls/__timer_gettime.S
yscalls/__timer_settime.S
yscalls/__waitid.S
yscalls/_exit.S
yscalls/_flush_cache.S
yscalls/acct.S
yscalls/bind.S
yscalls/capget.S
yscalls/capset.S
yscalls/chdir.S
yscalls/chroot.S
yscalls/clock_getres.S
yscalls/clock_gettime.S
yscalls/clock_nanosleep.S
yscalls/clock_settime.S
yscalls/close.S
yscalls/delete_module.S
yscalls/dup.S
yscalls/dup3.S
yscalls/epoll_create1.S
yscalls/epoll_ctl.S
yscalls/eventfd.S
yscalls/execve.S
yscalls/faccessat.S
yscalls/fallocate64.S
yscalls/fchdir.S
yscalls/fchmod.S
yscalls/fchmodat.S
yscalls/fchown.S
yscalls/fchownat.S
yscalls/fdatasync.S
yscalls/fgetxattr.S
yscalls/flistxattr.S
yscalls/flock.S
yscalls/fremovexattr.S
yscalls/fsetxattr.S
yscalls/fstat64.S
yscalls/fstatat64.S
yscalls/fsync.S
yscalls/ftruncate.S
yscalls/ftruncate64.S
yscalls/getegid.S
yscalls/geteuid.S
yscalls/getgid.S
yscalls/getgroups.S
yscalls/getitimer.S
yscalls/getpeername.S
yscalls/getpgid.S
yscalls/getppid.S
yscalls/getresgid.S
yscalls/getresuid.S
yscalls/getrlimit.S
yscalls/getrusage.S
yscalls/getsid.S
yscalls/getsockname.S
yscalls/getsockopt.S
yscalls/gettimeofday.S
yscalls/getuid.S
yscalls/getxattr.S
yscalls/init_module.S
yscalls/inotify_add_watch.S
yscalls/inotify_init1.S
yscalls/inotify_rm_watch.S
yscalls/kill.S
yscalls/klogctl.S
yscalls/lgetxattr.S
yscalls/linkat.S
yscalls/listen.S
yscalls/listxattr.S
yscalls/llistxattr.S
yscalls/lremovexattr.S
yscalls/lseek.S
yscalls/lsetxattr.S
yscalls/madvise.S
yscalls/mincore.S
yscalls/mkdirat.S
yscalls/mknodat.S
yscalls/mlock.S
yscalls/mlockall.S
yscalls/mount.S
yscalls/mprotect.S
yscalls/mremap.S
yscalls/msync.S
yscalls/munlock.S
yscalls/munlockall.S
yscalls/munmap.S
yscalls/nanosleep.S
yscalls/personality.S
yscalls/pipe2.S
yscalls/prctl.S
yscalls/pread64.S
yscalls/prlimit64.S
yscalls/pwrite64.S
yscalls/read.S
yscalls/readahead.S
yscalls/readlinkat.S
yscalls/readv.S
yscalls/recvfrom.S
yscalls/recvmmsg.S
yscalls/recvmsg.S
yscalls/removexattr.S
yscalls/renameat.S
yscalls/sched_get_priority_max.S
yscalls/sched_get_priority_min.S
yscalls/sched_getparam.S
yscalls/sched_getscheduler.S
yscalls/sched_rr_get_interval.S
yscalls/sched_setaffinity.S
yscalls/sched_setparam.S
yscalls/sched_setscheduler.S
yscalls/sched_yield.S
yscalls/sendfile.S
yscalls/sendfile64.S
yscalls/sendmmsg.S
yscalls/sendmsg.S
yscalls/sendto.S
yscalls/setfsgid.S
yscalls/setfsuid.S
yscalls/setgid.S
yscalls/setgroups.S
yscalls/setitimer.S
yscalls/setns.S
yscalls/setpgid.S
yscalls/setpriority.S
yscalls/setregid.S
yscalls/setresgid.S
yscalls/setresuid.S
yscalls/setreuid.S
yscalls/setrlimit.S
yscalls/setsid.S
yscalls/setsockopt.S
yscalls/settimeofday.S
yscalls/setuid.S
yscalls/setxattr.S
yscalls/shutdown.S
yscalls/sigaltstack.S
yscalls/socketpair.S
yscalls/splice.S
yscalls/swapoff.S
yscalls/swapon.S
yscalls/symlinkat.S
yscalls/sync.S
yscalls/sysinfo.S
yscalls/tee.S
yscalls/tgkill.S
yscalls/timerfd_create.S
yscalls/timerfd_gettime.S
yscalls/timerfd_settime.S
yscalls/times.S
yscalls/truncate.S
yscalls/truncate64.S
yscalls/umask.S
yscalls/umount2.S
yscalls/uname.S
yscalls/unlinkat.S
yscalls/unshare.S
yscalls/utimensat.S
yscalls/vmsplice.S
yscalls/wait4.S
yscalls/write.S
yscalls/writev.S
5386a741e77bfff4e72ca6861fdd3fe2208452ce 05-Aug-2014 Dan Albert <danalbert@google.com> Revert "Replaces vfork() implementation with fork()"

We're getting cold feet on this one... let's put it back.

This reverts commit 210331d9762037afb9b5ed8413079c6f65872df9.

Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269
(cherry picked from commit 6a918870bab1a55a5f57dd7954abd9a8a27c1bc2)
ionic/vfork.S
ips.mk
4f76469e88e255bab1f8264e9ff8b95bff84365f 31-Jul-2014 Elliott Hughes <enh@google.com> Implement <sys/fsuid.h>.

(cherry picked from commit 79310994d2b3826a10598f7e7795acb5edb42a20)

Change-Id: I47688273691e5c95e5e9302eba254ccaaaad40ca
yscalls/setfsgid.S
yscalls/setfsuid.S
cd54195262ac5531fff892255849925ebbbd303e 11-Jul-2014 Duane Sand <duane.sand@imgtec.com> [MIPSR6] Use C-coded string ops on mips32r6/mips64r6

The existing assembler code uses deprecated lwl/lwr/swl/swr ops.
Replacing those with misalignment-forgiving lw/sw ops may
involve careful performance tuning.

(cherry picked from commit bc5a3ec6df66d2456667ddf1d6dfaf623552169d)

Change-Id: I35167da27f2d406339b7f24b4a1fb270c87bc12e
ips.mk
5ade7e3f6bb43d419402aab2c7adca2173e2c584 24-Jul-2014 Duane Sand <duane.sand@imgtec.com> [MIPS] Drop soft-fp targets

(cherry picked from commit ba23bd0a409bb0e43c57dabee96b2ae52481d5b7)

Change-Id: Ica09192c2760d38ceebc14e23a5d3ba94c20764c
ips.mk
c86950cb3f50ead0c9a9d0366b870d6c6e1b91c8 15-Jul-2014 Duane Sand <duane.sand@imgtec.com> [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models

Save and restore floating point registers via 64-bit
load/stores when possible. Use assembler's builtin macro
ops to generate pairs of 32-bit load/stores on Mips I cpus.

Some cpus or FR modes have only 16 even-numbered dp fp regs.
This is exposed by _MIPS_FPSET, defined by existing compilers.

(cherry picked from commit dd37251c473e1483faba0fd5aaf30e7a55582e8a)

Change-Id: Ibd43653701a363a77af85121d3cbd229d132a06a
ionic/_setjmp.S
ionic/setjmp.S
5d7775c6dfa8f9b2ae313c9493525d54a2d04b38 16-Jul-2014 Duane Sand <duane.sand@imgtec.com> [MIPS] Allow united mipsel and mips64el gcc toolchain

Explicitly tell 32-bit links that they are doing 32-bit links.
This is needed when using united 32-bit and 64-bit toolchains.
This is harmless when using older separate 32-only toolchains.

(cherry picked from commit f541650828f75b3dab22c9c0caab845be78b80fc)

Change-Id: I8df0ee7d36c6409458e18bea4e0e8b132edf77dc
ips.mk
3f525d41c2acde2ae3309cf839d83d7f41ab2fe6 25-Jun-2014 Elliott Hughes <enh@google.com> Add splice, tee, and vmsplice.

Change-Id: I5f43380b88d776a8bb607b47dbbc5db5a2fe6163
yscalls/splice.S
yscalls/tee.S
yscalls/vmsplice.S
0d7415fb225573c37ff9e880957cd2044dd658ce 21-Jun-2014 Dan Albert <danalbert@google.com> Merge "Remove SHA1 from LP64 in favor of libcrypto."
7086ad6919feb2415c6027163f5c63323bcca27c 20-Jun-2014 Elliott Hughes <enh@google.com> Cache getpid.

In practice, with this implementation we never need to make a system call.
We get the main thread's tid (which is the same as our pid) back from
the set_tid_address system call we have to make during initialization.
A new pthread will have the same pid as its parent, and a fork child's
main (and only) thread will have a pid equal to its tid, which we get for
free from the kernel before clone returns.

The only time we'd actually have to make a getpid system call now is if
we take a signal during fork and the signal handler calls getpid. (That,
or we call getpid in the dynamic linker while it's still dealing with its
own relocations and hasn't even set up the main thread yet.)

Bug: 15387103
Change-Id: I6d4718ed0a5c912fc75b5f738c49a023dbed5189
yscalls/__getpid.S
yscalls/getpid.S
c82c0b7e072491da4818e7de37411fbb2055fce1 17-Jun-2014 Dan Albert <danalbert@google.com> Remove SHA1 from LP64 in favor of libcrypto.

Keep the symbols around on LP32 for binary compatibility.

Bug: 11156955
Change-Id: I379a7e0fa3092e9a70daeafcbcb2aacfc314031a
ips.mk
891dedb935b50f1abb39eedfe33049a1e49283cb 13-Jun-2014 David 'Digit' Turner <digit@google.com> libc: Fix 'index' symbol export.

The C library didn't export the 'index' symbol, but its C++ name-mangling
instead, which broke the ABI and prevented some applications from loading
properly.

The main reason was that the implementation under bionic/index.cpp relied
on the declaration to specify that the function has C linkage.

However, the declaration for index() was removed from both <string.h>
and <strings.h> in a recent patch, which made the compiler think it was
ok to compile the function with C++ linkage instead!

This patch does the following:

- Move index() definition to bionic/ndk_cruft.cpp and ensure it uses
C linkage.

Note that this removes index() from the 64-bit library entirely, this
is intentional and will break source compatibility. Simply replacing
an index() call with the equivalent strchr() should be enough to fix
this in third-party code.

- Remove bionic/index.cpp from the tree and build files.

- Remove x86 assembly implementation from arch-x86/ to avoid conflict
with the one in ndk_cruft.cpp

BUG=15606653

Change-Id: I816b589f69c8f8a6511f6be6195d20cf1c4e8123
ips.mk
f87ac523a1aa02490d67330e74180c8ac2d78420 13-Jun-2014 Dan Albert <danalbert@google.com> Merge "Remove ioprio_get(2) and ioprio_set(2) from LP64."
607341e226912d95d03216483bdcef6f8d96f8b4 13-Jun-2014 Dan Albert <danalbert@google.com> Remove ioprio_get(2) and ioprio_set(2) from LP64.

Bug: 11156955
Change-Id: I07b596d85e4bd6347d488d1a92c8d0a00b5ef3b3
yscalls/ioprio_get.S
yscalls/ioprio_set.S
24614b4729a4c8665193f5793b93019b37f779b1 13-Jun-2014 Elliott Hughes <enh@google.com> Remove __memcmp16 from bionic.

Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
ionic/memcmp16.S
ips.mk
8e613cf342b369f7985135dbe11ebdbf8c736157 11-Jun-2014 Dan Albert <danalbert@google.com> Remove declaration for putw(3)/getw(3).

These were both removed from POSIX 2004, and we don't define an
implementation for getw(3). Keep the definition of put(3) on LP32 for
binary compatibility.

Bug: 13935372
Change-Id: Iba384b45093ac6d2d7c2d81f7980cd7701dd6f56
ips.mk
440bd6bcc308f78b32fcbc4a3ba312dd1343559b 11-Jun-2014 Dan Albert <danalbert@google.com> Merge "Replaces vfork() implementation with fork()"
210331d9762037afb9b5ed8413079c6f65872df9 06-Jun-2014 Dan Albert <danalbert@google.com> Replaces vfork() implementation with fork()

vfork() was removed from POSIX 2008, so this replaces its implementation
with a call to fork().

Bug: 13935372
Change-Id: I6d99ac9e52a2efc5ee9bda1cab908774b830cedc
ionic/vfork.S
ips.mk
1c60f8080acaf0f1794689886e94e54d15d43a7b 07-Jun-2014 Elliott Hughes <enh@google.com> Merge "Rename __bionic_clone_entry to __start_thread."
ebc8cd117a562f387c52ed4e1aeba0fb21f33194 07-Jun-2014 Elliott Hughes <enh@google.com> Rename __bionic_clone_entry to __start_thread.

This seems a bit less obscure.

Change-Id: I7dc528c253b73c861694f67556ad8f919bf92136
ionic/__bionic_clone.S
3d5cb30d23cfc6a72f01c00246e69a2c614c8228 06-Jun-2014 Elliott Hughes <enh@google.com> Remove getdents from bionic.

Bug: 11156955
Change-Id: I6c306989801be552d85fba8a50dcdc79282fb9d2
yscalls/__getdents64.S
yscalls/getdents.S
5d9a7ba0dc9c24ed4e4efa9cac0e796fd524b308 31-May-2014 Elliott Hughes <enh@google.com> Avoid a system call in 'gettid'.

System calls can be pretty slow. This is mako, which has one of our
lowest latencies:

iterations ns/op
BM_unistd_getpid 10000000 209
BM_unistd_gettid 200000000 8

Bug: 15297299 (kernel panic from too many gettid calls)
Bug: 15315766 (excessive gettid overhead in liblogd)
Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb
yscalls/gettid.S
fae42a837ae7f880de9561c7b3c2b18e4a531e90 29-May-2014 Elliott Hughes <enh@google.com> Merge "Revert "Revert "Lose the hand-written futex assembler."""
b30aff405a220495941f1673b0a5e66c4fa8b84c 28-May-2014 Elliott Hughes <enh@google.com> 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
ionic/futex_mips.S
ips.mk
yscalls/futex.S
8a405b027a9c8b3a614016f4824a03fa252e9e1e 28-May-2014 Christopher Ferris <cferris@google.com> Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"
52f74322b1d72d57146107f32ee2c76c421bf4b1 28-May-2014 Narayan Kamath <narayan@google.com> Merge "Revert "Lose the hand-written futex assembler.""
75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4 28-May-2014 Narayan Kamath <narayan@google.com> 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
ionic/futex_mips.S
ips.mk
yscalls/futex.S
e7dccdf683616347a8fa65aba02ee3e12babbcf4 28-May-2014 Elliott Hughes <enh@google.com> Clear the return address register in __bionic_clone.

The unwinder will end up on the parent thread's stack if the return
address register is not cleared.

Bug: 14270816
Bug: 15195760
Change-Id: Iebcdf5cc881cad245643bb193760de35eb7f8b19
ionic/__bionic_clone.S
6f2bde344123d8503cd60f3ecd3420f39aa24eb9 23-May-2014 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> 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>
ips.mk
fd0ce866ce46ed62aa17dc2959a085cb3bf5755d 24-May-2014 Christopher Ferris <cferris@google.com> Revert "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"

This reverts commit 8167dd7cb98e87ffe9b40e4993c330b244ca2234.

For some reason I thought the bcopy change was bzero. The bcopy code doesn't pass our tests, so reverting until I can figure out what's wrong.

Change-Id: Id89fe959ea5105cd58dff6bba8d91a30cc4bcb07
ips.mk
8167dd7cb98e87ffe9b40e4993c330b244ca2234 23-May-2014 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> 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: Ie43d0ff4f8ec4edba5b4fb5ccacd941f81ac6557
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
ips.mk
ced906c849704f379d7191822f6d74993d4fa296 23-May-2014 Elliott Hughes <enh@google.com> Lose the hand-written futex assembler.

Also stop exporting 'futex'.

Bug: 12250341
Change-Id: Icc4fa4296cd04dfe0d1061822c69e2eb40c3433a
ionic/futex_mips.S
ips.mk
yscalls/futex.S
6e599a904b1f033cfaf79febff686f6296089a7d 22-May-2014 Elliott Hughes <enh@google.com> Remove the tkill(2) stub.

glibc doesn't have tkill or tgkill and says "use syscall(3) instead".
I've left tgkill since it's quite widely used, but there's no reason
to have tkill as well.

Bug: 11156955
Change-Id: Ifc0af750320086f829bc9914551c172b501f3b60
yscalls/tkill.S
d5ed63a6a8290de88802172ce178656fbafe70c6 22-May-2014 Elliott Hughes <enh@google.com> Hide most of the private futex functions.

Also hide part of the system properties compatibility code, since
we needed to touch that to keep it building.

I'll remove __futex_syscall4 and futex in a later patch.

Bug: 11156955
Change-Id: Ibbf42414c5bb07fb9f1c4a169922844778e4eeae
ionic/futex_mips.S
c1b7f44c13fbcbab3faaa8e11d3a459ebc11bfe5 21-May-2014 Elliott Hughes <enh@google.com> Merge "Remove __syslog; we have the public klogctl API."
9f0a52e4e5afc20a61230e6cbfe735606bff7e0c 21-May-2014 Elliott Hughes <enh@google.com> Merge "Hide __get_sp."
46a55a4478db9e335bdc7f73ee2cf3a66fe673fd 21-May-2014 Elliott Hughes <enh@google.com> Remove __syslog; we have the public klogctl API.

Bug: 11156955
Change-Id: I5c2cc02f39f76dd32984135f5c12c10bf2853796
yscalls/__syslog.S
c3705f641507eafc170cd7a3fe98759e781e4594 21-May-2014 Elliott Hughes <enh@google.com> Hide __get_sp.

Bug: 11156955
Change-Id: I55d8d320521e80c2085af28933a18b00cf5c714e
ionic/__get_sp.S
4e631ba5688db2fae7bbc476982055a376102146 21-May-2014 Elliott Hughes <enh@google.com> Remove perf_event_open.

This was accidentally added at a time when you couldn't add a constant
to <syscall.h> without generating an assembly stub! (You no longer need
to add the constants at all.)

Bug: 11156955
Change-Id: I053c17879138787976c744a5ecf7d30ee51dc48f
yscalls/perf_event_open.S
903b78873a744d3fba187e4bd22008ba21162e51 19-May-2014 Sreeram Ramachandran <sreeram@google.com> Mark sockets on creation (socket()) and accept4().

Remove the separate syscall for accept() and implement it as accept4(..., 0).

Change-Id: Ib0b8f5d7c5013b91eae6bbc3847852eb355c7714
yscalls/__accept.S
yscalls/__accept4.S
yscalls/__socket.S
yscalls/accept4.S
yscalls/socket.S
31d0398de65becc83168fa931cbd3345bbc346bd 17-May-2014 Elliott Hughes <enh@google.com> Hide _exit_with_stack_teardown.

Bug: 11156955
Change-Id: Ida3020343c9975177dc324918cd1f10c455eb173
ionic/_exit_with_stack_teardown.S
7222b1b594a8fab4b9e744d764b70e4c17767794 17-May-2014 Elliott Hughes <enh@google.com> Hide __signalfd4, used to implement signalfd(3).

Bug: 11156955
Change-Id: I50842279cb5b32ec8bd45193435574e415cd806e
yscalls/__signalfd4.S
yscalls/signalfd4.S
8f0cd8aa22906c3e678738eeba20fc1a5c399b6c 14-May-2014 Sreeram Ramachandran <sreeram@google.com> Mark sockets on accept().

(cherry picked from commit 58b1f3f6a30a660ad81637c2b50382c3d279243b)

Change-Id: I5d09be413cf720fbed905f96313b007997ada76c
yscalls/__accept.S
yscalls/accept.S
ceb5bd787c8ce281e5f4343c5d4f77b41c3e2919 12-May-2014 Sreeram Ramachandran <sreeram@google.com> Introduce netd_client, a dynamic library that talks to netd.

The library exists outside bionic. It is dynamically loaded, to replace selected
standard socket syscalls with versions that talk to netd.

Change connect() to use the library if available.

(cherry picked from commit 3a6b627a14df8111b03e452f2df4b5f4938e0e49)

Change-Id: Ib6198e19dbc306521a26fcecfdf6e8424d163fc9
yscalls/__connect.S
yscalls/connect.S
c1d26965ae12f94c7b0dc64b2548c3c29d180296 13-May-2014 Christopher Ferris <cferris@google.com> Merge "Add 32-bit Silvermont-optimized string/memory functions."
dcbef06ce6bb21d62d5a32148a3e64746b47b449 13-May-2014 Elliott Hughes <enh@google.com> Remove the useless indirection in mips' __set_tls.

Change-Id: I12e9d6716c42ccbccc9a186441aca0736bb22d05
ionic/__set_tls.c
ips.mk
yscalls/__set_thread_area.S
yscalls/__set_tls.S
5a92284167ffba6d45210ef6889fa7d255c15d4f 24-Apr-2014 Varvara Rainchik <varvara.rainchik@intel.com> Add 32-bit Silvermont-optimized string/memory functions.

Add following functions:
bcopy, memcpy, memmove, memset, bzero, memcmp, wmemcmp, strlen,
strcpy, strncpy, stpcpy, stpncpy.
Create new directories inside arch-x86 to specify architecture: atom,
silvermont and generic (non atom or silvermont architectures are treated like generic).
Due to introducing optimized versions of stpcpy and stpncpy,
c-implementations of these functions are moved from
common for architectures makefile to arm and mips specific makefiles.

Change-Id: I990f8061c3e9bca1f154119303da9e781c5d086e
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
ips.mk
954cf0d4e2669f91194b45f484152e47efa4f6c7 09-May-2014 Elliott Hughes <enh@google.com> Hide the __bionic_clone and __bionic_clone_entry implementation details.

clone(2) is the public symbol.

Also switch a test from __bionic_clone to clone; testing public API
means the test now works on glibc too.

Change-Id: If59def26a00c3afadb8a6cf9442094c35a59ffde
ionic/__bionic_clone.S
8d77bce185d04c531bd9bf34d38e5cbbe644d3a3 22-Apr-2014 Elliott Hughes <enh@google.com> LP64 shouldn't include the non-standard <time64.h> cruft.

This patch includes just enough to keep external/chromium_org building
until they switch 64-bit Android over to using the regular non-Android code.

Change-Id: Iecaf274efa46ae18a42d5e3439c5aa4f909177c1
ips.mk
cb65cc3fb4a8d7dfbbcbdfdb9140ab59baada28e 17-Apr-2014 Elliott Hughes <enh@google.com> Clean up <machine/ieee.h>.

The upstream intention was for this to be architecture-dependent, but it's a
lot clearer if we just have one copy.

Change-Id: I4e8310496145f9f411cd2e847c8cd023b1d758e9
nclude/machine/ieee.h
9f525644df99cb2f7f81a23ca23840f0a8f82275 09-Apr-2014 Elliott Hughes <enh@google.com> Implement _Exit(3).

Change-Id: Ida6ac844cc87d38c9645b197dd8188bb73e27dbe
yscalls/_exit.S
1b0dc40980c259aa0d9a416cd1ccf497e6efe138 02-Apr-2014 Elliott Hughes <enh@google.com> Remove <machine/limits.h>.

Change-Id: I7f9e9538517f726d4f08bf1f4b8d57c54d3f1676
nclude/machine/limits.h
ac3fc00ca2c157387164c7daaf9e10799c5ac8dc 11-Mar-2014 Russell Webb <russell.webb@intel.com> Remove SIZE_MAX definition in limits.h

the POSIX standard is that SIZE_MAX is defined
in stdint.h, not limits.h.

Change-Id: Iafd8ec71d1840541feaca4f53b2926b398293fac
Signed-off-by: Webb, Russell <russell.webb@intel.com>
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Reviewed-by: Ross, Andrew J <andrew.j.ross@intel.com>
Reviewed-by: Boie, Andrew P <andrew.p.boie@intel.com>
Reviewed-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
Tested-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
nclude/machine/limits.h
8f2a30a92ab6981cccbc1a9e17b738f7542ae33f 26-Mar-2014 Andrei Emeltchenko <andrei.emeltchenko@intel.com> Add accept4() syscall

Add accept4() using SYSCALLS.TXT and gensyscall

Change-Id: I6f19f29144186d15d46423e10f2cc4b4223719c6
yscalls/accept4.S
6ff0c75c838e73d2aeccc0102ab58a7b865172ca 10-Feb-2014 Guillaume Ranquet <guillaumex.ranquet@intel.com> Add recvmmsg and sendmmsg syscalls.

Also add the corresponding constant, struct, and function declarations
to <sys/socket.h>, and perfunctory tests so we know that the symbols
actually exist.

Signed-off-by: Guillaume Ranquet <guillaumex.ranquet@intel.com>
Change-Id: Ib0d854239d3716be90ad70973c579aff4895a4f7
yscalls/recvmmsg.S
yscalls/sendmmsg.S
53e43292aac91bf62995788cd5ca2ceb7caea283 25-Feb-2014 Elliott Hughes <enh@google.com> More OpenBSD cleanup (primarily string).

This patch removes the string/ and wchar/ directories.

Change-Id: Ia489904bc67047e4bc79acb1f3eec21aa3fe5f0d
ips.mk
b8dc9bbd905f762bae9845274b1053da1c084860 20-Feb-2014 Elliott Hughes <enh@google.com> Stop asking GCC to cause trouble.

Why do we see so many bogus strict-aliasing warnings? Because we asked GCC to
cause trouble on arm and mips.

Change-Id: I25d7fd036b6afff7ccfa799abe0dc1579ead2847
ips.mk
851e68a2402fa414544e66650e09dfdaac813e51 20-Feb-2014 Elliott Hughes <enh@google.com> Unify our assembler macros.

Our <machine/asm.h> files were modified from upstream, to the extent
that no architecture was actually using the upstream ENTRY or END macros,
assuming that architecture even had such a macro upstream. This patch moves
everyone to the same macros, with just a few tweaks remaining in the
<machine/asm.h> files, which no one should now use directly.

I've removed most of the unused cruft from the <machine/asm.h> files, though
there's still rather a lot in the mips/mips64 ones.

Bug: 12229603
Change-Id: I2fff287dc571ac1087abe9070362fb9420d85d6d
ionic/__bionic_clone.S
ionic/__get_sp.S
ionic/_exit_with_stack_teardown.S
ionic/_setjmp.S
ionic/bzero.S
ionic/futex_mips.S
ionic/memcmp16.S
ionic/setjmp.S
ionic/sigsetjmp.S
ionic/syscall.S
ionic/vfork.S
nclude/machine/asm.h
nclude/machine/signal.h
tring/memcpy.S
tring/memset.S
6e39ba73bfd9504762e8798fd6b293f11d5fdf7e 20-Feb-2014 Elliott Hughes <enh@google.com> Stop advertising an arm32-specific hack like it's a build system feature.

Change-Id: I3a830b4a3516b6eb8e4f8e6e6b122a22a2e341df
ips.mk
9abbbdc5346020e33a8fdbe7254dd0fdff9df616 19-Feb-2014 Elliott Hughes <enh@google.com> Make mips/mips64 syscall stubs more like the other architectures.

Change-Id: I55f8c1a95f643a6e484f12fbcc25e2c77e55b6b8
ionic/futex_mips.S
yscalls/__brk.S
yscalls/__epoll_pwait.S
yscalls/__exit.S
yscalls/__fcntl64.S
yscalls/__fstatfs64.S
yscalls/__getcpu.S
yscalls/__getcwd.S
yscalls/__getpriority.S
yscalls/__ioctl.S
yscalls/__llseek.S
yscalls/__mmap2.S
yscalls/__openat.S
yscalls/__ppoll.S
yscalls/__pselect6.S
yscalls/__ptrace.S
yscalls/__reboot.S
yscalls/__rt_sigaction.S
yscalls/__rt_sigpending.S
yscalls/__rt_sigprocmask.S
yscalls/__rt_sigsuspend.S
yscalls/__rt_sigtimedwait.S
yscalls/__sched_getaffinity.S
yscalls/__set_thread_area.S
yscalls/__set_tid_address.S
yscalls/__sigaction.S
yscalls/__statfs64.S
yscalls/__syslog.S
yscalls/__timer_create.S
yscalls/__timer_delete.S
yscalls/__timer_getoverrun.S
yscalls/__timer_gettime.S
yscalls/__timer_settime.S
yscalls/__waitid.S
yscalls/_exit.S
yscalls/_flush_cache.S
yscalls/accept.S
yscalls/acct.S
yscalls/bind.S
yscalls/capget.S
yscalls/capset.S
yscalls/chdir.S
yscalls/chroot.S
yscalls/clock_getres.S
yscalls/clock_gettime.S
yscalls/clock_nanosleep.S
yscalls/clock_settime.S
yscalls/close.S
yscalls/connect.S
yscalls/delete_module.S
yscalls/dup.S
yscalls/dup3.S
yscalls/epoll_create1.S
yscalls/epoll_ctl.S
yscalls/eventfd.S
yscalls/execve.S
yscalls/faccessat.S
yscalls/fallocate64.S
yscalls/fchdir.S
yscalls/fchmod.S
yscalls/fchmodat.S
yscalls/fchown.S
yscalls/fchownat.S
yscalls/fdatasync.S
yscalls/fgetxattr.S
yscalls/flistxattr.S
yscalls/flock.S
yscalls/fremovexattr.S
yscalls/fsetxattr.S
yscalls/fstat64.S
yscalls/fstatat64.S
yscalls/fsync.S
yscalls/ftruncate.S
yscalls/ftruncate64.S
yscalls/futex.S
yscalls/getdents.S
yscalls/getegid.S
yscalls/geteuid.S
yscalls/getgid.S
yscalls/getgroups.S
yscalls/getitimer.S
yscalls/getpeername.S
yscalls/getpgid.S
yscalls/getpid.S
yscalls/getppid.S
yscalls/getresgid.S
yscalls/getresuid.S
yscalls/getrlimit.S
yscalls/getrusage.S
yscalls/getsid.S
yscalls/getsockname.S
yscalls/getsockopt.S
yscalls/gettid.S
yscalls/gettimeofday.S
yscalls/getuid.S
yscalls/getxattr.S
yscalls/init_module.S
yscalls/inotify_add_watch.S
yscalls/inotify_init1.S
yscalls/inotify_rm_watch.S
yscalls/ioprio_get.S
yscalls/ioprio_set.S
yscalls/kill.S
yscalls/klogctl.S
yscalls/lgetxattr.S
yscalls/linkat.S
yscalls/listen.S
yscalls/listxattr.S
yscalls/llistxattr.S
yscalls/lremovexattr.S
yscalls/lseek.S
yscalls/lsetxattr.S
yscalls/madvise.S
yscalls/mincore.S
yscalls/mkdirat.S
yscalls/mknodat.S
yscalls/mlock.S
yscalls/mlockall.S
yscalls/mount.S
yscalls/mprotect.S
yscalls/mremap.S
yscalls/msync.S
yscalls/munlock.S
yscalls/munlockall.S
yscalls/munmap.S
yscalls/nanosleep.S
yscalls/perf_event_open.S
yscalls/personality.S
yscalls/pipe2.S
yscalls/prctl.S
yscalls/pread64.S
yscalls/prlimit64.S
yscalls/pwrite64.S
yscalls/read.S
yscalls/readahead.S
yscalls/readlinkat.S
yscalls/readv.S
yscalls/recvfrom.S
yscalls/recvmsg.S
yscalls/removexattr.S
yscalls/renameat.S
yscalls/sched_get_priority_max.S
yscalls/sched_get_priority_min.S
yscalls/sched_getparam.S
yscalls/sched_getscheduler.S
yscalls/sched_rr_get_interval.S
yscalls/sched_setaffinity.S
yscalls/sched_setparam.S
yscalls/sched_setscheduler.S
yscalls/sched_yield.S
yscalls/sendfile.S
yscalls/sendfile64.S
yscalls/sendmsg.S
yscalls/sendto.S
yscalls/setgid.S
yscalls/setgroups.S
yscalls/setitimer.S
yscalls/setns.S
yscalls/setpgid.S
yscalls/setpriority.S
yscalls/setregid.S
yscalls/setresgid.S
yscalls/setresuid.S
yscalls/setreuid.S
yscalls/setrlimit.S
yscalls/setsid.S
yscalls/setsockopt.S
yscalls/settimeofday.S
yscalls/setuid.S
yscalls/setxattr.S
yscalls/shutdown.S
yscalls/sigaltstack.S
yscalls/signalfd4.S
yscalls/socket.S
yscalls/socketpair.S
yscalls/swapoff.S
yscalls/swapon.S
yscalls/symlinkat.S
yscalls/sync.S
yscalls/sysinfo.S
yscalls/tgkill.S
yscalls/timerfd_create.S
yscalls/timerfd_gettime.S
yscalls/timerfd_settime.S
yscalls/times.S
yscalls/tkill.S
yscalls/truncate.S
yscalls/truncate64.S
yscalls/umask.S
yscalls/umount2.S
yscalls/uname.S
yscalls/unlinkat.S
yscalls/unshare.S
yscalls/utimensat.S
yscalls/wait4.S
yscalls/write.S
yscalls/writev.S
eae27dc55adca75c2332e4b767ec667acfbbbcb3 19-Feb-2014 Elliott Hughes <enh@google.com> Make mips generated assembler more like the mips64 stuff.

I broke the mips build yesterday because it doesn't use
<private/bionic_asm.h> like the other architectures, including mips64.
I want to move mips closer to mips64 to try to avoid this kind of thing
in future.

Change-Id: Idb985587ff355b9e5e765c1f5671dc0144cd2488
yscalls/__brk.S
yscalls/__epoll_pwait.S
yscalls/__exit.S
yscalls/__fcntl64.S
yscalls/__fstatfs64.S
yscalls/__getcpu.S
yscalls/__getcwd.S
yscalls/__getpriority.S
yscalls/__ioctl.S
yscalls/__llseek.S
yscalls/__mmap2.S
yscalls/__openat.S
yscalls/__ppoll.S
yscalls/__pselect6.S
yscalls/__ptrace.S
yscalls/__reboot.S
yscalls/__rt_sigaction.S
yscalls/__rt_sigpending.S
yscalls/__rt_sigprocmask.S
yscalls/__rt_sigsuspend.S
yscalls/__rt_sigtimedwait.S
yscalls/__sched_getaffinity.S
yscalls/__set_thread_area.S
yscalls/__set_tid_address.S
yscalls/__sigaction.S
yscalls/__statfs64.S
yscalls/__syslog.S
yscalls/__timer_create.S
yscalls/__timer_delete.S
yscalls/__timer_getoverrun.S
yscalls/__timer_gettime.S
yscalls/__timer_settime.S
yscalls/__waitid.S
yscalls/_exit.S
yscalls/_flush_cache.S
yscalls/accept.S
yscalls/acct.S
yscalls/bind.S
yscalls/capget.S
yscalls/capset.S
yscalls/chdir.S
yscalls/chroot.S
yscalls/clock_getres.S
yscalls/clock_gettime.S
yscalls/clock_nanosleep.S
yscalls/clock_settime.S
yscalls/close.S
yscalls/connect.S
yscalls/delete_module.S
yscalls/dup.S
yscalls/dup3.S
yscalls/epoll_create1.S
yscalls/epoll_ctl.S
yscalls/eventfd.S
yscalls/execve.S
yscalls/faccessat.S
yscalls/fallocate64.S
yscalls/fchdir.S
yscalls/fchmod.S
yscalls/fchmodat.S
yscalls/fchown.S
yscalls/fchownat.S
yscalls/fdatasync.S
yscalls/fgetxattr.S
yscalls/flistxattr.S
yscalls/flock.S
yscalls/fremovexattr.S
yscalls/fsetxattr.S
yscalls/fstat64.S
yscalls/fstatat64.S
yscalls/fsync.S
yscalls/ftruncate.S
yscalls/ftruncate64.S
yscalls/futex.S
yscalls/getdents.S
yscalls/getegid.S
yscalls/geteuid.S
yscalls/getgid.S
yscalls/getgroups.S
yscalls/getitimer.S
yscalls/getpeername.S
yscalls/getpgid.S
yscalls/getpid.S
yscalls/getppid.S
yscalls/getresgid.S
yscalls/getresuid.S
yscalls/getrlimit.S
yscalls/getrusage.S
yscalls/getsid.S
yscalls/getsockname.S
yscalls/getsockopt.S
yscalls/gettid.S
yscalls/gettimeofday.S
yscalls/getuid.S
yscalls/getxattr.S
yscalls/init_module.S
yscalls/inotify_add_watch.S
yscalls/inotify_init1.S
yscalls/inotify_rm_watch.S
yscalls/ioprio_get.S
yscalls/ioprio_set.S
yscalls/kill.S
yscalls/klogctl.S
yscalls/lgetxattr.S
yscalls/linkat.S
yscalls/listen.S
yscalls/listxattr.S
yscalls/llistxattr.S
yscalls/lremovexattr.S
yscalls/lseek.S
yscalls/lsetxattr.S
yscalls/madvise.S
yscalls/mincore.S
yscalls/mkdirat.S
yscalls/mknodat.S
yscalls/mlock.S
yscalls/mlockall.S
yscalls/mount.S
yscalls/mprotect.S
yscalls/mremap.S
yscalls/msync.S
yscalls/munlock.S
yscalls/munlockall.S
yscalls/munmap.S
yscalls/nanosleep.S
yscalls/perf_event_open.S
yscalls/personality.S
yscalls/pipe2.S
yscalls/prctl.S
yscalls/pread64.S
yscalls/prlimit64.S
yscalls/pwrite64.S
yscalls/read.S
yscalls/readahead.S
yscalls/readlinkat.S
yscalls/readv.S
yscalls/recvfrom.S
yscalls/recvmsg.S
yscalls/removexattr.S
yscalls/renameat.S
yscalls/sched_get_priority_max.S
yscalls/sched_get_priority_min.S
yscalls/sched_getparam.S
yscalls/sched_getscheduler.S
yscalls/sched_rr_get_interval.S
yscalls/sched_setaffinity.S
yscalls/sched_setparam.S
yscalls/sched_setscheduler.S
yscalls/sched_yield.S
yscalls/sendfile.S
yscalls/sendfile64.S
yscalls/sendmsg.S
yscalls/sendto.S
yscalls/setgid.S
yscalls/setgroups.S
yscalls/setitimer.S
yscalls/setns.S
yscalls/setpgid.S
yscalls/setpriority.S
yscalls/setregid.S
yscalls/setresgid.S
yscalls/setresuid.S
yscalls/setreuid.S
yscalls/setrlimit.S
yscalls/setsid.S
yscalls/setsockopt.S
yscalls/settimeofday.S
yscalls/setuid.S
yscalls/setxattr.S
yscalls/shutdown.S
yscalls/sigaltstack.S
yscalls/signalfd4.S
yscalls/socket.S
yscalls/socketpair.S
yscalls/swapoff.S
yscalls/swapon.S
yscalls/symlinkat.S
yscalls/sync.S
yscalls/sysinfo.S
yscalls/tgkill.S
yscalls/timerfd_create.S
yscalls/timerfd_gettime.S
yscalls/timerfd_settime.S
yscalls/times.S
yscalls/tkill.S
yscalls/truncate.S
yscalls/truncate64.S
yscalls/umask.S
yscalls/umount2.S
yscalls/uname.S
yscalls/unlinkat.S
yscalls/unshare.S
yscalls/utimensat.S
yscalls/wait4.S
yscalls/write.S
yscalls/writev.S
986f9067103e41296898a7c0e89f5ed84420fb5b 19-Feb-2014 Elliott Hughes <enh@google.com> Fix build by avoiding the _C_LABEL macro.

Change-Id: Ide367c2b65071388bd95fbc81a4ed6ae94aec4e4
yscalls/fstat64.S
yscalls/fstatat64.S
db1ea3474899ebbd783aba872d3005f95a816d0f 18-Jan-2014 Elliott Hughes <enh@google.com> Implement some of the missing LFS64 support.

This gives us:

* <dirent.h>
struct dirent64
readdir64, readdir64_r, alphasort64, scandir64

* <fcntl.h>
creat64, openat64, open64.

* <sys/stat.h>
struct stat64
fstat64, fstatat64, lstat64, stat64.

* <sys/statvfs.h>
struct statvfs64
statvfs64, fstatvfs64.

* <sys/vfs.h>
struct statfs64
statfs64, fstatfs64.

This also removes some of the incorrect #define hacks we've had in the
past (for stat64, for example, which we promised to clean up way back
in bug 8472078).

Bug: 11865851
Bug: 8472078
Change-Id: Ia46443521918519f2dfa64d4621027dfd13ac566
yscalls/fstat.S
yscalls/fstat64.S
yscalls/fstatat.S
yscalls/fstatat64.S
f25d677147ae55a1f3b6ef7fa3ee27921792813f 24-Jan-2014 Ying Wang <wangying@google.com> Reconfig libc's Android.mk to build for multilib

1. Moved arch-specific setup to their own files:
- <arch>/<arch>.mk, arch-specific configs. Variables in those config
end with the arch name.
- removed the extra complexity introduced by function libc-add-cpu-variant-src,
which seems to be not very useful these days.
2. Separated out the crt object files generation rules and set up the
rules for both TARGET_ARCH and TARGET_2ND_ARCH.
3. Build all the libraries for both TARGET_ARCH and TARGET_2ND_ARCH,
with the arch-specific LOCAL_ variables.

Bug: 11654773
Change-Id: I9c2d85db0affa49199d182236d2210060a321421
ips.mk
b3a23bd0178c8edbb34e310be08e6fb73ac6ba09 11-Feb-2014 Elliott Hughes <enh@google.com> Build syscall stubs in their own library.

This lets us lose the auto-generated makefiles.

Change-Id: I2de0c71b3b9c08f9cce8f4ff7fd7254dda008c86
yscalls.mk
a6ecba4d233d7b769a05ee81ae908c9105352624 11-Feb-2014 Elliott Hughes <enh@google.com> Clean up cacheflush.

No cacheflush for LP64; use the GCC builtin instead. Clean up the
32-bit MIPS implementation now we no longer need to worry about
old versions of GCC.

Bug: 12924756
Change-Id: Ie23955b3ec194e226c4b2bce35b11d5e061f4753
ionic/cacheflush.cpp
0266ae5f884d72da58f33a072e865ba131234a5e 11-Feb-2014 Elliott Hughes <enh@google.com> Switch <elf.h> over to linux uapi under the covers.

Remove the linker's reliance on BSD cruft and use the glibc-style
ElfW macro. (Other code too, but the linker contains the majority
of the code that needs to work for Elf32 and Elf64.)

All platforms need dl_iterate_phdr_static, so it doesn't make sense
to have that part of the per-architecture configuration.

Bug: 12476126
Change-Id: I1d7f918f1303a392794a6cd8b3512ff56bd6e487
ips.mk
645d0312c2d6b6492cc4b3891bc1a91908dc24b7 06-Feb-2014 Chris Dearman <chris.dearman@imgtec.com> [MIPS64] libc/libm support

libc/libm support for MIPS64 targets

Change-Id: I8271941d418612a286be55495f0e95822f90004f
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Signed-off-by: Raghu Gandham <raghu.gandham@imgtec.com>
ionic/memmove.c
ips.mk
ea0fab18ba73d697b2da9f9ac6a23c016b280e76 05-Feb-2014 Elliott Hughes <enh@google.com> Remove unused cruft from MIPS <machine/signal.h>.

An extra (unused) struct sigcontext doesn't help anybody.

Change-Id: I73899fe7e1ccccf50a507c737945cf014d430396
nclude/machine/signal.h
9afe2884c7fe11f862982fd550a2ead688f2044d 05-Feb-2014 Elliott Hughes <enh@google.com> Kill <machine/_types.h>.

Most of <machine/_types.h> was either unused, wrong, or identical across
all 32-/64-bit architectures.

I'm not a huge fan of <sys/_types.h> either, but moving the bits we need
up into there is a step forward.

Bug: 12213562
Change-Id: Id13551c78966e324beee2dd90c5575e37d2a71e6
nclude/machine/_types.h
nclude/machine/signal.h
f64b8ea09db3bdd84eed59f7721301743332b3fe 04-Feb-2014 Elliott Hughes <enh@google.com> Add fallocate/fallocate64/posix_fallocate/posix_fallocate64.

Bug: 5287571
Bug: 12612860
Change-Id: I4501b9c6cdf9a830336ce0b3afc4ea716b6a0f6f
yscalls.mk
yscalls/fallocate64.S
0f461e35f63200641fc53bba222845a84589c024 09-Jan-2014 Elliott Hughes <enh@google.com> Fix <sys/resource.h>.

The situation here is a bit confusing. On 64-bit, rlimit and rlimit64 are
the same, and so getrlimit/getrlimit64, setrlimit/setrlimit64,
and prlimit/prlimit64 are all the same. On 32-bit, rlimit and rlimit64 are
different. 32-bit architectures other than MIPS go one step further by having
an even more limited getrlimit system call, so arm and x86 need to use
ugetrlimit instead of getrlimit. Worse, the 32-bit architectures don't have
64-bit getrlimit- and setrlimit-equivalent system calls, and you have to use
prlimit64 instead. There's no 32-bit prlimit system call, so there's no
easy implementation of that --- what should we do if the result of prlimit64
won't fit in a struct rlimit? Since 32-bit survived without prlimit/prlimit64
for this long, I'm not going to bother implementing prlimit for 32-bit.

We need the rlimit64 functions to be able to build strace 4.8 out of the box.

Change-Id: I1903d913b23016a2fc3b9f452885ac730d71e001
yscalls.mk
yscalls/prlimit64.S
c5bf703c4cfa2ca4f35a83c9afaf4ee123cb617c 03-Jan-2014 Elliott Hughes <enh@google.com> Remove as many hard-coded constants from the MIPS vfork.S as possible.

We could do better, but not without MIPS cleaning up their kernel headers.

Change-Id: Ib4d4ce5d720ce8ca27a3f9a1ae07a9a277675af9
ionic/vfork.S
887e1140fe7596fa1239a0bc802d2cdb51c57d3c 02-Jan-2014 Elliott Hughes <enh@google.com> Clean up <sched.h>.

This patch switches to using the uapi constants. It also adds the missing
setns system call, fixes sched_getcpu's error behavior, and fixes the
gensyscalls script now ARM is uapi-only too.

Change-Id: I8e16b1693d6d32cd9b8499e46b5d8b0a50bc4f1d
yscalls.mk
yscalls/setns.S
5063791535bc7541a4b46c24c4e5c9f330e5025f 22-Dec-2013 Elliott Hughes <enh@google.com> Fix MIPS build.

Change-Id: I175f427e355fca9a5a3f4e4379d7fcd1f7f6a22d
ionic/_exit_with_stack_teardown.S
2aace21a19b6be8f6a427fc664d4175f0bf832c9 22-Dec-2013 Elliott Hughes <enh@google.com> Remove the bogus exit status from _exit_with_stack_teardown.

It should always be 0, and there's no reason to pass a constant in as
an argument.

Change-Id: I92ac59b718a18e298bd7c52821af447f9181ca2a
ionic/_exit_with_stack_teardown.S
5eccb9646dd94438911706d3ebf52775caa7f41e 21-Dec-2013 Elliott Hughes <enh@google.com> Fix aarch64 futex assembly routines.

Also make the other architectures more similar to one another,
use NULL instead of 0 in calling code, and remove an unused #define.

Change-Id: I52b874afb6a351c802f201a0625e484df6d093bb
ionic/futex_mips.S
766c7efe28fb066252eeb9b8e47e22970307c09e 16-Dec-2013 Chris Dearman <chris.dearman@imgtec.com> Allocate additional space on stack for indirect syscall

The caller is only required to allocate 16 bytes on the
stack for a0-a3. syscall is handling up to 6 arguments so
additional space is needed on the stack to avoid corrupting the
callers frame.

Change-Id: I054b31696decc3e17d9c70af18cd278b852235d1
ionic/syscall.S
2b333ea31ec5b5b4627f14b22253b017b346638a 18-Dec-2013 Elliott Hughes <enh@google.com> Remove <machine/kernel.h>.

Bug: 12175484
Change-Id: I127f7f91f36bd879109d653e0c56ec56e2529d4d
nclude/machine/kernel.h
c13fb75ceabb47f8292be206db80b93889fccf66 18-Dec-2013 Elliott Hughes <enh@google.com> Move bionic over to GCC's 'warning' attribute.

This is a better solution than the old __warn_references because it's
a compile-time rather than link-time warning, it doesn't rely on something
that doesn't appear to be supported by gold (which is why you only used
to see these warnings on mips builds), and the errors refer to the exact
call site(s) rather than just telling you which object file contains a
reference to the bad function.

This is primarily so we can build bionic for aarch64; building libc.so
caused these warnings to fire (because link time is the wrong time) and
warnings are errors.

Change-Id: I5df9281b2a9d98b164a9b11807ea9472c6faa9e3
nclude/machine/cdefs.h
36d6188f8cd8b948fb797f11d9620d63d0c2215a 19-Nov-2013 Elliott Hughes <enh@google.com> Clean up forking and cloning.

The kernel now maintains the pthread_internal_t::tid field for us,
and __clone was only used in one place so let's inline it so we don't
have to leave such a dangerous function lying around. Also rename
files to match their content and remove some useless #includes.

Change-Id: I24299fb4a940e394de75f864ee36fdabbd9438f9
ionic/__bionic_clone.S
ionic/clone.S
ips.mk
yscalls.mk
yscalls/__clone.S
877ec6d90418ff1d6597147d355a2229fdffae7e 16-Nov-2013 Elliott Hughes <enh@google.com> Fix pthread_join.

Let the kernel keep pthread_internal_t::tid updated, including
across forks and for the main thread. This then lets us fix
pthread_join to only return after the thread has really exited.

Also fix the thread attributes of the main thread so we don't
unmap the main thread's stack (which is really owned by the
dynamic linker and contains things like environment variables),
which fixes crashes when joining with an exited main thread
and also fixes problems reported publicly with accessing environment
variables after the main thread exits (for which I've added a new
unit test).

In passing I also fixed a bug where if the clone(2) inside
pthread_create(3) fails, we'd unmap the child's stack and TLS (which
contains the mutex) and then try to unlock the mutex. Boom! It wasn't
until after I'd uploaded the fix for this that I came across a new
public bug reporting this exact failure.

Bug: 8206355
Bug: 11693195
Bug: https://code.google.com/p/android/issues/detail?id=57421
Bug: https://code.google.com/p/android/issues/detail?id=62392
Change-Id: I2af9cf6e8ae510a67256ad93cad891794ed0580b
yscalls.mk
yscalls/__set_tid_address.S
70b24b1cc2a1a4436b1fea3f8b76616fdcb27224 15-Nov-2013 Elliott Hughes <enh@google.com> Switch pthread_create over to __bionic_clone.

Bug: 8206355
Bug: 11693195
Change-Id: I04aadbc36c87e1b7e33324b9a930a1e441fbfed6
ionic/_exit_with_stack_teardown.S
ionic/clone.S
effaa7824da1af4db5cef50c78079d4c4e1717a7 13-Nov-2013 Chris Dearman <chris.dearman@imgtec.com> [MIPS] Reimplement syscall to invoke the system call directly

Some MIPS kernels do not correctly restart interrupted system calls that
have been invoked using the indirect syscall (NR_syscall).

The simplest workaround is to handle the indirection in userland and then
call the required system call directly.

Change-Id: I8385399621529db9a52b463c96925f6decaaca30
ionic/syscall.S
ips.mk
yscalls.mk
yscalls/syscall.S
062092543fdbd6fa2676e4f5b37a15f7bba94332 07-Nov-2013 Elliott Hughes <enh@google.com> Clean up the 32-bit kernel support, fix LP64 fcntl declaration.

In practice, thanks to all the registers the stubs don't actually change,
but it's confusing to have an incorrect declaration.

I suspect that fcntl remains broken for aarch64; it happens to work for
x86_64 because the first vararg argument gets placed in the right register
anyway, but I have no reason to believe that's true for aarch64.

This patch adds a unit test, though, so we'll be able to tell when we get
as far as running the unit tests.

Change-Id: I58dd0054fe99d7d51d04c22781d8965dff1afbf3
yscalls.mk
yscalls/__fcntl.S
6b53c2349a5a3fc70a475de6a66131b615e88e48 25-Oct-2013 Elliott Hughes <enh@google.com> Fix the exit syscall stub's name.

I've left the exit_group syscall as _exit because otherwise we'd have to
convince the compiler that our _exit (which just calls __exit_group) is
actually "noreturn", and it seems like that would be less clean than just
cutting out the middleman.

We'll just have to trust ourselves not to add anything to SYSCALLS.TXT
that ought to be private but that only has a single leading underscore.
Hopefully we can manage that.

Change-Id: Iac47faea9f516186e1774381846c54cafabc4354
yscalls.mk
yscalls/__exit.S
yscalls/_exit_thread.S
bf425680e484486803bf21e4c4cd1e3f36614a3c 25-Oct-2013 Elliott Hughes <enh@google.com> Let the compiler worry about implementing ffs(3).

It does at least as good a job as our old hand-written assembly anyway.

Change-Id: If7c4a1ac508bace0b71ee7b67808caa6eabf11d2
ionic/ffs.S
ips.mk
11952073af22568bba0b661f7a9d4402c443a888 25-Oct-2013 Elliott Hughes <enh@google.com> Remove dependencies on obsolete __ARCH_WANT_SYSCALL_DEPRECATED system calls.

(aarch64 kernels don't have these system calls.)

Change-Id: I6f64075aa412f71520f2df71c3d69b647f91c1ca
yscalls.mk
yscalls/__clone.S
yscalls/__epoll_pwait.S
yscalls/__fork.S
yscalls/__open.S
yscalls/__ppoll.S
yscalls/__pselect6.S
yscalls/__sys_clone.S
yscalls/_waitpid.S
yscalls/epoll_wait.S
yscalls/pause.S
yscalls/poll.S
yscalls/select.S
b8cf18b4dd3a46f004ac255257e7a87b6e6d8457 23-Oct-2013 Elliott Hughes <enh@google.com> MIPS' pipe(2) is weird, but MIPS' pipe2(2) is the same as everyone else's.

arch/mips/kernel/syscall.c has a special sysm_pipe wrapper, but there's
no special treatment of pipe2 because it carries no historical baggage.

Change-Id: I892c0f690b21992c8a48276a9b732126f18fc0ee
ionic/pipe.S
ips.mk
cac7b9d6ec1a09814bc028e2f768db732f018891 23-Oct-2013 Elliott Hughes <enh@google.com> Remove dependencies on obsolete __ARCH_WANT_SYSCALL_NO_FLAGS syscalls.

(aarch64 kernels only have the newer system calls.)

Also expose the new functionality that's exposed by glibc in our header files.

Change-Id: I45d2d168a03f88723d1f7fbf634701006a4843c5
yscalls.mk
yscalls/dup2.S
yscalls/dup3.S
yscalls/epoll_create.S
yscalls/epoll_create1.S
yscalls/inotify_init.S
yscalls/inotify_init1.S
f8fcfbc85a3ce3e195626b90736d3a484331494b 22-Oct-2013 Elliott Hughes <enh@google.com> Move away from the __ARCH_WANT_SYSCALL_NO_AT system calls.

Modern architectures only get the *at(2) system calls. For example,
aarch64 doesn't have open(2), and expects userspace to use openat(2)
instead.

Change-Id: I87b4ed79790cb8a80844f5544ac1a13fda26c7b5
yscalls.mk
yscalls/access.S
yscalls/chmod.S
yscalls/chown.S
yscalls/lchown.S
yscalls/link.S
yscalls/linkat.S
yscalls/lstat.S
yscalls/mkdir.S
yscalls/mknod.S
yscalls/mknodat.S
yscalls/readlink.S
yscalls/readlinkat.S
yscalls/rename.S
yscalls/rmdir.S
yscalls/stat.S
yscalls/symlink.S
yscalls/symlinkat.S
yscalls/unlink.S
yscalls/utimes.S
7f70c9b64eec4a4a86a3948966187ff8ee9fa720 13-Oct-2013 Serban Constantinescu <serban.constantinescu@arm.com> AArch64: Fix uses of stack size for 32/64bit libc builds

This patch fixes stack size uses to size_t.

Change-Id: I0671c85ddb1c1aceaf9440a7c73c21fe528653fa
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ionic/_exit_with_stack_teardown.S
c7e9b2331771e5e87c34a8ee3dc6cc41d35b02fe 17-Oct-2013 Elliott Hughes <enh@google.com> Fix sigaction(3) for 64-bit.

Also clean up <signal.h> and revert the hacks that were necessary
for 64-bit in linker/debugger.cpp until now.

Change-Id: I3b0554ca8a49ee1c97cda086ce2c1954ebc11892
yscalls.mk
yscalls/__sigaction.S
yscalls/sigaction.S
103ccde8fe2f2c8abde914a8ba736b2e9cb8d20b 16-Oct-2013 Elliott Hughes <enh@google.com> Sort the syscalls.mk files, give all generated files the same header.

No non-comment changes to the .S files.

Change-Id: Iafcfd004c3ea92b64268f80ab16df615b97cefac
yscalls.mk
yscalls/__brk.S
yscalls/__fcntl.S
yscalls/__fcntl64.S
yscalls/__fork.S
yscalls/__fstatfs64.S
yscalls/__getcpu.S
yscalls/__getcwd.S
yscalls/__getpriority.S
yscalls/__ioctl.S
yscalls/__llseek.S
yscalls/__mmap2.S
yscalls/__open.S
yscalls/__openat.S
yscalls/__ptrace.S
yscalls/__reboot.S
yscalls/__rt_sigaction.S
yscalls/__rt_sigpending.S
yscalls/__rt_sigprocmask.S
yscalls/__rt_sigsuspend.S
yscalls/__rt_sigtimedwait.S
yscalls/__sched_getaffinity.S
yscalls/__set_thread_area.S
yscalls/__statfs64.S
yscalls/__sys_clone.S
yscalls/__syslog.S
yscalls/__timer_create.S
yscalls/__timer_delete.S
yscalls/__timer_getoverrun.S
yscalls/__timer_gettime.S
yscalls/__timer_settime.S
yscalls/__waitid.S
yscalls/_exit.S
yscalls/_exit_thread.S
yscalls/_flush_cache.S
yscalls/_waitpid.S
yscalls/accept.S
yscalls/access.S
yscalls/acct.S
yscalls/bind.S
yscalls/capget.S
yscalls/capset.S
yscalls/chdir.S
yscalls/chmod.S
yscalls/chown.S
yscalls/chroot.S
yscalls/clock_getres.S
yscalls/clock_gettime.S
yscalls/clock_nanosleep.S
yscalls/clock_settime.S
yscalls/close.S
yscalls/connect.S
yscalls/delete_module.S
yscalls/dup.S
yscalls/dup2.S
yscalls/epoll_create.S
yscalls/epoll_ctl.S
yscalls/epoll_wait.S
yscalls/eventfd.S
yscalls/execve.S
yscalls/faccessat.S
yscalls/fchdir.S
yscalls/fchmod.S
yscalls/fchmodat.S
yscalls/fchown.S
yscalls/fchownat.S
yscalls/fdatasync.S
yscalls/fgetxattr.S
yscalls/flistxattr.S
yscalls/flock.S
yscalls/fremovexattr.S
yscalls/fsetxattr.S
yscalls/fstat.S
yscalls/fstatat.S
yscalls/fsync.S
yscalls/ftruncate.S
yscalls/ftruncate64.S
yscalls/futex.S
yscalls/getdents.S
yscalls/getegid.S
yscalls/geteuid.S
yscalls/getgid.S
yscalls/getgroups.S
yscalls/getitimer.S
yscalls/getpeername.S
yscalls/getpgid.S
yscalls/getpid.S
yscalls/getppid.S
yscalls/getresgid.S
yscalls/getresuid.S
yscalls/getrlimit.S
yscalls/getrusage.S
yscalls/getsid.S
yscalls/getsockname.S
yscalls/getsockopt.S
yscalls/gettid.S
yscalls/gettimeofday.S
yscalls/getuid.S
yscalls/getxattr.S
yscalls/init_module.S
yscalls/inotify_add_watch.S
yscalls/inotify_init.S
yscalls/inotify_rm_watch.S
yscalls/ioprio_get.S
yscalls/ioprio_set.S
yscalls/kill.S
yscalls/klogctl.S
yscalls/lchown.S
yscalls/lgetxattr.S
yscalls/link.S
yscalls/listen.S
yscalls/listxattr.S
yscalls/llistxattr.S
yscalls/lremovexattr.S
yscalls/lseek.S
yscalls/lsetxattr.S
yscalls/lstat.S
yscalls/madvise.S
yscalls/mincore.S
yscalls/mkdir.S
yscalls/mkdirat.S
yscalls/mknod.S
yscalls/mlock.S
yscalls/mlockall.S
yscalls/mount.S
yscalls/mprotect.S
yscalls/mremap.S
yscalls/msync.S
yscalls/munlock.S
yscalls/munlockall.S
yscalls/munmap.S
yscalls/nanosleep.S
yscalls/pause.S
yscalls/perf_event_open.S
yscalls/personality.S
yscalls/pipe2.S
yscalls/poll.S
yscalls/prctl.S
yscalls/pread64.S
yscalls/pwrite64.S
yscalls/read.S
yscalls/readahead.S
yscalls/readlink.S
yscalls/readv.S
yscalls/recvfrom.S
yscalls/recvmsg.S
yscalls/removexattr.S
yscalls/rename.S
yscalls/renameat.S
yscalls/rmdir.S
yscalls/sched_get_priority_max.S
yscalls/sched_get_priority_min.S
yscalls/sched_getparam.S
yscalls/sched_getscheduler.S
yscalls/sched_rr_get_interval.S
yscalls/sched_setaffinity.S
yscalls/sched_setparam.S
yscalls/sched_setscheduler.S
yscalls/sched_yield.S
yscalls/select.S
yscalls/sendfile.S
yscalls/sendfile64.S
yscalls/sendmsg.S
yscalls/sendto.S
yscalls/setgid.S
yscalls/setgroups.S
yscalls/setitimer.S
yscalls/setpgid.S
yscalls/setpriority.S
yscalls/setregid.S
yscalls/setresgid.S
yscalls/setresuid.S
yscalls/setreuid.S
yscalls/setrlimit.S
yscalls/setsid.S
yscalls/setsockopt.S
yscalls/settimeofday.S
yscalls/setuid.S
yscalls/setxattr.S
yscalls/shutdown.S
yscalls/sigaction.S
yscalls/sigaltstack.S
yscalls/signalfd4.S
yscalls/socket.S
yscalls/socketpair.S
yscalls/stat.S
yscalls/swapoff.S
yscalls/swapon.S
yscalls/symlink.S
yscalls/sync.S
yscalls/syscall.S
yscalls/sysinfo.S
yscalls/tgkill.S
yscalls/timerfd_create.S
yscalls/timerfd_gettime.S
yscalls/timerfd_settime.S
yscalls/times.S
yscalls/tkill.S
yscalls/truncate.S
yscalls/truncate64.S
yscalls/umask.S
yscalls/umount2.S
yscalls/uname.S
yscalls/unlink.S
yscalls/unlinkat.S
yscalls/unshare.S
yscalls/utimensat.S
yscalls/utimes.S
yscalls/wait4.S
yscalls/write.S
yscalls/writev.S
40d105ccb3e6283566ce54b693b3088f31aa4f26 16-Oct-2013 Elliott Hughes <enh@google.com> Switch sigpending over to rt_sigpending.

Change-Id: I7b28984796b5fb343cfbcc47e0afc3a84293d417
yscalls.mk
yscalls/__rt_sigpending.S
yscalls/sigpending.S
1f5af926fa626734981d6b4dcc0ab54e520032a9 16-Oct-2013 Elliott Hughes <enh@google.com> Fix sigsuspend to use rt_sigsuspend on all platforms.

Change-Id: I981c1a66d35480d4457a0a08a1b042dac94daa5b
yscalls.mk
yscalls/__rt_sigsuspend.S
yscalls/__sigsuspend.S
19e62325c268a668692e2b65fde2284079f369aa 15-Oct-2013 Elliott Hughes <enh@google.com> Clean up the sigprocmask/pthread_sigmask implementation.

Let's have both use rt_sigprocmask, like in glibc. The 64-bit ABIs
can share the same code as the 32-bit ABIs.

Also, let's test the return side of these calls, not just the
setting.

Bug: 11069919
Change-Id: I11da99f85b5b481870943c520d05ec929b15eddb
yscalls.mk
yscalls/sigprocmask.S
232163cf70712fe00436b70dd495f4cf405e9eab 10-Oct-2013 Elliott Hughes <enh@google.com> Clean up the cpuacct cruft.

Change-Id: I6ed63af8dfc2368e211420389fa8af4d5dc0908f
yscalls.mk
yscalls/__setresuid.S
yscalls/__setreuid.S
yscalls/__setuid.S
yscalls/setresuid.S
yscalls/setreuid.S
yscalls/setuid.S
14b467e840f8735e050b1844731c7747a7130525 10-Oct-2013 Elliott Hughes <enh@google.com> Fix MIPS build.

Warnings are errors for all home-grown bionic code, and the arch-specific
code now counts as home-grown bionic code (it was mistakenly counted as
"not ours" before).

Change-Id: I9c6a881b0dc596bae7dfe112c5c189e073800a3a
ionic/cacheflush.c
ionic/cacheflush.cpp
ips.mk
eb847bc8666842a3cfc9c06e8458ad1abebebaf0 10-Oct-2013 Elliott Hughes <enh@google.com> Fix x86_64 build, clean up intermediate libraries.

The x86_64 build was failing because clone.S had a call to __thread_entry which
was being added to a different intermediate .a on the way to making libc.so,
and the linker couldn't guarantee statically that such a relocation would be
possible.

ld: error: out/target/product/generic_x86_64/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(clone.o): requires dynamic R_X86_64_PC32 reloc against '__thread_entry' which may overflow at runtime; recompile with -fPIC

This patch addresses that by ensuring that the caller and callee end up in the
same intermediate .a. While I'm here, I've tried to clean up some of the mess
that led to this situation too. In particular, this removes libc/private/ from
the default include path (except for the DNS code), and splits out the DNS
code into its own library (since it's a weird special case of upstream NetBSD
code that's diverged so heavily it's unlikely ever to get back in sync).

There's more cleanup of the DNS situation possible, but this is definitely a
step in the right direction, and it's more than enough to get x86_64 building
cleanly.

Change-Id: I00425a7245b7a2573df16cc38798187d0729e7c4
ionic/cacheflush.c
ionic/crtbegin.c
ionic/crtbegin_so.c
2a0b873065edb304fa2d1c54f8de663ea638b8ab 09-Oct-2013 Elliott Hughes <enh@google.com> Fix __errno for LP64 and clean up __get_tls.

If __get_tls has the right type, a lot of confusing casting can disappear.

It was probably a mistake that __get_tls was exposed as a function for mips
and x86 (but not arm), so let's (a) ensure that the __get_tls function
always matches the macro, (b) that we have the function for arm too, and
(c) that we don't have the function for any 64-bit architecture.

Change-Id: Ie9cb989b66e2006524ad7733eb6e1a65055463be
ionic/__get_tls.c
ips.mk
c4c6e192ac045c06f4aad3afc8e437baf67227b7 08-Oct-2013 Elliott Hughes <enh@google.com> pthread_exit should call __NR_exit with status 0.

We shouldn't have been passing the bottom 32 bits of the address used
for pthread_join to the kernel.

Change-Id: I487e5002d60c27adba51173719213abbee0f183f
ionic/_exit_with_stack_teardown.S
72645164b6840806d1681f48565bb3b54efc4628 05-Oct-2013 Elliott Hughes <enh@google.com> Add arch-x86_64/include/machine.

This is basically the other half of I5de76f6c46ac87779f207d568a86bb453e2414de
from Pavel Chupin <pavel.v.chupin@intel.com>, but taking the exact upstream
_types.h instead of the modified version. (I was confused when I suggested
otherwise.)

I've also cleaned up the internal_types.h situation; we weren't gaining
anything from these empty files, and there is no upstream internal_types.h
for x86_64.

Change-Id: I802a9a6a8df1c979e820659212c75a47c2ef392e
nclude/machine/internal_types.h
b49c17c2bf1232e29bc390e58d6fa43688929aa5 02-Oct-2013 Pavel Chupin <pavel.v.chupin@intel.com> Move common arch-* code to arch-common directory

Will be helpful on adding x86_64

Change-Id: I96cf6fc7912c02f289c75f07ae0079c32d69173f
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
ionic/crtend.S
ionic/crtend_so.S
d612165c6705379aa50144afc35aa40c16793728 26-Sep-2013 Elliott Hughes <enh@google.com> Make it easier to add syscalls for another architecture.

Much of the per-architecture duplication can be removed, so let's do so
before we add the 64-bit architectures.

Change-Id: Ieb796503c8e5353ea38c3bab768bb9a690c9a767
yscalls.mk
b4f7616fd618875768b8fffc122b58bdb84a9969 20-Sep-2013 Elliott Hughes <enh@google.com> Ensure we have the off64_t variant of every function that takes an off_t.

Change-Id: Ib2eee0cf13162be3b62559b84e90c6dcf5aab1c3
yscalls.mk
yscalls/sendfile64.S
yscalls/truncate64.S
0995a7b32255addd36cd03f39e8422b7bffc32ef 23-Jul-2013 Pete Delaney <piet.delaney@imgtec.com> [MIPS] __dso_handle.S and __dso_handle_so.S not needed.

Global hidden variable __dso_handle is now declared in:
bionic/libc/private/__dso_handle.h

Change-Id: I8e951a8d7c65877bafc1be23a7fff6d44d3a2846
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Chao-Ying Fu <chao-ying.fu@imgtec.com>
ionic/__dso_handle.S
ionic/__dso_handle_so.S
368860124c34e101f2e9fda71870b5562108357a 17-Jul-2013 Pete Delaney <piet.delaney@imgtec.com> [MIPS] Rewrite MIPS crtbegin* as C files.

This updates the MIPS arch to be much more in
sync with the commit Nick Kralevich made last
June; see 9d40326830c2bd407427889c554adeb915ee6b4a.

Rewrite
crtbegin.S -> crtbegin.c
crtbegin_so.S -> crtbegin_so.c
__dso_handle.S -> __dso_handle.c
__dso_handle_so.S -> __dso_handle_so.c
atexit.S -> atexit.c

Previously __do_global_dtors_aux was in the tasks
__FINI_ARRAY__ linked with crtbegin.S and it now being
removed as there is no need to call a destructor just
before terminating a process.

Shared libraries, on the other hand, are linked with
crtbegin_so.c and have a hidden destructor declared
to allow the bionic linker to call __on_dlclose().

Change-Id: Ieb4da5199b54573de05743990e309db381a11cb8
Signed-off-by: Pete Delaney <piet.delaney@imgtec.com>
Signed-off-by: Chao-Ying Fu <chao-ying.fu@imgtec.com>
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
ionic/__dso_handle.S
ionic/atexit.S
ionic/atexit.h
ionic/crtbegin.S
ionic/crtbegin.c
ionic/crtbegin_so.S
ionic/crtbegin_so.c
d206b560e72e791b5dfeb339b5f7c18354bf95fd 06-Jun-2013 Rom Lemarchand <romlem@google.com> libc: add swapon and swapoff syscalls

Change-Id: Ie79dc8e3f2ff1cd427dd6d95e3850920c4b407b0
Signed-off-by: Rom Lemarchand <romlem@google.com>
yscalls.mk
yscalls/swapoff.S
yscalls/swapon.S
4200e6203aaa67c37874ad2b2271bff920297c7f 09-May-2013 Todd Poynor <toddpoynor@google.com> libc: add timerfd calls

(cherry-pick of 04c0ac14a49e0969333008a9522b64046d58fbdc.)

Change-Id: I06d0b6c2a8781602362b81f48faf1cca76b9ec05
yscalls.mk
yscalls/timerfd_create.S
yscalls/timerfd_gettime.S
yscalls/timerfd_settime.S
56d161bb62225cea969b49c97ae732d1845e5304 22-Mar-2013 Elliott Hughes <enh@google.com> Replace unnecessary MIPS uses of <sys/linux-syscalls.h> with <asm/unistd.h>.

Change-Id: I193a35f9790b82c83fd3b5672e24ac1b2034d0b0
ionic/clone.S
5c2772f59d3b6f564897187324d8606f54423207 22-Mar-2013 Elliott Hughes <enh@google.com> The SYS_ constants should cover all __NR_ values.

<sys/linux-syscalls.h> only contains constants for the syscalls
we're generating stubs for. We want all the syscalls available
on the architecture in question.

Keep using <sys/linux-syscalls.h> on ARM for now because the
__NR_ARM_set_tls and __NR_ARM_cacheflush values aren't in <asm/unistd.h>.

Change-Id: I66683950d87d9b18d6107d0acc0ed238a4496f44
yscalls/__brk.S
yscalls/__fcntl.S
yscalls/__fcntl64.S
yscalls/__fork.S
yscalls/__fstatfs64.S
yscalls/__getcpu.S
yscalls/__getcwd.S
yscalls/__getpriority.S
yscalls/__ioctl.S
yscalls/__llseek.S
yscalls/__mmap2.S
yscalls/__open.S
yscalls/__openat.S
yscalls/__ptrace.S
yscalls/__reboot.S
yscalls/__rt_sigaction.S
yscalls/__rt_sigprocmask.S
yscalls/__rt_sigtimedwait.S
yscalls/__sched_getaffinity.S
yscalls/__set_thread_area.S
yscalls/__setresuid.S
yscalls/__setreuid.S
yscalls/__setuid.S
yscalls/__sigsuspend.S
yscalls/__statfs64.S
yscalls/__sys_clone.S
yscalls/__syslog.S
yscalls/__timer_create.S
yscalls/__timer_delete.S
yscalls/__timer_getoverrun.S
yscalls/__timer_gettime.S
yscalls/__timer_settime.S
yscalls/__waitid.S
yscalls/_exit.S
yscalls/_exit_thread.S
yscalls/_flush_cache.S
yscalls/_waitpid.S
yscalls/accept.S
yscalls/access.S
yscalls/acct.S
yscalls/bind.S
yscalls/capget.S
yscalls/capset.S
yscalls/chdir.S
yscalls/chmod.S
yscalls/chown.S
yscalls/chroot.S
yscalls/clock_getres.S
yscalls/clock_gettime.S
yscalls/clock_nanosleep.S
yscalls/clock_settime.S
yscalls/close.S
yscalls/connect.S
yscalls/delete_module.S
yscalls/dup.S
yscalls/dup2.S
yscalls/epoll_create.S
yscalls/epoll_ctl.S
yscalls/epoll_wait.S
yscalls/eventfd.S
yscalls/execve.S
yscalls/faccessat.S
yscalls/fchdir.S
yscalls/fchmod.S
yscalls/fchmodat.S
yscalls/fchown.S
yscalls/fchownat.S
yscalls/fdatasync.S
yscalls/fgetxattr.S
yscalls/flistxattr.S
yscalls/flock.S
yscalls/fremovexattr.S
yscalls/fsetxattr.S
yscalls/fstat.S
yscalls/fstatat.S
yscalls/fsync.S
yscalls/ftruncate.S
yscalls/ftruncate64.S
yscalls/futex.S
yscalls/getdents.S
yscalls/getegid.S
yscalls/geteuid.S
yscalls/getgid.S
yscalls/getgroups.S
yscalls/getitimer.S
yscalls/getpeername.S
yscalls/getpgid.S
yscalls/getpid.S
yscalls/getppid.S
yscalls/getresgid.S
yscalls/getresuid.S
yscalls/getrlimit.S
yscalls/getrusage.S
yscalls/getsid.S
yscalls/getsockname.S
yscalls/getsockopt.S
yscalls/gettid.S
yscalls/gettimeofday.S
yscalls/getuid.S
yscalls/getxattr.S
yscalls/init_module.S
yscalls/inotify_add_watch.S
yscalls/inotify_init.S
yscalls/inotify_rm_watch.S
yscalls/ioprio_get.S
yscalls/ioprio_set.S
yscalls/kill.S
yscalls/klogctl.S
yscalls/lchown.S
yscalls/lgetxattr.S
yscalls/link.S
yscalls/listen.S
yscalls/listxattr.S
yscalls/llistxattr.S
yscalls/lremovexattr.S
yscalls/lseek.S
yscalls/lsetxattr.S
yscalls/lstat.S
yscalls/madvise.S
yscalls/mincore.S
yscalls/mkdir.S
yscalls/mkdirat.S
yscalls/mknod.S
yscalls/mlock.S
yscalls/mlockall.S
yscalls/mount.S
yscalls/mprotect.S
yscalls/mremap.S
yscalls/msync.S
yscalls/munlock.S
yscalls/munlockall.S
yscalls/munmap.S
yscalls/nanosleep.S
yscalls/pause.S
yscalls/perf_event_open.S
yscalls/personality.S
yscalls/pipe2.S
yscalls/poll.S
yscalls/prctl.S
yscalls/pread64.S
yscalls/pwrite64.S
yscalls/read.S
yscalls/readahead.S
yscalls/readlink.S
yscalls/readv.S
yscalls/recvfrom.S
yscalls/recvmsg.S
yscalls/removexattr.S
yscalls/rename.S
yscalls/renameat.S
yscalls/rmdir.S
yscalls/sched_get_priority_max.S
yscalls/sched_get_priority_min.S
yscalls/sched_getparam.S
yscalls/sched_getscheduler.S
yscalls/sched_rr_get_interval.S
yscalls/sched_setaffinity.S
yscalls/sched_setparam.S
yscalls/sched_setscheduler.S
yscalls/sched_yield.S
yscalls/select.S
yscalls/sendfile.S
yscalls/sendmsg.S
yscalls/sendto.S
yscalls/setgid.S
yscalls/setgroups.S
yscalls/setitimer.S
yscalls/setpgid.S
yscalls/setpriority.S
yscalls/setregid.S
yscalls/setresgid.S
yscalls/setrlimit.S
yscalls/setsid.S
yscalls/setsockopt.S
yscalls/settimeofday.S
yscalls/setxattr.S
yscalls/shutdown.S
yscalls/sigaction.S
yscalls/sigaltstack.S
yscalls/signalfd4.S
yscalls/sigpending.S
yscalls/sigprocmask.S
yscalls/socket.S
yscalls/socketpair.S
yscalls/stat.S
yscalls/symlink.S
yscalls/sync.S
yscalls/syscall.S
yscalls/sysinfo.S
yscalls/tgkill.S
yscalls/times.S
yscalls/tkill.S
yscalls/truncate.S
yscalls/umask.S
yscalls/umount2.S
yscalls/uname.S
yscalls/unlink.S
yscalls/unlinkat.S
yscalls/unshare.S
yscalls/utimensat.S
yscalls/utimes.S
yscalls/wait4.S
yscalls/write.S
yscalls/writev.S
17a8b0db63d54e9d79bf11112ace0c4fe9606289 21-Mar-2013 Elliott Hughes <enh@google.com> Expose wait4 as wait4 rather than __wait4.

This helps strace(1) compile with one fewer hack.

Change-Id: I5296d0cfec5546709cda990abd705ad33d7c4626
yscalls.mk
yscalls/__wait4.S
yscalls/wait4.S
8f2a5a0b40fc82126c691d5c30131d908772aab7 15-Mar-2013 Elliott Hughes <enh@google.com> Clean up internal libc logging.

We only need one logging API, and I prefer the one that does no
allocation and is thus safe to use in any context.

Also use O_CLOEXEC when opening the /dev/log files.

Move everything logging-related into one header file.

Change-Id: Ic1e3ea8e9b910dc29df351bff6c0aa4db26fbb58
ionic/cacheflush.c
04954a43b362b8c817cc5859513efad0c344f412 26-Feb-2013 Christopher Ferris <cferris@google.com> Break bionic implementations into arch versions.

Move arch specific code for arm, mips, x86 into separate
makefiles.
In addition, add different arm cpu versions of memcpy/memset.

Bug: 8005082

Merge from internal master (acdde8c1cf8e8beed98c052757d96695b820b50c).

Change-Id: I04f3d0715104fab618e1abf7cf8f7eec9bec79df
ips.mk
40eabe24e4e3ae8ebe437f1f4e43cf39cbba2e9e 15-Feb-2013 Elliott Hughes <enh@google.com> Fix the pthread_setname_np test.

Fix the pthread_setname_np test to take into account that emulator kernels are
so old that they don't support setting the name of other threads.

The CLONE_DETACHED thread is obsolete since 2.5 kernels.

Rename kernel_id to tid.

Fix the signature of __pthread_clone.

Clean up the clone and pthread_setname_np implementations slightly.

Change-Id: I16c2ff8845b67530544bbda9aa6618058603066d
ionic/clone.S
a6a3ac59243d8c95c94c3069e9332051f785c05f 30-Jan-2013 Elliott Hughes <enh@google.com> Use the NetBSD <sys/exec_elf.h>.

Replace a kernel header file dependency with files from NetBSD.
They're more complete, and ELF is ELF, whether you're on Linux or a BSD.

Bug: 7973611
Change-Id: I83ee719e7efdf432ec2ddbe8be271d05b2f558d7
nclude/machine/elf_machdep.h
1e980b6bc8315d00a07312b25486531247abd98c 18-Jan-2013 Elliott Hughes <enh@google.com> Fix the duplication in the debugging code.

We had two copies of the backtrace code, and two copies of the
libcorkscrew /proc/pid/maps code. This patch gets us down to one.

We also had hacks so we could log in the malloc debugging code.
This patch pulls the non-allocating "printf" code out of the
dynamic linker so everyone can share.

This patch also makes the leak diagnostics easier to read, and
makes it possible to paste them directly into the 'stack' tool (by
using relative PCs).

This patch also fixes the stdio standard stream leak that was
causing a leak warning every time tf_daemon ran.

Bug: 7291287
Change-Id: I66e4083ac2c5606c8d2737cb45c8ac8a32c7cfe8
ionic/cacheflush.c
a4b2dc016fa62bd172a73c3f8971c805700ffb0f 10-Jan-2013 Rom Lemarchand <romlem@google.com> Add signalfd call to bionic

Add signalfd() call to bionic.

Adding the signalfd call was done in 3 steps:
- add signalfd4 system call (function name and syscall
number) to libc/SYSCALLS.TXT
- generate all necessary headers by calling
libc/tools/gensyscalls.py. This patch is adding
the generated files since the build system
does not call gensyscalls.py.
- create the signalfd wrapper in signalfd.cpp and add
the function prototype to sys/signalfd.h

(cherry-pick of 0c11611c11f4dc1b6d43587b72c3ccbe8c51a51c, modified to
work with older versions of GCC still in use on some branches.)

Change-Id: I4c6c3f12199559af8be63f93a5336851b7e63355
yscalls.mk
yscalls/signalfd4.S
4fa35d8ae80c175425e9525831d7b6a71a3ada60 12-Dec-2012 Elliott Hughes <enh@google.com> Fix <endian.h> and <sys/endian.h>.

Previously we'd been relying on getting the machine-specific <endian.h>
instead of the top-level <endian.h>, and <sys/endian.h> was basically broken.
Now, with this patch and the previous patch we should have <endian.h>
and <sys/endian.h> behaving the same. This is basically how NetBSD's endian.h
works, and was probably how ours was originally intended to work.

Bug: http://code.google.com/p/android/issues/detail?id=39824
Change-Id: I71de5a507e633de166013a658b5764df9e1aa09c
nclude/endian.h
nclude/machine/endian.h
3975cec694a0c9b42e3f7e671fcd678da92836c3 30-Nov-2012 Elliott Hughes <enh@google.com> Remove (near-)duplicate definitions of size_t and ssize_t.

The near duplicates upset fussier compilers that insist that
typedefs be exactly the same, but the fix isn't to make all
copies identical...

Change-Id: Icfdace41726f36ec33c9ae919dbb5a54d3529cc9
nclude/machine/_types.h
b15c58bb0fe55f076751acd7a5d00ded0ec33963 27-Nov-2012 Elliott Hughes <enh@google.com> Clean up _BYTE_ORDER definitions for better x86 portability.

We'd manually hacked _BYTE_ORDER into the arm and mips "_types.h" headers,
but not into the x86 one. Judging by upstream, _BYTE_ORDER should be in
the "endian.h" headers instead, so let's uniformly do that.

I've also ironed out some of the other differences between the different
architectures' header files too.

Bug: http://code.google.com/p/android/issues/detail?id=39824
Change-Id: I19d3af7ffd74e1c02b1b6886aec0f0d11f44ab8d
nclude/endian.h
nclude/machine/_types.h
c1b44ecc5385e68e81667068e03b32c2084a85b1 17-Oct-2012 David 'Digit' Turner <digit@android.com> Revert "libc: Provide ucontext_t/mcontext_t/<sys/ucontext.h>"

This creates build issues in the internal Android tree.
Will investigate later.

Original patch: https://android-review.googlesource.com/#/c/38875/

Change-Id: I12c5995ebf172890051af42a5d3b31014c9c5117
ionic/_setjmp.S
ionic/setjmp.S
nclude/machine/setjmp.h
nclude/machine/signal.h
nclude/machine/ucontext.h
c124baaf29a948fd8b93e7f1fefc20b659271026 12-Jul-2012 David 'Digit' Turner <digit@android.com> libc: Provide ucontext_t/mcontext_t/<sys/ucontext.h>

This patch updates the C library headers to provide ucontext_t
definitions for three architectures.

+ Fix <signal.h> to always define 'struct sigcontext'.

The new declarations are announced with new macros defined in
<sys/cdefs.h> in order to make it easier to adapt client code
that already defines its own, incompatible, versions of the
structures seen here.

http://code.google.com/p/android/issues/detail?id=34784

Change-Id: Ie78c48690a4ce61c50593f6c39639be7fead3596
ionic/_setjmp.S
ionic/setjmp.S
nclude/machine/setjmp.h
nclude/machine/signal.h
nclude/machine/ucontext.h
b03bc56b7930d60237f1dd1ed40f23c2635929c9 27-Mar-2012 KwongYuan Wong <wong.kwongyuan@gmail.com> [MIPS] Check error status from pipe system call

Change-Id: Iaaea0e826c2678aa7f6fad9d46b16302a4d3b876
ionic/pipe.S
1ad05db9cef23c1ca28ffd51852fa2a0b0c9b4b7 06-Sep-2012 Elliott Hughes <enh@google.com> Add mlockall and munlockall for Google TV.

Change-Id: I10e961d701e74aab07211ec7975f61167e387853
yscalls.mk
yscalls/mlockall.S
yscalls/munlockall.S
1ad10a566e042676c95a0bdbf3cbc48e99ddafb2 29-Aug-2012 Irina Tirdea <irina.tirdea@intel.com> Add getsid system call to bionic

Add getsid() system call to bionic for
all architectures. This is needed for various tools
(e.g. perf).

Adding the getsid system call was done in 3 steps:
() add getsid system call (function name and syscall
number) to libc/SYSCALLS.TXT
() generate all necessary headers by calling
libc/tools/gensyscalls.py. This patch is adding
the generated files since the build system
does not call gensyscalls.py.
() add the system call signature to libc/include/unistd.h

Change-Id: Id69a257e13ec02e1a44085a6b217a3f19ab025b1
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
yscalls.mk
yscalls/getsid.S
0a150ead18019c0e4e59417ae3c5e8e0d7d2e4f4 21-Aug-2012 Ard Biesheuvel <ard.biesheuvel@gmail.com> libc: remove ctors/dtors sections

None of the supported ARCHs actually populate these sections,
so there is no point in keeping them in the binaries.

Change-Id: I21a364f510118ac1114e1b49c53ec8c895c6bc6b
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
ionic/crtbegin.S
ionic/crtend.S
e36c826f7a6580227e9e70f6ec70aa88ba0f577e 10-Aug-2012 Jeff Sharkey <jsharkey@android.com> Add unshare() syscall.

(cherry-pick of 5467f25f82934d611c60f8bc57a05114f3c1bea0.)

Bug: 6925012
Change-Id: Ic5ea2fbd606311087de05d7a3594df2fa9b2fef9
yscalls.mk
yscalls/unshare.S
405b8029a6888f386adf3512113a33546141d1c8 26-Jul-2012 Raghu Gandham <raghu@mips.com> MIPS support for libc.

Change-Id: I2864dea04b3faf2d919165dcaa600af5b16c41c8
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Raghu Gandham <raghu@mips.com>
ionic/__dso_handle.S
ionic/__dso_handle_so.S
ionic/__get_sp.S
ionic/__get_tls.c
ionic/__set_tls.c
ionic/_exit_with_stack_teardown.S
ionic/_setjmp.S
ionic/atexit.S
ionic/bzero.S
ionic/cacheflush.c
ionic/clone.S
ionic/crtbegin.S
ionic/crtbegin_so.S
ionic/crtend.S
ionic/crtend_so.S
ionic/ffs.S
ionic/futex_mips.S
ionic/memcmp16.S
ionic/memmove.c
ionic/pipe.S
ionic/setjmp.S
ionic/sigsetjmp.S
ionic/vfork.S
nclude/endian.h
nclude/machine/_types.h
nclude/machine/asm.h
nclude/machine/cdefs.h
nclude/machine/exec.h
nclude/machine/ieee.h
nclude/machine/internal_types.h
nclude/machine/kernel.h
nclude/machine/limits.h
nclude/machine/regdef.h
nclude/machine/regnum.h
nclude/machine/setjmp.h
nclude/machine/signal.h
tring/memcpy.S
tring/memset.S
tring/mips-string-ops.h
tring/mips_strlen.c
dbd5ecad26e39281bb83f97664bc32555c5c071a 09-May-2012 Elliott Hughes <enh@google.com> resolved conflicts for merge of e5408907 to jb-dev-plus-aosp

Change-Id: If4c3f51bf87b28da8074be2e46ae772a374b266f
1fa0d849576555577ffd9675677a3c95f21b754e 28-Jan-2012 Raghu Gandham <raghu@mips.com> [MIPS] Add support for MIPS syscalls

Change-Id: I4deba67e15c865c4c2db03064c04098a09828ea6
Signed-off-by: Raghu Gandham <raghu@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
yscalls.mk
yscalls/__brk.S
yscalls/__fcntl.S
yscalls/__fcntl64.S
yscalls/__fork.S
yscalls/__fstatfs64.S
yscalls/__getcpu.S
yscalls/__getcwd.S
yscalls/__getpriority.S
yscalls/__ioctl.S
yscalls/__llseek.S
yscalls/__mmap2.S
yscalls/__open.S
yscalls/__openat.S
yscalls/__ptrace.S
yscalls/__reboot.S
yscalls/__rt_sigaction.S
yscalls/__rt_sigprocmask.S
yscalls/__rt_sigtimedwait.S
yscalls/__sched_getaffinity.S
yscalls/__set_thread_area.S
yscalls/__setresuid.S
yscalls/__setreuid.S
yscalls/__setuid.S
yscalls/__sigsuspend.S
yscalls/__statfs64.S
yscalls/__sys_clone.S
yscalls/__syslog.S
yscalls/__timer_create.S
yscalls/__timer_delete.S
yscalls/__timer_getoverrun.S
yscalls/__timer_gettime.S
yscalls/__timer_settime.S
yscalls/__wait4.S
yscalls/__waitid.S
yscalls/_exit.S
yscalls/_exit_thread.S
yscalls/_flush_cache.S
yscalls/_waitpid.S
yscalls/accept.S
yscalls/access.S
yscalls/acct.S
yscalls/bind.S
yscalls/capget.S
yscalls/capset.S
yscalls/chdir.S
yscalls/chmod.S
yscalls/chown.S
yscalls/chroot.S
yscalls/clock_getres.S
yscalls/clock_gettime.S
yscalls/clock_nanosleep.S
yscalls/clock_settime.S
yscalls/close.S
yscalls/connect.S
yscalls/delete_module.S
yscalls/dup.S
yscalls/dup2.S
yscalls/epoll_create.S
yscalls/epoll_ctl.S
yscalls/epoll_wait.S
yscalls/eventfd.S
yscalls/execve.S
yscalls/fchdir.S
yscalls/fchmod.S
yscalls/fchmodat.S
yscalls/fchown.S
yscalls/fchownat.S
yscalls/fdatasync.S
yscalls/fgetxattr.S
yscalls/flistxattr.S
yscalls/flock.S
yscalls/fremovexattr.S
yscalls/fsetxattr.S
yscalls/fstat.S
yscalls/fstatat.S
yscalls/fsync.S
yscalls/ftruncate.S
yscalls/ftruncate64.S
yscalls/futex.S
yscalls/getdents.S
yscalls/getegid.S
yscalls/geteuid.S
yscalls/getgid.S
yscalls/getgroups.S
yscalls/getitimer.S
yscalls/getpeername.S
yscalls/getpgid.S
yscalls/getpid.S
yscalls/getppid.S
yscalls/getresgid.S
yscalls/getresuid.S
yscalls/getrlimit.S
yscalls/getrusage.S
yscalls/getsockname.S
yscalls/getsockopt.S
yscalls/gettid.S
yscalls/gettimeofday.S
yscalls/getuid.S
yscalls/getxattr.S
yscalls/init_module.S
yscalls/inotify_add_watch.S
yscalls/inotify_init.S
yscalls/inotify_rm_watch.S
yscalls/ioprio_get.S
yscalls/ioprio_set.S
yscalls/kill.S
yscalls/klogctl.S
yscalls/lchown.S
yscalls/lgetxattr.S
yscalls/link.S
yscalls/listen.S
yscalls/listxattr.S
yscalls/llistxattr.S
yscalls/lremovexattr.S
yscalls/lseek.S
yscalls/lsetxattr.S
yscalls/lstat.S
yscalls/madvise.S
yscalls/mincore.S
yscalls/mkdir.S
yscalls/mkdirat.S
yscalls/mknod.S
yscalls/mlock.S
yscalls/mount.S
yscalls/mprotect.S
yscalls/mremap.S
yscalls/msync.S
yscalls/munlock.S
yscalls/munmap.S
yscalls/nanosleep.S
yscalls/pause.S
yscalls/personality.S
yscalls/pipe2.S
yscalls/poll.S
yscalls/prctl.S
yscalls/pread64.S
yscalls/pwrite64.S
yscalls/read.S
yscalls/readahead.S
yscalls/readlink.S
yscalls/readv.S
yscalls/recvfrom.S
yscalls/recvmsg.S
yscalls/removexattr.S
yscalls/rename.S
yscalls/renameat.S
yscalls/rmdir.S
yscalls/sched_get_priority_max.S
yscalls/sched_get_priority_min.S
yscalls/sched_getparam.S
yscalls/sched_getscheduler.S
yscalls/sched_rr_get_interval.S
yscalls/sched_setaffinity.S
yscalls/sched_setparam.S
yscalls/sched_setscheduler.S
yscalls/sched_yield.S
yscalls/select.S
yscalls/sendfile.S
yscalls/sendmsg.S
yscalls/sendto.S
yscalls/setgid.S
yscalls/setgroups.S
yscalls/setitimer.S
yscalls/setpgid.S
yscalls/setpriority.S
yscalls/setregid.S
yscalls/setresgid.S
yscalls/setrlimit.S
yscalls/setsid.S
yscalls/setsockopt.S
yscalls/settimeofday.S
yscalls/setxattr.S
yscalls/shutdown.S
yscalls/sigaction.S
yscalls/sigaltstack.S
yscalls/sigpending.S
yscalls/sigprocmask.S
yscalls/socket.S
yscalls/socketpair.S
yscalls/stat.S
yscalls/symlink.S
yscalls/sync.S
yscalls/syscall.S
yscalls/sysinfo.S
yscalls/times.S
yscalls/tkill.S
yscalls/truncate.S
yscalls/umask.S
yscalls/umount2.S
yscalls/uname.S
yscalls/unlink.S
yscalls/unlinkat.S
yscalls/utimensat.S
yscalls/utimes.S
yscalls/write.S
yscalls/writev.S