Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 1 | # This file is used to automatically generate bionic's the system calls stubs. |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 2 | # |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 3 | # Each non comment line has the following format: |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 4 | # |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 5 | # return_type func_name[:syscall_name[:call_id]]([parameter_list]) (1|-1|"stub") |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 6 | # |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 7 | # Note that: |
| 8 | # - 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] | 9 | # the exported function name (example: the exit syscall is implemented by the _exit() |
| 10 | # function, which is not the same as the standard C exit() function which calls it) |
| 11 | # The call_id parameter, given that func_name and syscall_name have |
| 12 | # been provided, allows the user to specify dispatch style syscalls. |
| 13 | # For example, socket() syscall on i386 actually becomes: |
| 14 | # socketcall(__NR_socket, 1, *(rest of args on stack)). |
| 15 | # |
| 16 | # - each parameter type is assumed to be stored on 32 bits, there is no plan to support |
| 17 | # 64-bit architectures at the moment |
| 18 | # |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 19 | # - the final field can be "1", meaning: generate a stub for each architecture, |
| 20 | # taking the constants from the kernel header files. |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | # |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 22 | # - the final field can be "stub" meaning: do not generate any stubs --- |
| 23 | # in this case, a hand-written custom stub must be provided. |
| 24 | # TODO: replace this with something like "custom" or "none", or remove |
| 25 | # it entirely. |
| 26 | # |
| 27 | # - the final field can be a three-element list of 1s and -1 meaning: |
| 28 | # this system call is only available on some of the architectures (1), |
| 29 | # and no stub should be generated for those architectures marked with -1. |
| 30 | # the order is arm,x86,mips. |
| 31 | # TODO: replace this with something more readable like "-arm,-mips" (meaning x86 only). |
Shin-ichiro KAWASAKI | ce0595d | 2009-09-01 19:03:06 +0900 | [diff] [blame] | 32 | # |
Elliott Hughes | 0493a6f | 2013-03-07 11:48:58 -0800 | [diff] [blame] | 33 | # This file is processed by a python script named gensyscalls.py. |
| 34 | # |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 35 | |
| 36 | # process management |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 37 | void _exit:exit_group (int) 1 |
David 'Digit' Turner | 70b1668 | 2012-01-30 17:17:58 +0100 | [diff] [blame] | 38 | void _exit_thread:exit (int) 1 |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 39 | pid_t __fork:fork (void) 1 |
| 40 | pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,1,1 |
| 41 | int __waitid:waitid(int, pid_t, struct siginfo_t*, int,void*) 1 |
| 42 | pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage) 1 |
David 'Digit' Turner | 97cf7f3 | 2010-01-22 18:59:05 -0800 | [diff] [blame] | 43 | |
| 44 | # NOTE: this system call is never called directly, but we list it there |
| 45 | # to have __NR_clone properly defined. |
| 46 | # |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 47 | pid_t __sys_clone:clone (int, void*, int*, void*, int*) 1 |
David 'Digit' Turner | 97cf7f3 | 2010-01-22 18:59:05 -0800 | [diff] [blame] | 48 | |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 49 | int execve (const char*, char* const*, char* const*) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 50 | |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 51 | int __setuid:setuid32 (uid_t) 1,1,-1 |
| 52 | int __setuid:setuid (uid_t) -1,-1,1 |
| 53 | uid_t getuid:getuid32 () 1,1,-1 |
| 54 | uid_t getuid:getuid () -1,-1,1 |
| 55 | gid_t getgid:getgid32 () 1,1,-1 |
| 56 | gid_t getgid:getgid () -1,-1,1 |
| 57 | uid_t geteuid:geteuid32 () 1,1,-1 |
| 58 | uid_t geteuid:geteuid () -1,-1,1 |
| 59 | gid_t getegid:getegid32 () 1,1,-1 |
| 60 | gid_t getegid:getegid () -1,-1,1 |
| 61 | uid_t getresuid:getresuid32 (uid_t *ruid, uid_t *euid, uid_t *suid) 1,1,-1 |
| 62 | uid_t getresuid:getresuid (uid_t *ruid, uid_t *euid, uid_t *suid) -1,-1,1 |
| 63 | gid_t getresgid:getresgid32 (gid_t *rgid, gid_t *egid, gid_t *sgid) 1,1,-1 |
| 64 | gid_t getresgid:getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid) -1,-1,1 |
| 65 | pid_t gettid() 1 |
| 66 | ssize_t readahead(int, off64_t, size_t) 1 |
| 67 | int getgroups:getgroups32(int, gid_t *) 1,1,-1 |
| 68 | int getgroups:getgroups(int, gid_t *) -1,-1,1 |
| 69 | pid_t getpgid(pid_t) 1 |
| 70 | pid_t getppid() 1 |
| 71 | pid_t getsid(pid_t) 1 |
| 72 | pid_t setsid() 1 |
| 73 | int setgid:setgid32(gid_t) 1,1,-1 |
| 74 | int setgid:setgid(gid_t) -1,-1,1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 75 | int seteuid:seteuid32(uid_t) stub |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 76 | int __setreuid:setreuid32(uid_t, uid_t) 1,1,-1 |
| 77 | int __setreuid:setreuid(uid_t, uid_t) -1,-1,1 |
| 78 | int __setresuid:setresuid32(uid_t, uid_t, uid_t) 1,1,-1 |
| 79 | int __setresuid:setresuid(uid_t, uid_t, uid_t) -1,-1,1 |
| 80 | int setresgid:setresgid32(gid_t, gid_t, gid_t) 1,1,-1 |
| 81 | int setresgid:setresgid(gid_t, gid_t, gid_t) -1,-1,1 |
| 82 | void* __brk:brk(void*) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 83 | # see comments in arch-arm/bionic/kill.S to understand why we don't generate an ARM stub for kill/tkill |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 84 | int kill(pid_t, int) -1,1,1 |
| 85 | int tkill(pid_t tid, int sig) -1,1,1 |
| 86 | int tgkill(pid_t tgid, pid_t tid, int sig) -1,1,1 |
| 87 | int __ptrace:ptrace(int request, int pid, void* addr, void* data) 1 |
| 88 | int __set_thread_area:set_thread_area(void* user_desc) -1,1,1 |
| 89 | int __getpriority:getpriority(int, int) 1 |
| 90 | int setpriority(int, int, int) 1 |
| 91 | int setrlimit(int resource, const struct rlimit *rlp) 1 |
| 92 | int getrlimit:ugetrlimit(int resource, struct rlimit *rlp) 1,1,-1 |
| 93 | int getrlimit:getrlimit(int resource, struct rlimit *rlp) -1,-1,1 |
| 94 | int getrusage(int who, struct rusage* r_usage) 1 |
| 95 | int setgroups:setgroups32(int, const gid_t *) 1,1,-1 |
| 96 | int setgroups:setgroups(int, const gid_t *) -1,-1,1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 97 | pid_t getpgrp(void) stub |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 98 | int setpgid(pid_t, pid_t) 1 |
| 99 | pid_t vfork(void) 1,-1,-1 |
| 100 | int setregid:setregid32(gid_t, gid_t) 1,1,-1 |
| 101 | int setregid:setregid(gid_t, gid_t) -1,-1,1 |
| 102 | int chroot(const char *) 1 |
David 'Digit' Turner | b083bb5 | 2011-05-26 02:46:41 +0200 | [diff] [blame] | 103 | # IMPORTANT: Even though <sys/prctl.h> declares prctl(int,...), the syscall stub must take 6 arguments |
| 104 | # to match the kernel implementation. |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 105 | int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) 1 |
| 106 | int capget(cap_user_header_t header, cap_user_data_t data) 1 |
| 107 | int capset(cap_user_header_t header, const cap_user_data_t data) 1 |
| 108 | int sigaltstack(const stack_t*, stack_t*) 1 |
| 109 | int acct(const char* filepath) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 110 | |
| 111 | # file descriptors |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 112 | ssize_t read (int, void*, size_t) 1 |
| 113 | ssize_t write (int, const void*, size_t) 1 |
| 114 | ssize_t pread64 (int, void *, size_t, off64_t) 1 |
| 115 | ssize_t pwrite64 (int, void *, size_t, off64_t) 1 |
| 116 | int __open:open (const char*, int, mode_t) 1 |
| 117 | int __openat:openat (int, const char*, int, mode_t) 1 |
| 118 | int close (int) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 119 | int creat(const char*, mode_t) stub |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 120 | off_t lseek(int, off_t, int) 1 |
Elliott Hughes | b4f7616 | 2013-09-19 16:27:24 -0700 | [diff] [blame] | 121 | int __llseek:_llseek (int, unsigned long, unsigned long, off64_t*, int) 1 |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 122 | pid_t getpid () 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 123 | void * mmap(void *, size_t, int, int, int, long) stub |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 124 | void * __mmap2:mmap2(void*, size_t, int, int, int, long) 1 |
| 125 | int munmap(void *, size_t) 1 |
| 126 | void * mremap(void *, size_t, size_t, unsigned long) 1 |
| 127 | int msync(const void *, size_t, int) 1 |
| 128 | int mprotect(const void *, size_t, int) 1 |
| 129 | int madvise(const void *, size_t, int) 1 |
| 130 | int mlock(const void *addr, size_t len) 1 |
| 131 | int munlock(const void *addr, size_t len) 1 |
| 132 | int mlockall(int flags) 1 |
| 133 | int munlockall() 1 |
| 134 | int mincore(void* start, size_t length, unsigned char* vec) 1 |
| 135 | int __ioctl:ioctl(int, int, void *) 1 |
| 136 | int readv(int, const struct iovec *, int) 1 |
| 137 | int writev(int, const struct iovec *, int) 1 |
| 138 | int __fcntl:fcntl(int, int, void*) 1 |
| 139 | int flock(int, int) 1 |
| 140 | int fchmod(int, mode_t) 1 |
| 141 | int dup(int) 1 |
| 142 | int pipe(int *) 1,1,-1 |
| 143 | int pipe2(int *, int) 1 |
| 144 | int dup2(int, int) 1 |
| 145 | int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *) 1 |
| 146 | int ftruncate(int, off_t) 1 |
| 147 | int ftruncate64(int, off64_t) 1 |
| 148 | int getdents:getdents64(unsigned int, struct dirent *, unsigned int) 1 |
| 149 | int fsync(int) 1 |
| 150 | int fdatasync(int) 1 |
| 151 | int fchown:fchown32(int, uid_t, gid_t) 1,1,-1 |
| 152 | int fchown:fchown(int, uid_t, gid_t) -1,-1,1 |
| 153 | void sync(void) 1 |
| 154 | int __fcntl64:fcntl64(int, int, void *) 1 |
| 155 | int __fstatfs64:fstatfs64(int, size_t, struct statfs *) 1 |
Elliott Hughes | b4f7616 | 2013-09-19 16:27:24 -0700 | [diff] [blame] | 156 | ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) 1 |
| 157 | ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) 1 |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 158 | int fstatat:fstatat64(int dirfd, const char *path, struct stat *buf, int flags) 1 |
| 159 | int mkdirat(int dirfd, const char *pathname, mode_t mode) 1 |
| 160 | int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags) 1 |
| 161 | int fchmodat(int dirfd, const char *path, mode_t mode, int flags) 1 |
| 162 | int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath) 1 |
| 163 | int fsetxattr(int, const char *, const void *, size_t, int) 1 |
| 164 | ssize_t fgetxattr(int, const char *, void *, size_t) 1 |
| 165 | ssize_t flistxattr(int, char *, size_t) 1 |
| 166 | int fremovexattr(int, const char *) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 167 | |
| 168 | # file system |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 169 | int link (const char*, const char*) 1 |
| 170 | int unlink (const char*) 1 |
| 171 | int unlinkat (int, const char *, int) 1 |
| 172 | int chdir (const char*) 1 |
| 173 | int mknod (const char*, mode_t, dev_t) 1 |
| 174 | int chmod (const char*,mode_t) 1 |
| 175 | int chown:chown32(const char *, uid_t, gid_t) 1,1,-1 |
| 176 | int chown:chown(const char *, uid_t, gid_t) -1,-1,1 |
| 177 | int lchown:lchown32 (const char*, uid_t, gid_t) 1,1,-1 |
| 178 | int lchown:lchown (const char*, uid_t, gid_t) -1,-1,1 |
| 179 | int mount (const char*, const char*, const char*, unsigned long, const void*) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 180 | int umount(const char*) stub |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 181 | int umount2 (const char*, int) 1 |
| 182 | int fstat:fstat64(int, struct stat*) 1 |
| 183 | int stat:stat64(const char *, struct stat *) 1 |
| 184 | int lstat:lstat64(const char *, struct stat *) 1 |
| 185 | int mkdir(const char *, mode_t) 1 |
| 186 | int readlink(const char *, char *, size_t) 1 |
| 187 | int rmdir(const char *) 1 |
| 188 | int rename(const char *, const char *) 1 |
| 189 | int __getcwd:getcwd(char * buf, size_t size) 1 |
| 190 | int access(const char *, int) 1 |
| 191 | int faccessat(int, const char *, int, int) 1 |
| 192 | int symlink(const char *, const char *) 1 |
| 193 | int fchdir(int) 1 |
| 194 | int truncate(const char*, off_t) 1 |
Elliott Hughes | b4f7616 | 2013-09-19 16:27:24 -0700 | [diff] [blame] | 195 | int truncate64(const char*, off64_t) 1 |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 196 | int setxattr(const char *, const char *, const void *, size_t, int) 1 |
| 197 | int lsetxattr(const char *, const char *, const void *, size_t, int) 1 |
| 198 | ssize_t getxattr(const char *, const char *, void *, size_t) 1 |
| 199 | ssize_t lgetxattr(const char *, const char *, void *, size_t) 1 |
| 200 | ssize_t listxattr(const char *, char *, size_t) 1 |
| 201 | ssize_t llistxattr(const char *, char *, size_t) 1 |
| 202 | int removexattr(const char *, const char *) 1 |
| 203 | int lremovexattr(const char *, const char *) 1 |
| 204 | int __statfs64:statfs64(const char *, size_t, struct statfs *) 1 |
| 205 | long unshare(unsigned long) 1 |
Rom Lemarchand | d206b56 | 2013-06-06 14:29:40 -0700 | [diff] [blame] | 206 | int swapon(const char *, int) 1 |
| 207 | int swapoff(const char *) 1 |
Stephen Smalley | 5eb686d | 2012-01-13 07:45:16 -0500 | [diff] [blame] | 208 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 209 | # time |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 210 | int pause () 1 |
| 211 | int gettimeofday(struct timeval*, struct timezone*) 1 |
| 212 | int settimeofday(const struct timeval*, const struct timezone*) 1 |
| 213 | clock_t times(struct tms *) 1 |
| 214 | int nanosleep(const struct timespec *, struct timespec *) 1 |
| 215 | int clock_gettime(clockid_t clk_id, struct timespec *tp) 1 |
| 216 | int clock_settime(clockid_t clk_id, const struct timespec *tp) 1 |
| 217 | int clock_getres(clockid_t clk_id, struct timespec *res) 1 |
| 218 | int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *req, struct timespec *rem) 1 |
| 219 | int getitimer(int, const struct itimerval *) 1 |
| 220 | int setitimer(int, const struct itimerval *, struct itimerval *) 1 |
| 221 | int __timer_create:timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid) 1 |
| 222 | int __timer_settime:timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*) 1 |
| 223 | int __timer_gettime:timer_gettime(timer_t, struct itimerspec*) 1 |
| 224 | int __timer_getoverrun:timer_getoverrun(timer_t) 1 |
| 225 | int __timer_delete:timer_delete(timer_t) 1 |
| 226 | int utimes(const char*, const struct timeval tvp[2]) 1 |
| 227 | int utimensat(int, const char *, const struct timespec times[2], int) 1 |
Todd Poynor | 4200e62 | 2013-05-08 20:21:00 -0700 | [diff] [blame] | 228 | int timerfd_create(clockid_t, int) 1 |
| 229 | int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *) 1 |
| 230 | int timerfd_gettime(int, struct itimerspec *) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 231 | |
| 232 | # signals |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 233 | int sigaction(int, const struct sigaction *, struct sigaction *) 1 |
| 234 | int sigprocmask(int, const sigset_t *, sigset_t *) 1 |
| 235 | int __sigsuspend:sigsuspend(int unused1, int unused2, unsigned mask) 1,1,-1 |
| 236 | int __sigsuspend:sigsuspend(const sigset_t *mask) -1,-1,1 |
| 237 | int __rt_sigaction:rt_sigaction (int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize) 1 |
| 238 | int __rt_sigprocmask:rt_sigprocmask (int how, const sigset_t *set, sigset_t *oset, size_t sigsetsize) 1 |
| 239 | int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t *set, struct siginfo_t *info, struct timespec_t *timeout, size_t sigset_size) 1 |
| 240 | int sigpending(sigset_t *) 1 |
| 241 | int signalfd4(int fd, const sigset_t *mask, size_t sizemask, int flags) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 242 | |
| 243 | # sockets |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 244 | int socket(int, int, int) 1,-1,1 |
| 245 | int socketpair(int, int, int, int*) 1,-1,1 |
| 246 | int bind(int, struct sockaddr *, int) 1,-1,1 |
| 247 | int connect(int, struct sockaddr *, socklen_t) 1,-1,1 |
| 248 | int listen(int, int) 1,-1,1 |
| 249 | int accept(int, struct sockaddr *, socklen_t *) 1,-1,1 |
| 250 | int getsockname(int, struct sockaddr *, socklen_t *) 1,-1,1 |
| 251 | int getpeername(int, struct sockaddr *, socklen_t *) 1,-1,1 |
| 252 | int sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t) 1,-1,1 |
| 253 | int recvfrom(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) 1,-1,1 |
| 254 | int shutdown(int, int) 1,-1,1 |
| 255 | int setsockopt(int, int, int, const void *, socklen_t) 1,-1,1 |
| 256 | int getsockopt(int, int, int, void *, socklen_t *) 1,-1,1 |
| 257 | int sendmsg(int, const struct msghdr *, unsigned int) 1,-1,1 |
| 258 | int recvmsg(int, struct msghdr *, unsigned int) 1,-1,1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 259 | |
| 260 | # sockets for x86. These are done as an "indexed" call to socketcall syscall. |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 261 | int socket:socketcall:1 (int, int, int) -1,1,-1 |
| 262 | int bind:socketcall:2 (int, struct sockaddr *, int) -1,1,-1 |
| 263 | int connect:socketcall:3(int, struct sockaddr *, socklen_t) -1,1,-1 |
| 264 | int listen:socketcall:4(int, int) -1,1,-1 |
| 265 | int accept:socketcall:5(int, struct sockaddr *, socklen_t *) -1,1,-1 |
| 266 | int getsockname:socketcall:6(int, struct sockaddr *, socklen_t *) -1,1,-1 |
| 267 | int getpeername:socketcall:7(int, struct sockaddr *, socklen_t *) -1,1,-1 |
| 268 | int socketpair:socketcall:8(int, int, int, int*) -1,1,-1 |
| 269 | int sendto:socketcall:11(int, const void *, size_t, int, const struct sockaddr *, socklen_t) -1,1,-1 |
| 270 | int recvfrom:socketcall:12(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) -1,1,-1 |
| 271 | int shutdown:socketcall:13(int, int) -1,1,-1 |
| 272 | int setsockopt:socketcall:14(int, int, int, const void *, socklen_t) -1,1,-1 |
| 273 | int getsockopt:socketcall:15(int, int, int, void *, socklen_t *) -1,1,-1 |
| 274 | int sendmsg:socketcall:16(int, const struct msghdr *, unsigned int) -1,1,-1 |
| 275 | int recvmsg:socketcall:17(int, struct msghdr *, unsigned int) -1,1,-1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 276 | |
| 277 | # scheduler & real-time |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 278 | int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) 1 |
| 279 | int sched_getscheduler(pid_t pid) 1 |
| 280 | int sched_yield(void) 1 |
| 281 | int sched_setparam(pid_t pid, const struct sched_param *param) 1 |
| 282 | int sched_getparam(pid_t pid, struct sched_param *param) 1 |
| 283 | int sched_get_priority_max(int policy) 1 |
| 284 | int sched_get_priority_min(int policy) 1 |
| 285 | int sched_rr_get_interval(pid_t pid, struct timespec *interval) 1 |
| 286 | int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) 1 |
| 287 | int __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) 1 |
| 288 | int __getcpu:getcpu(unsigned *cpu, unsigned *node, void *unused) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 289 | |
San Mehat | 75c5e25 | 2010-02-23 15:55:29 -0800 | [diff] [blame] | 290 | # io priorities |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 291 | int ioprio_set(int which, int who, int ioprio) 1 |
| 292 | int ioprio_get(int which, int who) 1 |
San Mehat | 75c5e25 | 2010-02-23 15:55:29 -0800 | [diff] [blame] | 293 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 294 | # other |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 295 | int uname(struct utsname *) 1 |
| 296 | mode_t umask(mode_t) 1 |
| 297 | int __reboot:reboot(int, int, int, void *) 1 |
| 298 | int __syslog:syslog(int, char *, int) 1 |
| 299 | int init_module(void *, unsigned long, const char *) 1 |
| 300 | int delete_module(const char*, unsigned int) 1 |
| 301 | int klogctl:syslog(int, char *, int) 1 |
| 302 | int sysinfo(struct sysinfo *) 1 |
| 303 | int personality(unsigned long) 1 |
| 304 | long perf_event_open(struct perf_event_attr *attr_uptr, pid_t pid, int cpu, int group_fd, unsigned long flags) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 305 | |
| 306 | # futex |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 307 | int futex(void *, int, int, void *, void *, int) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 308 | |
| 309 | # epoll |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 310 | int epoll_create(int size) 1 |
| 311 | int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) 1 |
| 312 | int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 313 | |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 314 | int inotify_init(void) 1 |
| 315 | int inotify_add_watch(int, const char *, unsigned int) 1 |
| 316 | int inotify_rm_watch(int, unsigned int) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 317 | |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 318 | int poll(struct pollfd *, unsigned int, long) 1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 319 | |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 320 | int eventfd:eventfd2(unsigned int, int) 1 |
David 'Digit' Turner | defd162 | 2010-09-26 22:29:14 +0200 | [diff] [blame] | 321 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 322 | # ARM-specific ARM_NR_BASE == 0x0f0000 == 983040 |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 323 | int __set_tls:__ARM_NR_set_tls(void*) 1,-1,-1 |
| 324 | int cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) 1,-1,-1 |
Raghu Gandham | 1fa0d84 | 2012-01-27 17:51:42 -0800 | [diff] [blame] | 325 | |
| 326 | # MIPS-specific |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 327 | int _flush_cache:cacheflush(char *addr, const int nbytes, const int op) -1,-1,1 |
| 328 | int syscall(int number,...) -1,-1,1 |