1*8d67ca89SAndroid Build Coastguard Worker# This file is used to automatically generate bionic's system call stubs. 2*8d67ca89SAndroid Build Coastguard Worker# 3*8d67ca89SAndroid Build Coastguard Worker# Each non-blank, non-comment line has the following format: 4*8d67ca89SAndroid Build Coastguard Worker# 5*8d67ca89SAndroid Build Coastguard Worker# return_type func_name[|alias_list][:syscall_name[:socketcall_id]]([parameter_list]) arch_list 6*8d67ca89SAndroid Build Coastguard Worker# 7*8d67ca89SAndroid Build Coastguard Worker# where: 8*8d67ca89SAndroid Build Coastguard Worker# arch_list ::= "all" | arches 9*8d67ca89SAndroid Build Coastguard Worker# arches ::= arch | arch "," arches 10*8d67ca89SAndroid Build Coastguard Worker# arch ::= "arm" | "arm64" | "riscv64" | "x86" | "x86_64" | "lp32" | "lp64" 11*8d67ca89SAndroid Build Coastguard Worker# 12*8d67ca89SAndroid Build Coastguard Worker# Note: 13*8d67ca89SAndroid Build Coastguard Worker# - syscall_name corresponds to the name of the syscall, which may differ from 14*8d67ca89SAndroid Build Coastguard Worker# the exported function name (example: the exit syscall is implemented by the _exit() 15*8d67ca89SAndroid Build Coastguard Worker# function, which is not the same as the standard C exit() function which calls it) 16*8d67ca89SAndroid Build Coastguard Worker# 17*8d67ca89SAndroid Build Coastguard Worker# - alias_list is optional comma separated list of function aliases. 18*8d67ca89SAndroid Build Coastguard Worker# 19*8d67ca89SAndroid Build Coastguard Worker# - The call_id parameter, given that func_name and syscall_name have 20*8d67ca89SAndroid Build Coastguard Worker# been provided, allows the user to specify dispatch style syscalls. 21*8d67ca89SAndroid Build Coastguard Worker# For example, socket() syscall on i386 actually becomes: 22*8d67ca89SAndroid Build Coastguard Worker# socketcall(__NR_socket, 1, *(rest of args on stack)). 23*8d67ca89SAndroid Build Coastguard Worker# 24*8d67ca89SAndroid Build Coastguard Worker# - Each parameter type is assumed to be stored in 32 bits. 25*8d67ca89SAndroid Build Coastguard Worker# 26*8d67ca89SAndroid Build Coastguard Worker# This file is processed by a python script named gensyscalls.py, run via 27*8d67ca89SAndroid Build Coastguard Worker# genrules in Android.bp. 28*8d67ca89SAndroid Build Coastguard Worker 29*8d67ca89SAndroid Build Coastguard Worker# Calls that have historical 16-bit variants camping on the best names (CONFIG_UID16). 30*8d67ca89SAndroid Build Coastguard Workeruid_t getuid:getuid32() lp32 31*8d67ca89SAndroid Build Coastguard Workeruid_t getuid:getuid() lp64 32*8d67ca89SAndroid Build Coastguard Workergid_t getgid:getgid32() lp32 33*8d67ca89SAndroid Build Coastguard Workergid_t getgid:getgid() lp64 34*8d67ca89SAndroid Build Coastguard Workeruid_t geteuid:geteuid32() lp32 35*8d67ca89SAndroid Build Coastguard Workeruid_t geteuid:geteuid() lp64 36*8d67ca89SAndroid Build Coastguard Workergid_t getegid:getegid32() lp32 37*8d67ca89SAndroid Build Coastguard Workergid_t getegid:getegid() lp64 38*8d67ca89SAndroid Build Coastguard Workeruid_t getresuid:getresuid32(uid_t* ruid, uid_t* euid, uid_t* suid) lp32 39*8d67ca89SAndroid Build Coastguard Workeruid_t getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) lp64 40*8d67ca89SAndroid Build Coastguard Workergid_t getresgid:getresgid32(gid_t* rgid, gid_t* egid, gid_t* sgid) lp32 41*8d67ca89SAndroid Build Coastguard Workergid_t getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) lp64 42*8d67ca89SAndroid Build Coastguard Workerint getgroups:getgroups32(int, gid_t*) lp32 43*8d67ca89SAndroid Build Coastguard Workerint getgroups:getgroups(int, gid_t*) lp64 44*8d67ca89SAndroid Build Coastguard Workerint setgid:setgid32(gid_t) lp32 45*8d67ca89SAndroid Build Coastguard Workerint setgid:setgid(gid_t) lp64 46*8d67ca89SAndroid Build Coastguard Workerint setuid:setuid32(uid_t) lp32 47*8d67ca89SAndroid Build Coastguard Workerint setuid:setuid(uid_t) lp64 48*8d67ca89SAndroid Build Coastguard Workerint setreuid:setreuid32(uid_t, uid_t) lp32 49*8d67ca89SAndroid Build Coastguard Workerint setreuid:setreuid(uid_t, uid_t) lp64 50*8d67ca89SAndroid Build Coastguard Workerint setresuid:setresuid32(uid_t, uid_t, uid_t) lp32 51*8d67ca89SAndroid Build Coastguard Workerint setresuid:setresuid(uid_t, uid_t, uid_t) lp64 52*8d67ca89SAndroid Build Coastguard Workerint setresgid:setresgid32(gid_t, gid_t, gid_t) lp32 53*8d67ca89SAndroid Build Coastguard Workerint setresgid:setresgid(gid_t, gid_t, gid_t) lp64 54*8d67ca89SAndroid Build Coastguard Workerint setfsgid:setfsgid32(gid_t) lp32 55*8d67ca89SAndroid Build Coastguard Workerint setfsgid:setfsgid(gid_t) lp64 56*8d67ca89SAndroid Build Coastguard Workerint setfsuid:setfsuid32(uid_t) lp32 57*8d67ca89SAndroid Build Coastguard Workerint setfsuid:setfsuid(uid_t) lp64 58*8d67ca89SAndroid Build Coastguard Worker 59*8d67ca89SAndroid Build Coastguard Workerssize_t readahead(int, off64_t, size_t) all 60*8d67ca89SAndroid Build Coastguard Workerpid_t getpgid(pid_t) all 61*8d67ca89SAndroid Build Coastguard Workerpid_t getppid() all 62*8d67ca89SAndroid Build Coastguard Workerpid_t getsid(pid_t) all 63*8d67ca89SAndroid Build Coastguard Workerpid_t setsid() all 64*8d67ca89SAndroid Build Coastguard Workerint kill(pid_t, int) all 65*8d67ca89SAndroid Build Coastguard Workerint tgkill(pid_t tgid, pid_t tid, int sig) all 66*8d67ca89SAndroid Build Coastguard Worker 67*8d67ca89SAndroid Build Coastguard Workervoid* __brk:brk(void*) all 68*8d67ca89SAndroid Build Coastguard Workerint execve(const char*, char* const*, char* const*) all 69*8d67ca89SAndroid Build Coastguard Workerint __ptrace:ptrace(int request, int pid, void* addr, void* data) all 70*8d67ca89SAndroid Build Coastguard Worker 71*8d67ca89SAndroid Build Coastguard Worker# <sys/resource.h> 72*8d67ca89SAndroid Build Coastguard Workerint getrusage(int, struct rusage*) all 73*8d67ca89SAndroid Build Coastguard Workerint __getpriority:getpriority(int, id_t) all 74*8d67ca89SAndroid Build Coastguard Workerint setpriority(int, id_t, int) all 75*8d67ca89SAndroid Build Coastguard Worker# On LP64, rlimit and rlimit64 are the same. 76*8d67ca89SAndroid Build Coastguard Worker# On 32-bit systems we use prlimit64 to implement the rlimit64 functions. 77*8d67ca89SAndroid Build Coastguard Workerint getrlimit:ugetrlimit(int, struct rlimit*) lp32 78*8d67ca89SAndroid Build Coastguard Workerint getrlimit|getrlimit64(int, struct rlimit*) lp64 79*8d67ca89SAndroid Build Coastguard Workerint setrlimit(int, const struct rlimit*) lp32 80*8d67ca89SAndroid Build Coastguard Workerint setrlimit|setrlimit64(int, const struct rlimit*) lp64 81*8d67ca89SAndroid Build Coastguard Workerint prlimit64|prlimit(pid_t, int, struct rlimit64*, const struct rlimit64*) lp64 82*8d67ca89SAndroid Build Coastguard Workerint prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) lp32 83*8d67ca89SAndroid Build Coastguard Worker 84*8d67ca89SAndroid Build Coastguard Workerint setgroups:setgroups32(int, const gid_t*) lp32 85*8d67ca89SAndroid Build Coastguard Workerint setgroups:setgroups(int, const gid_t*) lp64 86*8d67ca89SAndroid Build Coastguard Workerint setpgid(pid_t, pid_t) all 87*8d67ca89SAndroid Build Coastguard Workerint setregid:setregid32(gid_t, gid_t) lp32 88*8d67ca89SAndroid Build Coastguard Workerint setregid:setregid(gid_t, gid_t) lp64 89*8d67ca89SAndroid Build Coastguard Workerint chroot(const char*) all 90*8d67ca89SAndroid Build Coastguard Workerint prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all 91*8d67ca89SAndroid Build Coastguard Workerint capget(cap_user_header_t header, cap_user_data_t data) all 92*8d67ca89SAndroid Build Coastguard Workerint capset(cap_user_header_t header, const cap_user_data_t data) all 93*8d67ca89SAndroid Build Coastguard Workerint sigaltstack(const stack_t*, stack_t*) all 94*8d67ca89SAndroid Build Coastguard Workerint acct(const char* filepath) all 95*8d67ca89SAndroid Build Coastguard Worker 96*8d67ca89SAndroid Build Coastguard Worker# file descriptors 97*8d67ca89SAndroid Build Coastguard Workerssize_t read(int, void*, size_t) all 98*8d67ca89SAndroid Build Coastguard Workerssize_t write(int, const void*, size_t) all 99*8d67ca89SAndroid Build Coastguard Workerssize_t pread64(int, void*, size_t, off64_t) lp32 100*8d67ca89SAndroid Build Coastguard Workerssize_t pread64|pread(int, void*, size_t, off_t) lp64 101*8d67ca89SAndroid Build Coastguard Workerssize_t pwrite64(int, void*, size_t, off64_t) lp32 102*8d67ca89SAndroid Build Coastguard Workerssize_t pwrite64|pwrite(int, void*, size_t, off_t) lp64 103*8d67ca89SAndroid Build Coastguard Worker 104*8d67ca89SAndroid Build Coastguard Worker# On LP32, preadv/pwritev don't use off64_t --- they use pairs of 32-bit 105*8d67ca89SAndroid Build Coastguard Worker# arguments to avoid problems on architectures like arm32 where 64-bit arguments 106*8d67ca89SAndroid Build Coastguard Worker# must be in a register pair starting with an even-numbered register. 107*8d67ca89SAndroid Build Coastguard Worker# See linux/fs/read_write.c and https://lwn.net/Articles/311630/. 108*8d67ca89SAndroid Build Coastguard Worker# Note that there's an unused always-0 second long even on LP64! 109*8d67ca89SAndroid Build Coastguard Workerssize_t __preadv64:preadv(int, const struct iovec*, int, long, long) all 110*8d67ca89SAndroid Build Coastguard Workerssize_t __pwritev64:pwritev(int, const struct iovec*, int, long, long) all 111*8d67ca89SAndroid Build Coastguard Workerssize_t __preadv64v2:preadv2(int, const struct iovec*, int, long, long, int) all 112*8d67ca89SAndroid Build Coastguard Workerssize_t __pwritev64v2:pwritev2(int, const struct iovec*, int, long, long, int) all 113*8d67ca89SAndroid Build Coastguard Worker 114*8d67ca89SAndroid Build Coastguard Workerint __close:close(int) all 115*8d67ca89SAndroid Build Coastguard Workerint close_range(unsigned int, unsigned int, int) all 116*8d67ca89SAndroid Build Coastguard Workerssize_t copy_file_range(int, off64_t*, int, off64_t*, size_t, unsigned int) all 117*8d67ca89SAndroid Build Coastguard Workerpid_t __getpid:getpid() all 118*8d67ca89SAndroid Build Coastguard Workerint memfd_create(const char*, unsigned) all 119*8d67ca89SAndroid Build Coastguard Workerint munmap(void*, size_t) all 120*8d67ca89SAndroid Build Coastguard Workerint msync(const void*, size_t, int) all 121*8d67ca89SAndroid Build Coastguard Workerint mprotect(const void*, size_t, int) all 122*8d67ca89SAndroid Build Coastguard Workerint madvise(void*, size_t, int) all 123*8d67ca89SAndroid Build Coastguard Workerssize_t process_madvise(int, const struct iovec*, size_t, int, unsigned int) all 124*8d67ca89SAndroid Build Coastguard Workerint mlock(const void* addr, size_t len) all 125*8d67ca89SAndroid Build Coastguard Workerint mlock2(const void* addr, size_t len, int flags) all 126*8d67ca89SAndroid Build Coastguard Workerint munlock(const void* addr, size_t len) all 127*8d67ca89SAndroid Build Coastguard Workerint mlockall(int flags) all 128*8d67ca89SAndroid Build Coastguard Workerint mseal(void*, size_t, unsigned long) lp64 129*8d67ca89SAndroid Build Coastguard Workerint munlockall() all 130*8d67ca89SAndroid Build Coastguard Workerint mincore(void* start, size_t length, unsigned char* vec) all 131*8d67ca89SAndroid Build Coastguard Workerint __ioctl:ioctl(int, int, void*) all 132*8d67ca89SAndroid Build Coastguard Workerssize_t readv(int, const struct iovec*, int) all 133*8d67ca89SAndroid Build Coastguard Workerssize_t writev(int, const struct iovec*, int) all 134*8d67ca89SAndroid Build Coastguard Workerint __fcntl64:fcntl64(int, int, void*) lp32 135*8d67ca89SAndroid Build Coastguard Workerint __fcntl:fcntl(int, int, void*) lp64 136*8d67ca89SAndroid Build Coastguard Workerint flock(int, int) all 137*8d67ca89SAndroid Build Coastguard Workerint __fchmod:fchmod(int, mode_t) all 138*8d67ca89SAndroid Build Coastguard Workerint __pipe2:pipe2(int*, int) all 139*8d67ca89SAndroid Build Coastguard Workerint __dup:dup(int) all 140*8d67ca89SAndroid Build Coastguard Workerint __dup3:dup3(int, int, int) all 141*8d67ca89SAndroid Build Coastguard Workerint fsync(int) all 142*8d67ca89SAndroid Build Coastguard Workerint fdatasync(int) all 143*8d67ca89SAndroid Build Coastguard Workerint fchown:fchown32(int, uid_t, gid_t) lp32 144*8d67ca89SAndroid Build Coastguard Workerint fchown:fchown(int, uid_t, gid_t) lp64 145*8d67ca89SAndroid Build Coastguard Workervoid sync(void) all 146*8d67ca89SAndroid Build Coastguard Workerint syncfs(int) all 147*8d67ca89SAndroid Build Coastguard Workerint __fsetxattr:fsetxattr(int, const char*, const void*, size_t, int) all 148*8d67ca89SAndroid Build Coastguard Workerssize_t __fgetxattr:fgetxattr(int, const char*, void*, size_t) all 149*8d67ca89SAndroid Build Coastguard Workerssize_t __flistxattr:flistxattr(int, char*, size_t) all 150*8d67ca89SAndroid Build Coastguard Workerint fremovexattr(int, const char*) all 151*8d67ca89SAndroid Build Coastguard Worker 152*8d67ca89SAndroid Build Coastguard Workerint __getdents64:getdents64(unsigned int, struct dirent*, unsigned int) all 153*8d67ca89SAndroid Build Coastguard Worker 154*8d67ca89SAndroid Build Coastguard Workerint __openat:openat(int, const char*, int, mode_t) all 155*8d67ca89SAndroid Build Coastguard Workerint __faccessat:faccessat(int, const char*, int) all 156*8d67ca89SAndroid Build Coastguard Workerint __fchmodat:fchmodat(int, const char*, mode_t) all 157*8d67ca89SAndroid Build Coastguard Workerint fchownat(int, const char*, uid_t, gid_t, int) all 158*8d67ca89SAndroid Build Coastguard Workerint fstatat64|fstatat:fstatat64(int, const char*, struct stat*, int) lp32 159*8d67ca89SAndroid Build Coastguard Workerint fstatat64|fstatat:newfstatat(int, const char*, struct stat*, int) lp64 160*8d67ca89SAndroid Build Coastguard Workerint linkat(int, const char*, int, const char*, int) all 161*8d67ca89SAndroid Build Coastguard Workerint mkdirat(int, const char*, mode_t) all 162*8d67ca89SAndroid Build Coastguard Workerint mknodat(int, const char*, mode_t, dev_t) all 163*8d67ca89SAndroid Build Coastguard Workerssize_t readlinkat(int, const char*, char*, size_t) all 164*8d67ca89SAndroid Build Coastguard Workerint renameat2(int, const char*, int, const char*, unsigned) all 165*8d67ca89SAndroid Build Coastguard Workerint symlinkat(const char*, int, const char*) all 166*8d67ca89SAndroid Build Coastguard Workerint unlinkat(int, const char*, int) all 167*8d67ca89SAndroid Build Coastguard Workerint utimensat(int, const char*, const struct timespec times[2], int) all 168*8d67ca89SAndroid Build Coastguard Worker 169*8d67ca89SAndroid Build Coastguard Worker# Paired off_t/off64_t system calls. On 64-bit systems, 170*8d67ca89SAndroid Build Coastguard Worker# sizeof(off_t) == sizeof(off64_t), so there we emit two symbols that are 171*8d67ca89SAndroid Build Coastguard Worker# aliases. On 32-bit systems, we have two different system calls. 172*8d67ca89SAndroid Build Coastguard Worker# That means that every system call in this section should take three lines. 173*8d67ca89SAndroid Build Coastguard Workeroff_t lseek(int, off_t, int) lp32 174*8d67ca89SAndroid Build Coastguard Workerint __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) lp32 175*8d67ca89SAndroid Build Coastguard Workeroff_t lseek|lseek64(int, off_t, int) lp64 176*8d67ca89SAndroid Build Coastguard Workerssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) lp32 177*8d67ca89SAndroid Build Coastguard Workerssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) lp32 178*8d67ca89SAndroid Build Coastguard Workerssize_t sendfile|sendfile64(int out_fd, int in_fd, off_t* offset, size_t count) lp64 179*8d67ca89SAndroid Build Coastguard Workerint truncate(const char*, off_t) lp32 180*8d67ca89SAndroid Build Coastguard Workerint truncate64(const char*, off64_t) lp32 181*8d67ca89SAndroid Build Coastguard Workerint truncate|truncate64(const char*, off_t) lp64 182*8d67ca89SAndroid Build Coastguard Worker# (fallocate only gets two lines because there is no 32-bit variant.) 183*8d67ca89SAndroid Build Coastguard Workerint fallocate64:fallocate(int, int, off64_t, off64_t) lp32 184*8d67ca89SAndroid Build Coastguard Workerint fallocate|fallocate64(int, int, off_t, off_t) lp64 185*8d67ca89SAndroid Build Coastguard Worker# (ftruncate only gets two lines because 32-bit bionic only uses the 64-bit call.) 186*8d67ca89SAndroid Build Coastguard Workerint ftruncate64(int, off64_t) lp32 187*8d67ca89SAndroid Build Coastguard Workerint ftruncate|ftruncate64(int, off_t) lp64 188*8d67ca89SAndroid Build Coastguard Worker# (mmap only gets two lines because 32-bit bionic only uses the 64-bit call.) 189*8d67ca89SAndroid Build Coastguard Workervoid* __mmap2:mmap2(void*, size_t, int, int, int, long) lp32 190*8d67ca89SAndroid Build Coastguard Workervoid* mmap|mmap64(void*, size_t, int, int, int, off_t) lp64 191*8d67ca89SAndroid Build Coastguard Worker 192*8d67ca89SAndroid Build Coastguard Worker# mremap is in C++ for 32-bit so we can add the PTRDIFF_MAX check. 193*8d67ca89SAndroid Build Coastguard Workervoid* __mremap:mremap(void*, size_t, size_t, int, void*) lp32 194*8d67ca89SAndroid Build Coastguard Workervoid* mremap(void*, size_t, size_t, int, void*) lp64 195*8d67ca89SAndroid Build Coastguard Worker 196*8d67ca89SAndroid Build Coastguard Worker# posix_fadvise64 is awkward: arm has shuffled arguments, 197*8d67ca89SAndroid Build Coastguard Worker# the POSIX functions don't set errno, and no architecture has posix_fadvise. 198*8d67ca89SAndroid Build Coastguard Workerint __arm_fadvise64_64:arm_fadvise64_64(int, int, off64_t, off64_t) arm 199*8d67ca89SAndroid Build Coastguard Workerint __fadvise64:fadvise64_64(int, off64_t, off64_t, int) x86 200*8d67ca89SAndroid Build Coastguard Workerint __fadvise64:fadvise64(int, off64_t, off64_t, int) lp64 201*8d67ca89SAndroid Build Coastguard Worker 202*8d67ca89SAndroid Build Coastguard Workerint __fstatfs64:fstatfs64(int, size_t, struct statfs*) lp32 203*8d67ca89SAndroid Build Coastguard Workerint __fstatfs:fstatfs(int, struct statfs*) lp64 204*8d67ca89SAndroid Build Coastguard Workerint __statfs64:statfs64(const char*, size_t, struct statfs*) lp32 205*8d67ca89SAndroid Build Coastguard Workerint __statfs:statfs(const char*, struct statfs*) lp64 206*8d67ca89SAndroid Build Coastguard Worker 207*8d67ca89SAndroid Build Coastguard Workerint fstat64|fstat:fstat64(int, struct stat*) lp32 208*8d67ca89SAndroid Build Coastguard Workerint fstat64|fstat:fstat(int, struct stat*) lp64 209*8d67ca89SAndroid Build Coastguard Worker 210*8d67ca89SAndroid Build Coastguard Worker# file system 211*8d67ca89SAndroid Build Coastguard Workerint chdir(const char*) all 212*8d67ca89SAndroid Build Coastguard Workerint mount(const char*, const char*, const char*, unsigned long, const void*) all 213*8d67ca89SAndroid Build Coastguard Workerint umount2(const char*, int) all 214*8d67ca89SAndroid Build Coastguard Workerint __getcwd:getcwd(char* buf, size_t size) all 215*8d67ca89SAndroid Build Coastguard Workerint fchdir(int) all 216*8d67ca89SAndroid Build Coastguard Workerint setxattr(const char*, const char*, const void*, size_t, int) all 217*8d67ca89SAndroid Build Coastguard Workerint lsetxattr(const char*, const char*, const void*, size_t, int) all 218*8d67ca89SAndroid Build Coastguard Workerssize_t getxattr(const char*, const char*, void*, size_t) all 219*8d67ca89SAndroid Build Coastguard Workerssize_t lgetxattr(const char*, const char*, void*, size_t) all 220*8d67ca89SAndroid Build Coastguard Workerssize_t listxattr(const char*, char*, size_t) all 221*8d67ca89SAndroid Build Coastguard Workerssize_t llistxattr(const char*, char*, size_t) all 222*8d67ca89SAndroid Build Coastguard Workerint removexattr(const char*, const char*) all 223*8d67ca89SAndroid Build Coastguard Workerint lremovexattr(const char*, const char*) all 224*8d67ca89SAndroid Build Coastguard Workerint statx(int, const char*, int, unsigned, struct statx*) all 225*8d67ca89SAndroid Build Coastguard Workerint swapon(const char*, int) all 226*8d67ca89SAndroid Build Coastguard Workerint swapoff(const char*) all 227*8d67ca89SAndroid Build Coastguard Worker 228*8d67ca89SAndroid Build Coastguard Worker# time 229*8d67ca89SAndroid Build Coastguard Workerint settimeofday(const struct timeval*, const struct timezone*) all 230*8d67ca89SAndroid Build Coastguard Workerclock_t times(struct tms*) all 231*8d67ca89SAndroid Build Coastguard Workerint nanosleep(const struct timespec*, struct timespec*) all 232*8d67ca89SAndroid Build Coastguard Workerint clock_settime(clockid_t, const struct timespec*) all 233*8d67ca89SAndroid Build Coastguard Workerint __clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all 234*8d67ca89SAndroid Build Coastguard Workerint getitimer(int, struct itimerval*) all 235*8d67ca89SAndroid Build Coastguard Workerint setitimer(int, const struct itimerval*, struct itimerval*) all 236*8d67ca89SAndroid Build Coastguard Workerint __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, __kernel_timer_t* timerid) all 237*8d67ca89SAndroid Build Coastguard Workerint __timer_settime:timer_settime(__kernel_timer_t, int, const struct itimerspec*, struct itimerspec*) all 238*8d67ca89SAndroid Build Coastguard Workerint __timer_gettime:timer_gettime(__kernel_timer_t, struct itimerspec*) all 239*8d67ca89SAndroid Build Coastguard Workerint __timer_getoverrun:timer_getoverrun(__kernel_timer_t) all 240*8d67ca89SAndroid Build Coastguard Workerint __timer_delete:timer_delete(__kernel_timer_t) all 241*8d67ca89SAndroid Build Coastguard Workerint timerfd_create(clockid_t, int) all 242*8d67ca89SAndroid Build Coastguard Workerint timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*) all 243*8d67ca89SAndroid Build Coastguard Workerint timerfd_gettime(int, struct itimerspec*) all 244*8d67ca89SAndroid Build Coastguard Workerint adjtimex(struct timex*) all 245*8d67ca89SAndroid Build Coastguard Workerint clock_adjtime(clockid_t, struct timex*) all 246*8d67ca89SAndroid Build Coastguard Worker 247*8d67ca89SAndroid Build Coastguard Worker# signals 248*8d67ca89SAndroid Build Coastguard Workerint __sigaction:sigaction(int, const struct sigaction*, struct sigaction*) lp32 249*8d67ca89SAndroid Build Coastguard Workerint __rt_sigaction:rt_sigaction(int, const struct sigaction*, struct sigaction*, size_t) all 250*8d67ca89SAndroid Build Coastguard Workerint __rt_sigpending:rt_sigpending(sigset64_t*, size_t) all 251*8d67ca89SAndroid Build Coastguard Workerint __rt_sigprocmask:rt_sigprocmask(int, const sigset64_t*, sigset64_t*, size_t) all 252*8d67ca89SAndroid Build Coastguard Workerint __rt_sigsuspend:rt_sigsuspend(const sigset64_t*, size_t) all 253*8d67ca89SAndroid Build Coastguard Workerint __rt_sigtimedwait:rt_sigtimedwait(const sigset64_t*, siginfo_t*, const timespec*, size_t) all 254*8d67ca89SAndroid Build Coastguard Workerint __rt_sigqueueinfo:rt_sigqueueinfo(pid_t, int, siginfo_t*) all 255*8d67ca89SAndroid Build Coastguard Workerint __signalfd4:signalfd4(int, const sigset64_t*, size_t, int) all 256*8d67ca89SAndroid Build Coastguard Worker 257*8d67ca89SAndroid Build Coastguard Worker# sockets 258*8d67ca89SAndroid Build Coastguard Workerint __socket:socket(int, int, int) arm,lp64 259*8d67ca89SAndroid Build Coastguard Workerint __socketpair:socketpair(int, int, int, int*) arm,lp64 260*8d67ca89SAndroid Build Coastguard Workerint bind(int, struct sockaddr*, socklen_t) arm,lp64 261*8d67ca89SAndroid Build Coastguard Workerint __connect:connect(int, struct sockaddr*, socklen_t) arm,lp64 262*8d67ca89SAndroid Build Coastguard Workerint listen(int, int) arm,lp64 263*8d67ca89SAndroid Build Coastguard Workerint __accept4:accept4(int, struct sockaddr*, socklen_t*, int) arm,lp64 264*8d67ca89SAndroid Build Coastguard Workerint getsockname(int, struct sockaddr*, socklen_t*) arm,lp64 265*8d67ca89SAndroid Build Coastguard Workerint getpeername(int, struct sockaddr*, socklen_t*) arm,lp64 266*8d67ca89SAndroid Build Coastguard Workerssize_t __sendto:sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,lp64 267*8d67ca89SAndroid Build Coastguard Workerssize_t recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,lp64 268*8d67ca89SAndroid Build Coastguard Workerint shutdown(int, int) arm,lp64 269*8d67ca89SAndroid Build Coastguard Workerint setsockopt(int, int, int, const void*, socklen_t) arm,lp64 270*8d67ca89SAndroid Build Coastguard Workerint getsockopt(int, int, int, void*, socklen_t*) arm,lp64 271*8d67ca89SAndroid Build Coastguard Workerssize_t __recvmsg:recvmsg(int, struct msghdr*, unsigned int) arm,lp64 272*8d67ca89SAndroid Build Coastguard Workerssize_t __sendmsg:sendmsg(int, const struct msghdr*, unsigned int) arm,lp64 273*8d67ca89SAndroid Build Coastguard Workerint __recvmmsg:recvmmsg(int, struct mmsghdr*, unsigned int, int, const struct timespec*) arm,lp64 274*8d67ca89SAndroid Build Coastguard Workerint __sendmmsg:sendmmsg(int, struct mmsghdr*, unsigned int, int) arm,lp64 275*8d67ca89SAndroid Build Coastguard Worker 276*8d67ca89SAndroid Build Coastguard Worker# sockets for x86. These are done as an "indexed" call to socketcall syscall. 277*8d67ca89SAndroid Build Coastguard Workerint __socket:socketcall:1(int, int, int) x86 278*8d67ca89SAndroid Build Coastguard Workerint bind:socketcall:2(int, struct sockaddr*, int) x86 279*8d67ca89SAndroid Build Coastguard Workerint __connect:socketcall:3(int, struct sockaddr*, socklen_t) x86 280*8d67ca89SAndroid Build Coastguard Workerint listen:socketcall:4(int, int) x86 281*8d67ca89SAndroid Build Coastguard Workerint getsockname:socketcall:6(int, struct sockaddr*, socklen_t*) x86 282*8d67ca89SAndroid Build Coastguard Workerint getpeername:socketcall:7(int, struct sockaddr*, socklen_t*) x86 283*8d67ca89SAndroid Build Coastguard Workerint __socketpair:socketcall:8(int, int, int, int*) x86 284*8d67ca89SAndroid Build Coastguard Workerssize_t __sendto:socketcall:11(int, const void*, size_t, int, const struct sockaddr*, socklen_t) x86 285*8d67ca89SAndroid Build Coastguard Workerssize_t recvfrom:socketcall:12(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) x86 286*8d67ca89SAndroid Build Coastguard Workerint shutdown:socketcall:13(int, int) x86 287*8d67ca89SAndroid Build Coastguard Workerint setsockopt:socketcall:14(int, int, int, const void*, socklen_t) x86 288*8d67ca89SAndroid Build Coastguard Workerint getsockopt:socketcall:15(int, int, int, void*, socklen_t*) x86 289*8d67ca89SAndroid Build Coastguard Workerint __sendmsg:socketcall:16(int, const struct msghdr*, unsigned int) x86 290*8d67ca89SAndroid Build Coastguard Workerint __recvmsg:socketcall:17(int, struct msghdr*, unsigned int) x86 291*8d67ca89SAndroid Build Coastguard Workerint __accept4:socketcall:18(int, struct sockaddr*, socklen_t*, int) x86 292*8d67ca89SAndroid Build Coastguard Workerint __recvmmsg:socketcall:19(int, struct mmsghdr*, unsigned int, int, const struct timespec*) x86 293*8d67ca89SAndroid Build Coastguard Workerint __sendmmsg:socketcall:20(int, struct mmsghdr*, unsigned int, int) x86 294*8d67ca89SAndroid Build Coastguard Worker 295*8d67ca89SAndroid Build Coastguard Worker# scheduler & real-time 296*8d67ca89SAndroid Build Coastguard Workerint sched_setscheduler(pid_t pid, int policy, const struct sched_param* param) all 297*8d67ca89SAndroid Build Coastguard Workerint sched_getscheduler(pid_t pid) all 298*8d67ca89SAndroid Build Coastguard Workerint sched_yield(void) all 299*8d67ca89SAndroid Build Coastguard Workerint sched_setparam(pid_t pid, const struct sched_param* param) all 300*8d67ca89SAndroid Build Coastguard Workerint sched_getparam(pid_t pid, struct sched_param* param) all 301*8d67ca89SAndroid Build Coastguard Workerint sched_get_priority_max(int policy) all 302*8d67ca89SAndroid Build Coastguard Workerint sched_get_priority_min(int policy) all 303*8d67ca89SAndroid Build Coastguard Workerint sched_rr_get_interval(pid_t pid, struct timespec* interval) all 304*8d67ca89SAndroid Build Coastguard Workerint sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) all 305*8d67ca89SAndroid Build Coastguard Workerint setns(int, int) all 306*8d67ca89SAndroid Build Coastguard Workerint unshare(int) all 307*8d67ca89SAndroid Build Coastguard Workerint __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) all 308*8d67ca89SAndroid Build Coastguard Workerint __getcpu:getcpu(unsigned*, unsigned*, void*) all 309*8d67ca89SAndroid Build Coastguard Worker 310*8d67ca89SAndroid Build Coastguard Worker# other 311*8d67ca89SAndroid Build Coastguard Workerint uname(struct utsname*) all 312*8d67ca89SAndroid Build Coastguard Workermode_t umask(mode_t) all 313*8d67ca89SAndroid Build Coastguard Workerint __reboot:reboot(int, int, int, void*) all 314*8d67ca89SAndroid Build Coastguard Workerint init_module(void*, unsigned long, const char*) all 315*8d67ca89SAndroid Build Coastguard Workerint delete_module(const char*, unsigned int) all 316*8d67ca89SAndroid Build Coastguard Workerint klogctl:syslog(int, char*, int) all 317*8d67ca89SAndroid Build Coastguard Workerint sysinfo(struct sysinfo*) all 318*8d67ca89SAndroid Build Coastguard Workerint personality(unsigned long) all 319*8d67ca89SAndroid Build Coastguard Worker 320*8d67ca89SAndroid Build Coastguard Workerint bpf(int, union bpf_attr *, unsigned int) all 321*8d67ca89SAndroid Build Coastguard Worker 322*8d67ca89SAndroid Build Coastguard Workerssize_t tee(int, int, size_t, unsigned int) all 323*8d67ca89SAndroid Build Coastguard Workerssize_t splice(int, off64_t*, int, off64_t*, size_t, unsigned int) all 324*8d67ca89SAndroid Build Coastguard Workerssize_t vmsplice(int, const struct iovec*, size_t, unsigned int) all 325*8d67ca89SAndroid Build Coastguard Worker 326*8d67ca89SAndroid Build Coastguard Workerint __epoll_create1:epoll_create1(int) all 327*8d67ca89SAndroid Build Coastguard Workerint epoll_ctl(int, int op, int, struct epoll_event*) all 328*8d67ca89SAndroid Build Coastguard Workerint __epoll_pwait:epoll_pwait(int, struct epoll_event*, int, int, const sigset64_t*, size_t) all 329*8d67ca89SAndroid Build Coastguard Workerint __epoll_pwait2:epoll_pwait2(int, struct epoll_event*, int, const timespec64*, const sigset64_t*, size_t) all 330*8d67ca89SAndroid Build Coastguard Worker 331*8d67ca89SAndroid Build Coastguard Workerint __eventfd:eventfd2(unsigned int, int) all 332*8d67ca89SAndroid Build Coastguard Worker 333*8d67ca89SAndroid Build Coastguard Workervoid _exit|_Exit:exit_group(int) all 334*8d67ca89SAndroid Build Coastguard Workervoid __exit:exit(int) all 335*8d67ca89SAndroid Build Coastguard Worker 336*8d67ca89SAndroid Build Coastguard Workerint inotify_init1(int) all 337*8d67ca89SAndroid Build Coastguard Workerint inotify_add_watch(int, const char*, unsigned int) all 338*8d67ca89SAndroid Build Coastguard Workerint inotify_rm_watch(int, unsigned int) all 339*8d67ca89SAndroid Build Coastguard Worker 340*8d67ca89SAndroid Build Coastguard Workerint __pselect6:pselect6(int, fd_set*, fd_set*, fd_set*, timespec*, void*) all 341*8d67ca89SAndroid Build Coastguard Workerint __ppoll:ppoll(pollfd*, unsigned int, timespec*, const sigset64_t*, size_t) all 342*8d67ca89SAndroid Build Coastguard Worker 343*8d67ca89SAndroid Build Coastguard Workerssize_t process_vm_readv(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all 344*8d67ca89SAndroid Build Coastguard Workerssize_t process_vm_writev(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all 345*8d67ca89SAndroid Build Coastguard Worker 346*8d67ca89SAndroid Build Coastguard Workerint quotactl(int, const char*, int, char*) all 347*8d67ca89SAndroid Build Coastguard Worker 348*8d67ca89SAndroid Build Coastguard Workerint __set_tid_address:set_tid_address(int*) all 349*8d67ca89SAndroid Build Coastguard Worker 350*8d67ca89SAndroid Build Coastguard Workerint setdomainname(const char*, size_t) all 351*8d67ca89SAndroid Build Coastguard Workerint sethostname(const char*, size_t) all 352*8d67ca89SAndroid Build Coastguard Worker 353*8d67ca89SAndroid Build Coastguard Workerint sync_file_range(int, off64_t, off64_t, unsigned int) x86,lp64 354*8d67ca89SAndroid Build Coastguard Workerint __sync_file_range2:sync_file_range2(int, unsigned int, off64_t, off64_t) arm 355*8d67ca89SAndroid Build Coastguard Worker 356*8d67ca89SAndroid Build Coastguard Workerpid_t wait4(pid_t, int*, int, struct rusage*) all 357*8d67ca89SAndroid Build Coastguard Workerint __waitid:waitid(int, pid_t, siginfo_t*, int, void*) all 358*8d67ca89SAndroid Build Coastguard Worker 359*8d67ca89SAndroid Build Coastguard Worker# ARM-specific 360*8d67ca89SAndroid Build Coastguard Workerint __set_tls:__ARM_NR_set_tls(void*) arm 361*8d67ca89SAndroid Build Coastguard Workerint cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) arm 362*8d67ca89SAndroid Build Coastguard Worker 363*8d67ca89SAndroid Build Coastguard Worker# riscv64-specific 364*8d67ca89SAndroid Build Coastguard Workerint __riscv_flush_icache:riscv_flush_icache(void*, void*, unsigned long) riscv64 365*8d67ca89SAndroid Build Coastguard Worker 366*8d67ca89SAndroid Build Coastguard Worker# x86-specific 367*8d67ca89SAndroid Build Coastguard Workerint __set_thread_area:set_thread_area(void*) x86 368*8d67ca89SAndroid Build Coastguard Workerlong arch_prctl(int, unsigned long) x86_64 369*8d67ca89SAndroid Build Coastguard Worker 370*8d67ca89SAndroid Build Coastguard Worker# vdso stuff. 371*8d67ca89SAndroid Build Coastguard Workerint __clock_getres:clock_getres(clockid_t, struct timespec*) all 372*8d67ca89SAndroid Build Coastguard Workerint __clock_gettime:clock_gettime(clockid_t, struct timespec*) all 373*8d67ca89SAndroid Build Coastguard Workerint __gettimeofday:gettimeofday(struct timeval*, struct timezone*) all 374*8d67ca89SAndroid Build Coastguard Worker 375*8d67ca89SAndroid Build Coastguard Worker# <sys/random.h> 376*8d67ca89SAndroid Build Coastguard Workerssize_t getrandom(void*, size_t, unsigned) all 377*8d67ca89SAndroid Build Coastguard Worker 378*8d67ca89SAndroid Build Coastguard Worker# <sys/pidfd.h> 379*8d67ca89SAndroid Build Coastguard Workerint __pidfd_open:pidfd_open(pid_t, unsigned int) all 380*8d67ca89SAndroid Build Coastguard Workerint __pidfd_getfd:pidfd_getfd(int, int, unsigned int) all 381*8d67ca89SAndroid Build Coastguard Workerint pidfd_send_signal(int, int, siginfo_t*, unsigned int) all 382