Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 1 | # This file is used to automatically generate bionic's system call stubs. |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 2 | # |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 3 | # Each non-blank, non-comment line has the following format: |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 4 | # |
H.J. Lu | 6fe4e87 | 2013-10-04 10:03:17 -0700 | [diff] [blame] | 5 | # return_type func_name[|alias_list][:syscall_name[:socketcall_id]]([parameter_list]) arch_list |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 6 | # |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 7 | # where: |
Elliott Hughes | c9da332 | 2013-10-15 18:18:58 -0700 | [diff] [blame] | 8 | # arch_list ::= "all" | arch+ |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 9 | # arch ::= "arm" | "arm64" | "mips" | "mips64" | "x86" | "x86_64" |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 10 | # |
| 11 | # Note: |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 12 | # - syscall_name corresponds to the name of the syscall, which may differ from |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 13 | # 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 Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 15 | # |
H.J. Lu | 6fe4e87 | 2013-10-04 10:03:17 -0700 | [diff] [blame] | 16 | # - alias_list is optional comma separated list of function aliases. |
| 17 | # |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 18 | # - The call_id parameter, given that func_name and syscall_name have |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | # 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 Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 23 | # - Each parameter type is assumed to be stored in 32 bits. |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 24 | # |
Elliott Hughes | 0493a6f | 2013-03-07 11:48:58 -0800 | [diff] [blame] | 25 | # This file is processed by a python script named gensyscalls.py. |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 26 | |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 27 | int execve(const char*, char* const*, char* const*) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 28 | |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 29 | uid_t getuid:getuid32() arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 30 | uid_t getuid:getuid() arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 31 | gid_t getgid:getgid32() arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 32 | gid_t getgid:getgid() arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 33 | uid_t geteuid:geteuid32() arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 34 | uid_t geteuid:geteuid() arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 35 | gid_t getegid:getegid32() arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 36 | gid_t getegid:getegid() arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 37 | uid_t getresuid:getresuid32(uid_t* ruid, uid_t* euid, uid_t* suid) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 38 | uid_t getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 39 | gid_t getresgid:getresgid32(gid_t* rgid, gid_t* egid, gid_t* sgid) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 40 | gid_t getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 41 | pid_t gettid() all |
| 42 | ssize_t readahead(int, off64_t, size_t) all |
| 43 | int getgroups:getgroups32(int, gid_t*) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 44 | int getgroups:getgroups(int, gid_t*) arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 45 | pid_t getpgid(pid_t) all |
| 46 | pid_t getppid() all |
| 47 | pid_t getsid(pid_t) all |
| 48 | pid_t setsid() all |
| 49 | int setgid:setgid32(gid_t) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 50 | int setgid:setgid(gid_t) arm64,mips,mips64,x86_64 |
Elliott Hughes | 232163c | 2013-10-09 17:35:36 -0700 | [diff] [blame] | 51 | int setuid:setuid32(uid_t) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 52 | int setuid:setuid(uid_t) arm64,mips,mips64,x86_64 |
Elliott Hughes | 232163c | 2013-10-09 17:35:36 -0700 | [diff] [blame] | 53 | int setreuid:setreuid32(uid_t, uid_t) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 54 | int setreuid:setreuid(uid_t, uid_t) arm64,mips,mips64,x86_64 |
Elliott Hughes | 232163c | 2013-10-09 17:35:36 -0700 | [diff] [blame] | 55 | int setresuid:setresuid32(uid_t, uid_t, uid_t) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 56 | int setresuid:setresuid(uid_t, uid_t, uid_t) arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 57 | int setresgid:setresgid32(gid_t, gid_t, gid_t) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 58 | int setresgid:setresgid(gid_t, gid_t, gid_t) arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 59 | void* __brk:brk(void*) all |
Christopher Ferris | ed45970 | 2013-12-02 17:44:53 -0800 | [diff] [blame] | 60 | int kill(pid_t, int) all |
| 61 | int tkill(pid_t tid, int sig) all |
| 62 | int tgkill(pid_t tgid, pid_t tid, int sig) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 63 | int __ptrace:ptrace(int request, int pid, void* addr, void* data) all |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 64 | int __set_thread_area:set_thread_area(void* user_desc) mips,mips64,x86 |
Elliott Hughes | 0f461e3 | 2014-01-09 10:17:03 -0800 | [diff] [blame] | 65 | |
| 66 | # <sys/resource.h> |
| 67 | int getrusage(int, struct rusage*) all |
| 68 | int __getpriority:getpriority(int, int) all |
| 69 | int setpriority(int, int, int) all |
| 70 | # On LP64, rlimit and rlimit64 are the same. |
| 71 | # On 32-bit systems we use prlimit64 to implement the rlimit64 functions. |
| 72 | int getrlimit:ugetrlimit(int, struct rlimit*) arm,x86 |
| 73 | int getrlimit(int, struct rlimit*) mips |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 74 | int getrlimit|getrlimit64(int, struct rlimit*) arm64,mips64,x86_64 |
Elliott Hughes | 0f461e3 | 2014-01-09 10:17:03 -0800 | [diff] [blame] | 75 | int setrlimit(int, const struct rlimit*) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 76 | int setrlimit|setrlimit64(int, const struct rlimit*) arm64,mips64,x86_64 |
| 77 | int prlimit64|prlimit(pid_t, int, struct rlimit64*, const struct rlimit64*) arm64,mips64,x86_64 |
Elliott Hughes | 0f461e3 | 2014-01-09 10:17:03 -0800 | [diff] [blame] | 78 | int prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) arm,mips,x86 |
| 79 | |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 80 | int setgroups:setgroups32(int, const gid_t*) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 81 | int setgroups:setgroups(int, const gid_t*) arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 82 | int setpgid(pid_t, pid_t) all |
Elliott Hughes | 9ea4d5f | 2013-10-18 18:21:11 -0700 | [diff] [blame] | 83 | pid_t vfork(void) arm |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 84 | int setregid:setregid32(gid_t, gid_t) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 85 | int setregid:setregid(gid_t, gid_t) arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 86 | int chroot(const char*) all |
| 87 | # IMPORTANT: Even though <sys/prctl.h> declares prctl(int, ...), the syscall stub must take 6 arguments |
David 'Digit' Turner | b083bb5 | 2011-05-26 02:46:41 +0200 | [diff] [blame] | 88 | # to match the kernel implementation. |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 89 | int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) all |
Elliott Hughes | 4906e56 | 2013-10-04 14:55:30 -0700 | [diff] [blame] | 90 | long __arch_prctl:arch_prctl(int, unsigned long) x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 91 | int capget(cap_user_header_t header, cap_user_data_t data) all |
| 92 | int capset(cap_user_header_t header, const cap_user_data_t data) all |
| 93 | int sigaltstack(const stack_t*, stack_t*) all |
| 94 | int acct(const char* filepath) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 95 | |
| 96 | # file descriptors |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 97 | ssize_t read(int, void*, size_t) all |
| 98 | ssize_t write(int, const void*, size_t) all |
Elliott Hughes | 8fbf8de | 2013-11-06 13:10:37 -0800 | [diff] [blame] | 99 | ssize_t pread64(int, void*, size_t, off64_t) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 100 | ssize_t pread64|pread(int, void*, size_t, off_t) arm64,mips64,x86_64 |
Elliott Hughes | 8fbf8de | 2013-11-06 13:10:37 -0800 | [diff] [blame] | 101 | ssize_t pwrite64(int, void*, size_t, off64_t) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 102 | ssize_t pwrite64|pwrite(int, void*, size_t, off_t) arm64,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 103 | int close(int) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 104 | pid_t getpid() all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 105 | int munmap(void*, size_t) all |
| 106 | void* mremap(void*, size_t, size_t, unsigned long) all |
| 107 | int msync(const void*, size_t, int) all |
| 108 | int mprotect(const void*, size_t, int) all |
| 109 | int madvise(const void*, size_t, int) all |
| 110 | int mlock(const void* addr, size_t len) all |
| 111 | int munlock(const void* addr, size_t len) all |
| 112 | int mlockall(int flags) all |
| 113 | int munlockall() all |
| 114 | int mincore(void* start, size_t length, unsigned char* vec) all |
| 115 | int __ioctl:ioctl(int, int, void*) all |
| 116 | int readv(int, const struct iovec*, int) all |
| 117 | int writev(int, const struct iovec*, int) all |
Elliott Hughes | 0620925 | 2013-11-06 16:20:54 -0800 | [diff] [blame] | 118 | int __fcntl64:fcntl64(int, int, void*) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 119 | int fcntl(int, int, void*) arm64,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 120 | int flock(int, int) all |
| 121 | int fchmod(int, mode_t) all |
| 122 | int dup(int) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 123 | int pipe2(int*, int) all |
Elliott Hughes | cac7b9d | 2013-10-23 09:48:29 -0700 | [diff] [blame] | 124 | int dup3(int, int, int) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 125 | int fsync(int) all |
| 126 | int fdatasync(int) all |
| 127 | int fchown:fchown32(int, uid_t, gid_t) arm,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 128 | int fchown:fchown(int, uid_t, gid_t) arm64,mips,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 129 | void sync(void) all |
Serban Constantinescu | feaa89a | 2013-10-07 16:49:09 +0100 | [diff] [blame] | 130 | int __fstatfs64:fstatfs64(int, size_t, struct statfs*) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 131 | int fstatfs(int, struct statfs*) arm64,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 132 | int fsetxattr(int, const char*, const void*, size_t, int) all |
| 133 | ssize_t fgetxattr(int, const char*, void*, size_t) all |
| 134 | ssize_t flistxattr(int, char*, size_t) all |
| 135 | int fremovexattr(int, const char*) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 136 | |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 137 | # mips64 doesn't have getdents64 until 3.10 kernels. |
| 138 | # We need this special-case hack as long as we need to support mips64 on older kernels. |
| 139 | # The currently-available Debian qemu image is on a 3.2 kernel. |
| 140 | int getdents:getdents64(unsigned int, struct dirent*, unsigned int) arm,arm64,mips,x86,x86_64 |
| 141 | int __getdents64:getdents64(unsigned int, struct dirent*, unsigned int) mips64 |
| 142 | int __getdents:getdents(unsigned int, void*, unsigned int) mips64 |
| 143 | |
Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 144 | int __openat:openat(int, const char*, int, mode_t) all |
| 145 | int faccessat(int, const char*, int, int) all |
| 146 | int fchmodat(int, const char*, mode_t, int) all |
| 147 | int fchownat(int, const char*, uid_t, gid_t, int) all |
Serban Constantinescu | feaa89a | 2013-10-07 16:49:09 +0100 | [diff] [blame] | 148 | int fstatat:fstatat64(int, const char*, struct stat*, int) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 149 | int fstatat:newfstatat(int, const char*, struct stat*, int) arm64,mips64,x86_64 |
Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 150 | int linkat(int, const char*, int, const char*, int) all |
| 151 | int mkdirat(int, const char*, mode_t) all |
| 152 | int mknodat(int, const char*, mode_t, dev_t) all |
| 153 | int readlinkat(int, const char*, char*, size_t) all |
| 154 | int renameat(int, const char*, int, const char*) all |
| 155 | int symlinkat(const char*, int, const char*) all |
| 156 | int unlinkat(int, const char*, int) all |
| 157 | int utimensat(int, const char*, const struct timespec times[2], int) all |
| 158 | |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 159 | # Paired off_t/off64_t system calls. On 64-bit systems, |
| 160 | # sizeof(off_t) == sizeof(off64_t), so there we emit two symbols that are |
| 161 | # aliases. On 32-bit systems, we have two different system calls. |
| 162 | # That means that every system call in this section should take three lines. |
| 163 | off_t lseek(int, off_t, int) arm,mips,x86 |
| 164 | int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 165 | off_t lseek|lseek64(int, off_t, int) arm64,mips64,x86_64 |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 166 | int ftruncate(int, off_t) arm,mips,x86 |
| 167 | int ftruncate64(int, off64_t) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 168 | int ftruncate|ftruncate64(int, off_t) arm64,mips64,x86_64 |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 169 | ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) arm,mips,x86 |
| 170 | ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 171 | ssize_t sendfile|sendfile64(int out_fd, int in_fd, off_t* offset, size_t count) arm64,mips64,x86_64 |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 172 | int truncate(const char*, off_t) arm,mips,x86 |
| 173 | int truncate64(const char*, off64_t) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 174 | int truncate|truncate64(const char*, off_t) arm64,mips64,x86_64 |
Serban Constantinescu | ed76a93 | 2013-12-12 09:36:27 +0000 | [diff] [blame] | 175 | # (mmap only gets two lines because we only used the 64-bit variant on 32-bit systems.) |
| 176 | void* __mmap2:mmap2(void*, size_t, int, int, int, long) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 177 | void* mmap|mmap64(void*, size_t, int, int, int, off_t) arm64,mips64,x86_64 |
Elliott Hughes | f64b8ea | 2014-02-03 16:20:46 -0800 | [diff] [blame] | 178 | # (fallocate only gets two lines because there is no 32-bit variant.) |
| 179 | int fallocate64:fallocate(int, int, off64_t, off64_t) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 180 | int fallocate|fallocate64(int, int, off_t, off_t) arm64,mips64,x86_64 |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 181 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 182 | # file system |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 183 | int chdir(const char*) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 184 | int mount(const char*, const char*, const char*, unsigned long, const void*) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 185 | int umount2(const char*, int) all |
Serban Constantinescu | feaa89a | 2013-10-07 16:49:09 +0100 | [diff] [blame] | 186 | int fstat:fstat64(int, struct stat*) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 187 | int fstat(int, struct stat*) arm64,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 188 | int __getcwd:getcwd(char* buf, size_t size) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 189 | int fchdir(int) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 190 | int setxattr(const char*, const char*, const void*, size_t, int) all |
| 191 | int lsetxattr(const char*, const char*, const void*, size_t, int) all |
| 192 | ssize_t getxattr(const char*, const char*, void*, size_t) all |
| 193 | ssize_t lgetxattr(const char*, const char*, void*, size_t) all |
| 194 | ssize_t listxattr(const char*, char*, size_t) all |
| 195 | ssize_t llistxattr(const char*, char*, size_t) all |
| 196 | int removexattr(const char*, const char*) all |
| 197 | int lremovexattr(const char*, const char*) all |
Serban Constantinescu | feaa89a | 2013-10-07 16:49:09 +0100 | [diff] [blame] | 198 | int __statfs64:statfs64(const char*, size_t, struct statfs*) arm,mips,x86 |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 199 | int statfs(const char*, struct statfs*) arm64,mips64,x86_64 |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 200 | int swapon(const char*, int) all |
| 201 | int swapoff(const char*) all |
Stephen Smalley | 5eb686d | 2012-01-13 07:45:16 -0500 | [diff] [blame] | 202 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 203 | # time |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 204 | int gettimeofday(struct timeval*, struct timezone*) all |
| 205 | int settimeofday(const struct timeval*, const struct timezone*) all |
| 206 | clock_t times(struct tms*) all |
| 207 | int nanosleep(const struct timespec*, struct timespec*) all |
| 208 | int clock_gettime(clockid_t clk_id, struct timespec* tp) all |
| 209 | int clock_settime(clockid_t clk_id, const struct timespec* tp) all |
| 210 | int clock_getres(clockid_t clk_id, struct timespec* res) all |
| 211 | int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec* req, struct timespec* rem) all |
| 212 | int getitimer(int, const struct itimerval*) all |
| 213 | int setitimer(int, const struct itimerval*, struct itimerval*) all |
| 214 | int __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, timer_t* timerid) all |
| 215 | int __timer_settime:timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*) all |
| 216 | int __timer_gettime:timer_gettime(timer_t, struct itimerspec*) all |
| 217 | int __timer_getoverrun:timer_getoverrun(timer_t) all |
| 218 | int __timer_delete:timer_delete(timer_t) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 219 | int timerfd_create(clockid_t, int) all |
| 220 | int timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*) all |
| 221 | int timerfd_gettime(int, struct itimerspec*) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 222 | |
| 223 | # signals |
Elliott Hughes | c7e9b23 | 2013-10-16 22:27:54 -0700 | [diff] [blame] | 224 | int __sigaction:sigaction(int, const struct sigaction*, struct sigaction*) arm,mips,x86 |
Elliott Hughes | 1f5af92 | 2013-10-15 18:01:56 -0700 | [diff] [blame] | 225 | int __rt_sigaction:rt_sigaction(int, const struct sigaction*, struct sigaction*, size_t) all |
Elliott Hughes | 40d105c | 2013-10-16 12:53:58 -0700 | [diff] [blame] | 226 | int __rt_sigpending:rt_sigpending(sigset_t*, size_t) all |
Elliott Hughes | 1f5af92 | 2013-10-15 18:01:56 -0700 | [diff] [blame] | 227 | int __rt_sigprocmask:rt_sigprocmask(int, const sigset_t*, sigset_t*, size_t) all |
| 228 | int __rt_sigsuspend:rt_sigsuspend(const sigset_t*, size_t) all |
| 229 | int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t*, struct siginfo_t*, struct timespec_t*, size_t) all |
| 230 | int signalfd4(int, const sigset_t*, size_t, int) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 231 | |
| 232 | # sockets |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 233 | int socket(int, int, int) arm,arm64,mips,mips64,x86_64 |
| 234 | int socketpair(int, int, int, int*) arm,arm64,mips,mips64,x86_64 |
| 235 | int bind(int, struct sockaddr*, int) arm,arm64,mips,mips64,x86_64 |
| 236 | int connect(int, struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64 |
| 237 | int listen(int, int) arm,arm64,mips,mips64,x86_64 |
| 238 | int accept(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64 |
| 239 | int getsockname(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64 |
| 240 | int getpeername(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64 |
| 241 | int sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64 |
| 242 | int recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64 |
| 243 | int shutdown(int, int) arm,arm64,mips,mips64,x86_64 |
| 244 | int setsockopt(int, int, int, const void*, socklen_t) arm,arm64,mips,mips64,x86_64 |
| 245 | int getsockopt(int, int, int, void*, socklen_t*) arm,arm64,mips,mips64,x86_64 |
| 246 | int sendmsg(int, const struct msghdr*, unsigned int) arm,arm64,mips,mips64,x86_64 |
| 247 | int recvmsg(int, struct msghdr*, unsigned int) arm,arm64,mips,mips64,x86_64 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 248 | |
| 249 | # sockets for x86. These are done as an "indexed" call to socketcall syscall. |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 250 | int socket:socketcall:1(int, int, int) x86 |
| 251 | int bind:socketcall:2(int, struct sockaddr*, int) x86 |
| 252 | int connect:socketcall:3(int, struct sockaddr*, socklen_t) x86 |
| 253 | int listen:socketcall:4(int, int) x86 |
| 254 | int accept:socketcall:5(int, struct sockaddr*, socklen_t*) x86 |
| 255 | int getsockname:socketcall:6(int, struct sockaddr*, socklen_t*) x86 |
| 256 | int getpeername:socketcall:7(int, struct sockaddr*, socklen_t*) x86 |
| 257 | int socketpair:socketcall:8(int, int, int, int*) x86 |
| 258 | int sendto:socketcall:11(int, const void*, size_t, int, const struct sockaddr*, socklen_t) x86 |
| 259 | int recvfrom:socketcall:12(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) x86 |
| 260 | int shutdown:socketcall:13(int, int) x86 |
| 261 | int setsockopt:socketcall:14(int, int, int, const void*, socklen_t) x86 |
| 262 | int getsockopt:socketcall:15(int, int, int, void*, socklen_t*) x86 |
| 263 | int sendmsg:socketcall:16(int, const struct msghdr*, unsigned int) x86 |
| 264 | int recvmsg:socketcall:17(int, struct msghdr*, unsigned int) x86 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 265 | |
| 266 | # scheduler & real-time |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 267 | int sched_setscheduler(pid_t pid, int policy, const struct sched_param* param) all |
| 268 | int sched_getscheduler(pid_t pid) all |
| 269 | int sched_yield(void) all |
| 270 | int sched_setparam(pid_t pid, const struct sched_param* param) all |
| 271 | int sched_getparam(pid_t pid, struct sched_param* param) all |
| 272 | int sched_get_priority_max(int policy) all |
| 273 | int sched_get_priority_min(int policy) all |
| 274 | int sched_rr_get_interval(pid_t pid, struct timespec* interval) all |
| 275 | int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) all |
Elliott Hughes | 887e114 | 2014-01-02 12:05:50 -0800 | [diff] [blame] | 276 | int setns(int, int) all |
| 277 | int unshare(int) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 278 | int __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) all |
Elliott Hughes | 887e114 | 2014-01-02 12:05:50 -0800 | [diff] [blame] | 279 | int __getcpu:getcpu(unsigned*, unsigned*, void*) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 280 | |
San Mehat | 75c5e25 | 2010-02-23 15:55:29 -0800 | [diff] [blame] | 281 | # io priorities |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 282 | int ioprio_set(int which, int who, int ioprio) all |
| 283 | int ioprio_get(int which, int who) all |
San Mehat | 75c5e25 | 2010-02-23 15:55:29 -0800 | [diff] [blame] | 284 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 285 | # other |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 286 | int uname(struct utsname*) all |
| 287 | mode_t umask(mode_t) all |
Elliott Hughes | 1f5af92 | 2013-10-15 18:01:56 -0700 | [diff] [blame] | 288 | int __reboot:reboot(int, int, int, void*) all |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 289 | int __syslog:syslog(int, char*, int) all |
| 290 | int init_module(void*, unsigned long, const char*) all |
| 291 | int delete_module(const char*, unsigned int) all |
| 292 | int klogctl:syslog(int, char*, int) all |
| 293 | int sysinfo(struct sysinfo*) all |
| 294 | int personality(unsigned long) all |
| 295 | long perf_event_open(struct perf_event_attr* attr_uptr, pid_t pid, int cpu, int group_fd, unsigned long flags) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 296 | |
Elliott Hughes | cac7b9d | 2013-10-23 09:48:29 -0700 | [diff] [blame] | 297 | int epoll_create1(int) all |
| 298 | int epoll_ctl(int, int op, int, struct epoll_event*) all |
Elliott Hughes | 1195207 | 2013-10-24 15:15:14 -0700 | [diff] [blame] | 299 | int __epoll_pwait:epoll_pwait(int, struct epoll_event*, int, int, const sigset_t*, size_t) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 300 | |
Elliott Hughes | cac7b9d | 2013-10-23 09:48:29 -0700 | [diff] [blame] | 301 | int eventfd:eventfd2(unsigned int, int) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 302 | |
Elliott Hughes | 6b53c23 | 2013-10-24 22:36:58 -0700 | [diff] [blame] | 303 | void _exit:exit_group(int) all |
| 304 | void __exit:exit(int) all |
| 305 | |
Elliott Hughes | cac7b9d | 2013-10-23 09:48:29 -0700 | [diff] [blame] | 306 | int futex(void*, int, int, void*, void*, int) all |
| 307 | |
| 308 | int inotify_init1(int) all |
| 309 | int inotify_add_watch(int, const char*, unsigned int) all |
| 310 | int inotify_rm_watch(int, unsigned int) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 311 | |
Elliott Hughes | 1195207 | 2013-10-24 15:15:14 -0700 | [diff] [blame] | 312 | int __pselect6:pselect6(int, fd_set*, fd_set*, fd_set*, timespec*, void*) all |
| 313 | int __ppoll:ppoll(pollfd*, unsigned int, timespec*, const sigset_t*, size_t) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 314 | |
Elliott Hughes | 36d6188 | 2013-11-19 13:31:58 -0800 | [diff] [blame] | 315 | int __set_tid_address:set_tid_address(int*) all |
| 316 | |
Elliott Hughes | 6b53c23 | 2013-10-24 22:36:58 -0700 | [diff] [blame] | 317 | pid_t wait4(pid_t, int*, int, struct rusage*) all |
| 318 | int __waitid:waitid(int, pid_t, struct siginfo_t*, int, void*) all |
| 319 | |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 320 | # ARM-specific |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 321 | int __set_tls:__ARM_NR_set_tls(void*) arm |
| 322 | int cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) arm |
Raghu Gandham | 1fa0d84 | 2012-01-27 17:51:42 -0800 | [diff] [blame] | 323 | |
| 324 | # MIPS-specific |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 325 | int _flush_cache:cacheflush(char* addr, const int nbytes, const int op) mips,mips64 |