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