blob: 2e2cd11a40b9b126c9f010f0845fee21370d7e33 [file] [log] [blame]
Elliott Hughes5e522792013-09-24 00:30:25 -07001# This file is used to automatically generate bionic's system call stubs.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08002#
Elliott Hughes5e522792013-09-24 00:30:25 -07003# Each non-blank, non-comment line has the following format:
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08004#
H.J. Lu6fe4e872013-10-04 10:03:17 -07005# return_type func_name[|alias_list][:syscall_name[:socketcall_id]]([parameter_list]) arch_list
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08006#
Elliott Hughes5e522792013-09-24 00:30:25 -07007# where:
Elliott Hughesc9da3322013-10-15 18:18:58 -07008# arch_list ::= "all" | arch+
Chris Dearman50432122014-02-05 16:59:23 -08009# arch ::= "arm" | "arm64" | "mips" | "mips64" | "x86" | "x86_64"
Elliott Hughes5e522792013-09-24 00:30:25 -070010#
11# Note:
Elliott Hughesa51916b2013-04-03 10:08:09 -070012# - syscall_name corresponds to the name of the syscall, which may differ from
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080013# the exported function name (example: the exit syscall is implemented by the _exit()
14# function, which is not the same as the standard C exit() function which calls it)
Elliott Hughes5e522792013-09-24 00:30:25 -070015#
H.J. Lu6fe4e872013-10-04 10:03:17 -070016# - alias_list is optional comma separated list of function aliases.
17#
Elliott Hughes5e522792013-09-24 00:30:25 -070018# - The call_id parameter, given that func_name and syscall_name have
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080019# been provided, allows the user to specify dispatch style syscalls.
20# For example, socket() syscall on i386 actually becomes:
21# socketcall(__NR_socket, 1, *(rest of args on stack)).
22#
Elliott Hughes5e522792013-09-24 00:30:25 -070023# - Each parameter type is assumed to be stored in 32 bits.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024#
Elliott Hughes0493a6f2013-03-07 11:48:58 -080025# This file is processed by a python script named gensyscalls.py.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080026
Elliott Hughes5e522792013-09-24 00:30:25 -070027int execve(const char*, char* const*, char* const*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080028
Elliott Hughes5e522792013-09-24 00:30:25 -070029uid_t getuid:getuid32() arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080030uid_t getuid:getuid() arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070031gid_t getgid:getgid32() arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080032gid_t getgid:getgid() arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070033uid_t geteuid:geteuid32() arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080034uid_t geteuid:geteuid() arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070035gid_t getegid:getegid32() arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080036gid_t getegid:getegid() arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070037uid_t getresuid:getresuid32(uid_t* ruid, uid_t* euid, uid_t* suid) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080038uid_t getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070039gid_t getresgid:getresgid32(gid_t* rgid, gid_t* egid, gid_t* sgid) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080040gid_t getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070041ssize_t readahead(int, off64_t, size_t) all
42int getgroups:getgroups32(int, gid_t*) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080043int getgroups:getgroups(int, gid_t*) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070044pid_t getpgid(pid_t) all
45pid_t getppid() all
46pid_t getsid(pid_t) all
47pid_t setsid() all
48int setgid:setgid32(gid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080049int setgid:setgid(gid_t) arm64,mips,mips64,x86_64
Elliott Hughes232163c2013-10-09 17:35:36 -070050int setuid:setuid32(uid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080051int setuid:setuid(uid_t) arm64,mips,mips64,x86_64
Elliott Hughes232163c2013-10-09 17:35:36 -070052int setreuid:setreuid32(uid_t, uid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080053int setreuid:setreuid(uid_t, uid_t) arm64,mips,mips64,x86_64
Elliott Hughes232163c2013-10-09 17:35:36 -070054int setresuid:setresuid32(uid_t, uid_t, uid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080055int setresuid:setresuid(uid_t, uid_t, uid_t) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070056int setresgid:setresgid32(gid_t, gid_t, gid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080057int setresgid:setresgid(gid_t, gid_t, gid_t) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070058void* __brk:brk(void*) all
Christopher Ferrised459702013-12-02 17:44:53 -080059int kill(pid_t, int) all
Christopher Ferrised459702013-12-02 17:44:53 -080060int tgkill(pid_t tgid, pid_t tid, int sig) all
Elliott Hughes5e522792013-09-24 00:30:25 -070061int __ptrace:ptrace(int request, int pid, void* addr, void* data) all
Elliott Hughes0f461e32014-01-09 10:17:03 -080062
63# <sys/resource.h>
64int getrusage(int, struct rusage*) all
65int __getpriority:getpriority(int, int) all
66int setpriority(int, int, int) all
67# On LP64, rlimit and rlimit64 are the same.
68# On 32-bit systems we use prlimit64 to implement the rlimit64 functions.
69int getrlimit:ugetrlimit(int, struct rlimit*) arm,x86
70int getrlimit(int, struct rlimit*) mips
Chris Dearman50432122014-02-05 16:59:23 -080071int getrlimit|getrlimit64(int, struct rlimit*) arm64,mips64,x86_64
Elliott Hughes0f461e32014-01-09 10:17:03 -080072int setrlimit(int, const struct rlimit*) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -080073int setrlimit|setrlimit64(int, const struct rlimit*) arm64,mips64,x86_64
74int prlimit64|prlimit(pid_t, int, struct rlimit64*, const struct rlimit64*) arm64,mips64,x86_64
Elliott Hughes0f461e32014-01-09 10:17:03 -080075int prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) arm,mips,x86
76
Elliott Hughes5e522792013-09-24 00:30:25 -070077int setgroups:setgroups32(int, const gid_t*) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080078int setgroups:setgroups(int, const gid_t*) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070079int setpgid(pid_t, pid_t) all
Dan Albert6a918872014-08-05 20:53:31 +000080pid_t vfork(void) arm
Elliott Hughes5e522792013-09-24 00:30:25 -070081int setregid:setregid32(gid_t, gid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080082int setregid:setregid(gid_t, gid_t) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070083int chroot(const char*) all
Elliott Hughes9c07aee2014-07-18 15:55:41 -070084int prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all
Elliott Hughes4906e562013-10-04 14:55:30 -070085long __arch_prctl:arch_prctl(int, unsigned long) x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070086int capget(cap_user_header_t header, cap_user_data_t data) all
87int capset(cap_user_header_t header, const cap_user_data_t data) all
88int sigaltstack(const stack_t*, stack_t*) all
89int acct(const char* filepath) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080090
91# file descriptors
Elliott Hughes5e522792013-09-24 00:30:25 -070092ssize_t read(int, void*, size_t) all
93ssize_t write(int, const void*, size_t) all
Elliott Hughes8fbf8de2013-11-06 13:10:37 -080094ssize_t pread64(int, void*, size_t, off64_t) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -080095ssize_t pread64|pread(int, void*, size_t, off_t) arm64,mips64,x86_64
Elliott Hughes8fbf8de2013-11-06 13:10:37 -080096ssize_t pwrite64(int, void*, size_t, off64_t) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -080097ssize_t pwrite64|pwrite(int, void*, size_t, off_t) arm64,mips64,x86_64
Elliott Hughes3391a9f2015-04-22 21:40:38 -070098int ___close:close(int) all
Elliott Hughes7086ad62014-06-19 16:39:01 -070099pid_t __getpid:getpid() all
Elliott Hughes5e522792013-09-24 00:30:25 -0700100int munmap(void*, size_t) all
101void* mremap(void*, size_t, size_t, unsigned long) all
102int msync(const void*, size_t, int) all
103int mprotect(const void*, size_t, int) all
Yabin Cuiefbb6fb2014-12-03 11:11:50 -0800104int madvise(void*, size_t, int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700105int mlock(const void* addr, size_t len) all
106int munlock(const void* addr, size_t len) all
107int mlockall(int flags) all
108int munlockall() all
109int mincore(void* start, size_t length, unsigned char* vec) all
110int __ioctl:ioctl(int, int, void*) all
111int readv(int, const struct iovec*, int) all
112int writev(int, const struct iovec*, int) all
Elliott Hughes06209252013-11-06 16:20:54 -0800113int __fcntl64:fcntl64(int, int, void*) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -0800114int fcntl(int, int, void*) arm64,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -0700115int flock(int, int) all
Nick Kralevich00490ae2015-02-03 11:27:25 -0800116int ___fchmod:fchmod(int, mode_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700117int dup(int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700118int pipe2(int*, int) all
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700119int dup3(int, int, int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700120int fsync(int) all
121int fdatasync(int) all
122int fchown:fchown32(int, uid_t, gid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -0800123int fchown:fchown(int, uid_t, gid_t) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -0700124void sync(void) all
Nick Kralevichc92f9f82015-05-31 13:43:13 -0700125int ___fsetxattr:fsetxattr(int, const char*, const void*, size_t, int) all
126ssize_t ___fgetxattr:fgetxattr(int, const char*, void*, size_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700127ssize_t flistxattr(int, char*, size_t) all
128int fremovexattr(int, const char*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800129
Elliott Hughes3d5cb302014-06-06 11:44:55 -0700130int __getdents64:getdents64(unsigned int, struct dirent*, unsigned int) arm,arm64,mips,mips64,x86,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800131
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700132int __openat:openat(int, const char*, int, mode_t) all
Nick Kralevich35778252015-02-24 13:40:43 -0800133int ___faccessat:faccessat(int, const char*, int) all
Nick Kralevich00490ae2015-02-03 11:27:25 -0800134int ___fchmodat:fchmodat(int, const char*, mode_t) all
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700135int fchownat(int, const char*, uid_t, gid_t, int) all
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800136int fstatat64|fstatat:fstatat64(int, const char*, struct stat*, int) arm,mips,x86
Raghu Gandham86d2fee2015-01-15 11:12:22 -0800137int fstatat64|fstatat:newfstatat(int, const char*, struct stat*, int) arm64,x86_64
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700138int linkat(int, const char*, int, const char*, int) all
139int mkdirat(int, const char*, mode_t) all
140int mknodat(int, const char*, mode_t, dev_t) all
141int readlinkat(int, const char*, char*, size_t) all
142int renameat(int, const char*, int, const char*) all
143int symlinkat(const char*, int, const char*) all
144int unlinkat(int, const char*, int) all
145int utimensat(int, const char*, const struct timespec times[2], int) all
146
Elliott Hughesa6519d62013-10-17 16:56:40 -0700147# Paired off_t/off64_t system calls. On 64-bit systems,
148# sizeof(off_t) == sizeof(off64_t), so there we emit two symbols that are
149# aliases. On 32-bit systems, we have two different system calls.
150# That means that every system call in this section should take three lines.
151off_t lseek(int, off_t, int) arm,mips,x86
152int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -0800153off_t lseek|lseek64(int, off_t, int) arm64,mips64,x86_64
Elliott Hughesa6519d62013-10-17 16:56:40 -0700154int ftruncate64(int, off64_t) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -0800155int ftruncate|ftruncate64(int, off_t) arm64,mips64,x86_64
Elliott Hughesa6519d62013-10-17 16:56:40 -0700156ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) arm,mips,x86
157ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -0800158ssize_t sendfile|sendfile64(int out_fd, int in_fd, off_t* offset, size_t count) arm64,mips64,x86_64
Elliott Hughesa6519d62013-10-17 16:56:40 -0700159int truncate(const char*, off_t) arm,mips,x86
160int truncate64(const char*, off64_t) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -0800161int truncate|truncate64(const char*, off_t) arm64,mips64,x86_64
Serban Constantinescued76a932013-12-12 09:36:27 +0000162# (mmap only gets two lines because we only used the 64-bit variant on 32-bit systems.)
163void* __mmap2:mmap2(void*, size_t, int, int, int, long) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -0800164void* mmap|mmap64(void*, size_t, int, int, int, off_t) arm64,mips64,x86_64
Elliott Hughesf64b8ea2014-02-03 16:20:46 -0800165# (fallocate only gets two lines because there is no 32-bit variant.)
166int fallocate64:fallocate(int, int, off64_t, off64_t) arm,mips,x86
Chris Dearman50432122014-02-05 16:59:23 -0800167int fallocate|fallocate64(int, int, off_t, off_t) arm64,mips64,x86_64
Elliott Hughesa6519d62013-10-17 16:56:40 -0700168
Elliott Hughesb587f332014-09-10 17:39:00 -0700169# posix_fadvise64 is awkward: arm has shuffled arguments,
170# the POSIX functions don't set errno, and no architecture has posix_fadvise.
171int __arm_fadvise64_64:arm_fadvise64_64(int, int, off64_t, off64_t) arm
Elliott Hughes9990b392014-09-11 10:10:08 -0700172int __fadvise64:fadvise64_64(int, off64_t, off64_t, int) x86
173int __fadvise64:fadvise64(int, off64_t, off64_t, int) arm64,mips,mips64,x86_64
Elliott Hughesb587f332014-09-10 17:39:00 -0700174
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800175int __fstatfs64:fstatfs64(int, size_t, struct statfs*) arm,mips,x86
Elliott Hughesfa495d52015-03-18 15:46:48 -0700176int __fstatfs:fstatfs(int, struct statfs*) arm64,mips64,x86_64
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800177int __statfs64:statfs64(const char*, size_t, struct statfs*) arm,mips,x86
Elliott Hughesfa495d52015-03-18 15:46:48 -0700178int __statfs:statfs(const char*, struct statfs*) arm64,mips64,x86_64
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800179
180int fstat64|fstat:fstat64(int, struct stat*) arm,mips,x86
Raghu Gandham86d2fee2015-01-15 11:12:22 -0800181int fstat64|fstat:fstat(int, struct stat*) arm64,x86_64
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800182
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800183# file system
Elliott Hughes5e522792013-09-24 00:30:25 -0700184int chdir(const char*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700185int mount(const char*, const char*, const char*, unsigned long, const void*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700186int umount2(const char*, int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700187int __getcwd:getcwd(char* buf, size_t size) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700188int fchdir(int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700189int setxattr(const char*, const char*, const void*, size_t, int) all
190int lsetxattr(const char*, const char*, const void*, size_t, int) all
191ssize_t getxattr(const char*, const char*, void*, size_t) all
192ssize_t lgetxattr(const char*, const char*, void*, size_t) all
193ssize_t listxattr(const char*, char*, size_t) all
194ssize_t llistxattr(const char*, char*, size_t) all
195int removexattr(const char*, const char*) all
196int lremovexattr(const char*, const char*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700197int swapon(const char*, int) all
198int swapoff(const char*) all
Stephen Smalley5eb686d2012-01-13 07:45:16 -0500199
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800200# time
Elliott Hughes5e522792013-09-24 00:30:25 -0700201int settimeofday(const struct timeval*, const struct timezone*) all
202clock_t times(struct tms*) all
203int nanosleep(const struct timespec*, struct timespec*) all
Haruki Hasegawa18160252014-10-13 00:50:47 +0900204int clock_settime(clockid_t, const struct timespec*) all
205int clock_getres(clockid_t, struct timespec*) all
Elliott Hughes929be682015-06-15 19:39:04 -0700206int ___clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700207int getitimer(int, const struct itimerval*) all
208int setitimer(int, const struct itimerval*, struct itimerval*) all
Elliott Hughes4b558f52014-03-04 15:58:02 -0800209int __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, __kernel_timer_t* timerid) all
210int __timer_settime:timer_settime(__kernel_timer_t, int, const struct itimerspec*, struct itimerspec*) all
211int __timer_gettime:timer_gettime(__kernel_timer_t, struct itimerspec*) all
212int __timer_getoverrun:timer_getoverrun(__kernel_timer_t) all
213int __timer_delete:timer_delete(__kernel_timer_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700214int timerfd_create(clockid_t, int) all
215int timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*) all
216int timerfd_gettime(int, struct itimerspec*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800217
218# signals
Elliott Hughesc7e9b232013-10-16 22:27:54 -0700219int __sigaction:sigaction(int, const struct sigaction*, struct sigaction*) arm,mips,x86
Elliott Hughes1f5af922013-10-15 18:01:56 -0700220int __rt_sigaction:rt_sigaction(int, const struct sigaction*, struct sigaction*, size_t) all
Elliott Hughes40d105c2013-10-16 12:53:58 -0700221int __rt_sigpending:rt_sigpending(sigset_t*, size_t) all
Elliott Hughes1f5af922013-10-15 18:01:56 -0700222int __rt_sigprocmask:rt_sigprocmask(int, const sigset_t*, sigset_t*, size_t) all
223int __rt_sigsuspend:rt_sigsuspend(const sigset_t*, size_t) all
224int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t*, struct siginfo_t*, struct timespec_t*, size_t) all
Yabin Cui7490c5c2015-05-18 11:19:11 -0700225int ___rt_sigqueueinfo:rt_sigqueueinfo(pid_t, int, siginfo_t*) all
Elliott Hughes7222b1b2014-05-16 15:47:29 -0700226int __signalfd4:signalfd4(int, const sigset_t*, size_t, int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800227
228# sockets
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700229int __socket:socket(int, int, int) arm,arm64,mips,mips64,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800230int socketpair(int, int, int, int*) arm,arm64,mips,mips64,x86_64
231int bind(int, struct sockaddr*, int) arm,arm64,mips,mips64,x86_64
Sreeram Ramachandranceb5bd72014-05-12 11:19:16 -0700232int __connect:connect(int, struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800233int listen(int, int) arm,arm64,mips,mips64,x86_64
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700234int __accept4:accept4(int, struct sockaddr*, socklen_t*, int) arm,arm64,mips,mips64,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800235int getsockname(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
236int getpeername(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
237int sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64
238int recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
239int shutdown(int, int) arm,arm64,mips,mips64,x86_64
240int setsockopt(int, int, int, const void*, socklen_t) arm,arm64,mips,mips64,x86_64
241int getsockopt(int, int, int, void*, socklen_t*) arm,arm64,mips,mips64,x86_64
242int sendmsg(int, const struct msghdr*, unsigned int) arm,arm64,mips,mips64,x86_64
243int recvmsg(int, struct msghdr*, unsigned int) arm,arm64,mips,mips64,x86_64
Guillaume Ranquet6ff0c752014-02-10 13:11:29 +0100244int recvmmsg(int, struct mmsghdr*, unsigned int, int, const struct timespec*) arm,arm64,mips,mips64,x86_64
245int sendmmsg(int, struct mmsghdr*, unsigned int, int) arm,arm64,mips,mips64,x86_64
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800246
247# sockets for x86. These are done as an "indexed" call to socketcall syscall.
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700248int __socket:socketcall:1(int, int, int) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700249int bind:socketcall:2(int, struct sockaddr*, int) x86
Sreeram Ramachandranceb5bd72014-05-12 11:19:16 -0700250int __connect:socketcall:3(int, struct sockaddr*, socklen_t) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700251int listen:socketcall:4(int, int) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700252int getsockname:socketcall:6(int, struct sockaddr*, socklen_t*) x86
253int getpeername:socketcall:7(int, struct sockaddr*, socklen_t*) x86
254int socketpair:socketcall:8(int, int, int, int*) x86
255int sendto:socketcall:11(int, const void*, size_t, int, const struct sockaddr*, socklen_t) x86
256int recvfrom:socketcall:12(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) x86
257int shutdown:socketcall:13(int, int) x86
258int setsockopt:socketcall:14(int, int, int, const void*, socklen_t) x86
259int getsockopt:socketcall:15(int, int, int, void*, socklen_t*) x86
260int sendmsg:socketcall:16(int, const struct msghdr*, unsigned int) x86
261int recvmsg:socketcall:17(int, struct msghdr*, unsigned int) x86
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700262int __accept4:socketcall:18(int, struct sockaddr*, socklen_t*, int) x86
Guillaume Ranquet6ff0c752014-02-10 13:11:29 +0100263int recvmmsg:socketcall:19(int, struct mmsghdr*, unsigned int, int, const struct timespec*) x86
264int sendmmsg:socketcall:20(int, struct mmsghdr*, unsigned int, int) x86
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800265
266# scheduler & real-time
Elliott Hughes5e522792013-09-24 00:30:25 -0700267int sched_setscheduler(pid_t pid, int policy, const struct sched_param* param) all
268int sched_getscheduler(pid_t pid) all
269int sched_yield(void) all
270int sched_setparam(pid_t pid, const struct sched_param* param) all
271int sched_getparam(pid_t pid, struct sched_param* param) all
272int sched_get_priority_max(int policy) all
273int sched_get_priority_min(int policy) all
274int sched_rr_get_interval(pid_t pid, struct timespec* interval) all
275int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) all
Elliott Hughes887e1142014-01-02 12:05:50 -0800276int setns(int, int) all
277int unshare(int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700278int __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) all
Elliott Hughes887e1142014-01-02 12:05:50 -0800279int __getcpu:getcpu(unsigned*, unsigned*, void*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800280
281# other
Elliott Hughes5e522792013-09-24 00:30:25 -0700282int uname(struct utsname*) all
283mode_t umask(mode_t) all
Elliott Hughes1f5af922013-10-15 18:01:56 -0700284int __reboot:reboot(int, int, int, void*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700285int init_module(void*, unsigned long, const char*) all
286int delete_module(const char*, unsigned int) all
287int klogctl:syslog(int, char*, int) all
288int sysinfo(struct sysinfo*) all
289int personality(unsigned long) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800290
Elliott Hughes3f525d42014-06-24 16:32:01 -0700291ssize_t tee(int, int, size_t, unsigned int) all
292ssize_t splice(int, off64_t*, int, off64_t*, size_t, unsigned int) all
293ssize_t vmsplice(int, const struct iovec*, size_t, unsigned int) all
294
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700295int epoll_create1(int) all
296int epoll_ctl(int, int op, int, struct epoll_event*) all
Elliott Hughes11952072013-10-24 15:15:14 -0700297int __epoll_pwait:epoll_pwait(int, struct epoll_event*, int, int, const sigset_t*, size_t) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800298
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700299int eventfd:eventfd2(unsigned int, int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800300
Elliott Hughes9f525642014-04-08 17:14:01 -0700301void _exit|_Exit:exit_group(int) all
Elliott Hughes6b53c232013-10-24 22:36:58 -0700302void __exit:exit(int) all
303
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700304int inotify_init1(int) all
305int inotify_add_watch(int, const char*, unsigned int) all
306int inotify_rm_watch(int, unsigned int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800307
Elliott Hughes11952072013-10-24 15:15:14 -0700308int __pselect6:pselect6(int, fd_set*, fd_set*, fd_set*, timespec*, void*) all
309int __ppoll:ppoll(pollfd*, unsigned int, timespec*, const sigset_t*, size_t) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800310
Elliott Hughes25ac7532015-06-10 17:24:20 -0700311ssize_t process_vm_readv(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all
312ssize_t process_vm_writev(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all
313
Elliott Hughes36d61882013-11-19 13:31:58 -0800314int __set_tid_address:set_tid_address(int*) all
315
Elliott Hughes79310992014-07-30 15:05:09 -0700316int setfsgid(gid_t) all
317int setfsuid(uid_t) all
318
Elliott Hughesb86a4c72014-11-07 16:07:13 -0800319int sethostname(const char*, size_t) all
320
Elliott Hughes6b53c232013-10-24 22:36:58 -0700321pid_t wait4(pid_t, int*, int, struct rusage*) all
322int __waitid:waitid(int, pid_t, struct siginfo_t*, int, void*) all
323
Elliott Hughesa6519d62013-10-17 16:56:40 -0700324# ARM-specific
Elliott Hughes5e522792013-09-24 00:30:25 -0700325int __set_tls:__ARM_NR_set_tls(void*) arm
326int cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) arm
Raghu Gandham1fa0d842012-01-27 17:51:42 -0800327
328# MIPS-specific
Dan Albert47793d62014-08-21 12:13:24 -0700329int _flush_cache:cacheflush(char* addr, const int nbytes, const int op) mips
Elliott Hughesdcbef062014-05-12 16:11:06 -0700330int __set_tls:set_thread_area(void*) mips,mips64
331
332# x86-specific
333int __set_thread_area:set_thread_area(void*) x86
Elliott Hughes625993d2014-07-15 16:53:13 -0700334
335# vdso stuff.
336int clock_gettime(clockid_t, timespec*) arm,mips,mips64,x86
337int __clock_gettime:clock_gettime(clockid_t, timespec*) arm64,x86_64
338int gettimeofday(timeval*, timezone*) arm,mips,mips64,x86
339int __gettimeofday:gettimeofday(timeval*, timezone*) arm64,x86_64