platform_bionic/libc/arch-arm/syscalls
Elliott Hughes 7086ad6919 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
2014-06-20 09:06:57 -07:00
..
__accept4.S Mark sockets on creation (socket()) and accept4(). 2014-05-19 15:19:16 -07:00
__brk.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__connect.S Introduce netd_client, a dynamic library that talks to netd. 2014-05-13 11:30:03 -07:00
__epoll_pwait.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
__exit.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__fcntl64.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__fstatfs64.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__getcpu.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__getcwd.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__getdents64.S Remove getdents from bionic. 2014-06-06 15:05:58 -07:00
__getpid.S Cache getpid. 2014-06-20 09:06:57 -07:00
__getpriority.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__ioctl.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__llseek.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
__mmap2.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
__openat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__ppoll.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
__pselect6.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
__ptrace.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__reboot.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__rt_sigaction.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__rt_sigpending.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__rt_sigprocmask.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__rt_sigsuspend.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__rt_sigtimedwait.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__sched_getaffinity.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__set_tid_address.S Fix pthread_join. 2013-11-18 19:48:11 -08:00
__set_tls.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__sigaction.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__signalfd4.S Hide __signalfd4, used to implement signalfd(3). 2014-05-16 15:47:29 -07:00
__socket.S Mark sockets on creation (socket()) and accept4(). 2014-05-19 15:19:16 -07:00
__statfs64.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__timer_create.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__timer_delete.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__timer_getoverrun.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__timer_gettime.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__timer_settime.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
__waitid.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
_exit.S Implement _Exit(3). 2014-04-08 17:16:13 -07:00
acct.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
bind.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
cacheflush.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
capget.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
capset.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
chdir.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
chroot.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
clock_getres.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
clock_gettime.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
clock_nanosleep.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
clock_settime.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
close.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
delete_module.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
dup.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
dup3.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
epoll_create1.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
epoll_ctl.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
eventfd.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
execve.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
faccessat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
fallocate64.S Add fallocate/fallocate64/posix_fallocate/posix_fallocate64. 2014-02-03 16:20:46 -08:00
fchdir.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
fchmod.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
fchmodat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
fchown.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
fchownat.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
fdatasync.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
fgetxattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
flistxattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
flock.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
fremovexattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
fsetxattr.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
fstat64.S Fix build by avoiding the _C_LABEL macro. 2014-02-18 16:42:36 -08:00
fstatat64.S Fix build by avoiding the _C_LABEL macro. 2014-02-18 16:42:36 -08:00
fsync.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
ftruncate.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
ftruncate64.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getegid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
geteuid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getgid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getgroups.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getitimer.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getpeername.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getpgid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getppid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getresgid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getresuid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getrlimit.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getrusage.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getsid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getsockname.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getsockopt.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
gettimeofday.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getuid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
getxattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
init_module.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
inotify_add_watch.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
inotify_init1.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
inotify_rm_watch.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
kill.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
klogctl.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
lgetxattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
linkat.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
listen.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
listxattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
llistxattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
lremovexattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
lseek.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
lsetxattr.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
madvise.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
mincore.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
mkdirat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
mknodat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
mlock.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
mlockall.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
mount.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
mprotect.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
mremap.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
msync.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
munlock.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
munlockall.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
munmap.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
nanosleep.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
personality.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
pipe2.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
prctl.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
pread64.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
prlimit64.S Fix <sys/resource.h>. 2014-01-09 11:00:04 -08:00
pwrite64.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
read.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
readahead.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
readlinkat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
readv.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
recvfrom.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
recvmmsg.S Add recvmmsg and sendmmsg syscalls. 2014-02-27 14:29:01 -08:00
recvmsg.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
removexattr.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
renameat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_get_priority_max.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_get_priority_min.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_getparam.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_getscheduler.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_rr_get_interval.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_setaffinity.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_setparam.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_setscheduler.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sched_yield.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sendfile.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sendfile64.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sendmmsg.S Add recvmmsg and sendmmsg syscalls. 2014-02-27 14:29:01 -08:00
sendmsg.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sendto.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
setgid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setgroups.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setitimer.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setns.S Clean up <sched.h>. 2014-01-02 12:05:50 -08:00
setpgid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setpriority.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setregid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setresgid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setresuid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setreuid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setrlimit.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setsid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setsockopt.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
settimeofday.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setuid.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
setxattr.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
shutdown.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sigaltstack.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
socketpair.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
swapoff.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
swapon.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
symlinkat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sync.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
sysinfo.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
tgkill.S Add cfi directives to all arm assembly. 2013-12-02 19:13:12 -08:00
timerfd_create.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
timerfd_gettime.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
timerfd_settime.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
times.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
truncate.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
truncate64.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
umask.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
umount2.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
uname.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
unlinkat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
unshare.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
utimensat.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
wait4.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
write.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00
writev.S Stop using the non-uapi <linux/err.h> header file. 2013-11-07 10:31:05 -08:00