3 ; This is a list of system calls we invoke "directly". These
4 ; are generated into syscall stubs in their own files, so the
5 ; linker can do its job properly.
7 ; The full description of a line is:
8 ; [<[?][!]arch,...>] type [sysname,...][@systype][::funcname](args)
10 ; ? means only instantiate this system call if present in asm/unistd.h
13 #include <asm/unistd.h>
17 ; Process-related syscalls
19 <!i386,x86_64> void _exit,exit::_exit(int)
20 <?!ia64> pid_t clone::__clone(unsigned long, void *)
21 <?ia64> pid_t clone::__clone2(unsigned long, void *, void *)
22 <?!sparc> pid_t fork()
23 <sparc> pid_t fork@forkish()
24 <!mips,mips64,sparc,ia64> pid_t vfork()
25 <sparc> pid_t vfork@forkish()
26 <!alpha> pid_t getpid()
27 <alpha> pid_t getxpid@dual0::getpid()
28 int setpgid(pid_t, pid_t)
30 <!alpha> pid_t getppid()
31 <alpha> pid_t getxpid@dual1::getppid()
34 pid_t wait4(pid_t, int *, int, struct rusage *)
35 int execve(const char *, char * const *, char * const *)
37 <alpha,ia64> int getpriority(int, int)
38 <!alpha,ia64> int getpriority::__getpriority(int, int)
39 int setpriority(int, int, int)
40 int sched_setscheduler(pid_t, int, const struct sched_param *)
46 int setuid32,setuid::setuid(uid_t)
47 int setgid32,setgid::setgid(gid_t)
48 <!alpha> uid_t getuid32,getuid::getuid()
49 <alpha> uid_t getxuid@dual0::getuid()
50 <!alpha> gid_t getgid32,getgid::getgid()
51 <alpha> gid_t getxgid@dual0::getgid()
52 <!alpha> uid_t geteuid32,geteuid::geteuid()
53 <alpha> uid_t getxuid@dual1::geteuid()
54 <!alpha> gid_t getegid32,getegid::getegid()
55 <alpha> gid_t getxgid@dual1::getegid()
56 int getgroups32,getgroups::getgroups(int, gid_t *)
57 int setgroups32,setgroups::setgroups(size_t, const gid_t *)
58 int setreuid32,setreuid::setreuid(uid_t, uid_t)
59 int setregid32,setregid::setregid(gid_t, gid_t)
60 int setfsuid32,setfsuid::setfsuid(uid_t)
61 int setfsgid32,setfsgid::setfsgid(gid_t)
62 int setresuid32,setresuid::setresuid(int, uid_t, uid, uid_t)
65 ; Filesystem-related system calls
67 int mount(const char *, const char *, const char *, unsigned long, const void *)
68 <!alpha,ia64> int umount2(const char *, int)
69 <alpha,ia64> int umount::umount2(const char *, int)
70 <?> int pivot_root(const char *, const char *)
73 int statfs64::__statfs64(const char *, size_t, struct statfs *)
75 int statfs(const char *, struct statfs *)
78 int fstatfs64::__fstatfs64(int, size_t, struct statfs *)
80 int fstatfs(int, struct statfs *)
82 int swapon(const char *, int)
83 int swapoff(const char *)
86 ; Inode-related system calls
88 int access(const char *, int)
89 int link(const char *, const char *)
90 int unlink(const char *)
91 int chdir(const char *)
93 int rename(const char *, const char *)
94 int mknod(const char *, mode_t, dev_t)
95 int chmod(const char *, mode_t)
96 int fchmod(int, mode_t)
97 int mkdir(const char *, mode_t)
98 int rmdir(const char *)
99 <!alpha,ia64,mips,mips64> int pipe(int *)
101 int chroot(const char *)
102 int symlink(const char *, const char *)
103 int readlink(const char *, char *, size_t)
104 <!ppc64> int stat64,stat::stat(const char *, struct stat *)
105 <!ppc64> int lstat64,lstat::lstat(const char *, struct stat *)
106 <!ppc64> int fstat64,fstat::fstat(int, struct stat *)
107 <ppc64> int stat::stat(const char *, struct stat *)
108 <ppc64> int lstat::lstat(const char *, struct stat *)
109 <ppc64> int fstat::fstat(int, struct stat *)
110 int getdents64,getdents::getdents(unsigned int, struct dirent *, unsigned int)
111 int chown32,chown::chown(const char *, uid_t, gid_t)
112 int fchown32,fchown::fchown(int, uid_t, gid_t)
113 int lchown32,lchown::lchown(const char *, uid_t, gid_t)
114 int getcwd::__getcwd(char *, size_t)
115 <?> int utime(const char *, const struct utimbuf *)
116 <?> int utimes(const char *, const struct timeval *)
117 <?> int inotify_init(void)
118 <?> int inotify_add_watch(int, const char *, __u32)
119 <?> int inotify_rm_watch(int, __u32)
124 <!i386,64> int open::__open(const char *, int, mode_t)
125 <64> int open(const char *, int, mode_t)
126 ssize_t read(int, void *, size_t)
127 ssize_t write(int, const void *, size_t)
129 <64> off_t lseek(int, off_t, int)
130 <32> int _llseek::__llseek(int, unsigned long, unsigned long, off_t *, int)
133 <i386> int fcntl64@varadic::fcntl(int, int, unsigned long)
134 <ppc64> int fcntl(int, int, unsigned long)
135 <!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long)
136 int ioctl(int, int, void *)
138 int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
139 int poll(struct pollfd *, nfds_t, long)
141 int fdatasync,fsync::fdatasync(int)
142 int readv(int, const struct iovec *, int)
143 int writev(int, const struct iovec *, int)
144 int ftruncate64,ftruncate::ftruncate(int, off_t)
145 ssize_t pread64,pread::pread(int, void *, size_t, off_t)
146 ssize_t pwrite64,pwrite::pwrite(int, void *, size_t, off_t)
151 ; We really should get rid of the non-rt_* of these, but that takes
152 ; sanitizing <signal.h> for all architectures, sigh.
153 #ifdef __NR_sigaction
154 int sigaction::__sigaction(int, const struct sigaction *, struct sigaction *)
156 int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t)
158 #ifdef __NR_sigsuspend
159 int sigsuspend(const sigset_t *)
161 int rt_sigsuspend::__rt_sigsuspend(const sigset_t *, size_t)
163 #ifdef __NR_sigpending
164 int sigpending(sigset_t *)
166 int rt_sigpending::__rt_sigpending(sigset_t *, size_t)
168 #ifdef __NR_sigprocmask
169 int sigprocmask(int, const sigset_t *, sigset_t *)
171 int rt_sigprocmask::__rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t)
174 <?> unsigned int alarm(unsigned int)
175 int getitimer(int, struct itimerval *)
176 int setitimer(int, const struct itimerval *, struct itimerval *)
179 ; Time-related system calls
181 <?> time_t time(time_t *)
182 clock_t times(struct tms *)
183 int gettimeofday(struct timeval *, struct timezone *)
184 int settimeofday(const struct timeval *, const struct timezone *)
185 int nanosleep(const struct timespec *, struct timespec *)
191 void * brk::__brk(void *)
192 int munmap(void *, size_t)
193 void * mremap(void *, size_t, size_t, unsigned long)
194 int msync(const void *, size_t, int)
195 int mprotect(const void *, size_t, int)
196 #if (_BITSIZE == 32 && defined(__NR_mmap2)) || \
197 (_BITSIZE == 64 && !defined(__NR_mmap))
198 <!s390> void * mmap2::__mmap2(void *, size_t, int, int, int, long)
200 <!s390x> void * mmap(void *, size_t, int, int, int, long)
204 int mlock(const void *, size_t)
205 int munlock(const void *, size_t)
210 int uname(struct utsname *)
211 int setdomainname(const char *, size_t)
212 int sethostname(const char *, size_t)
213 long init_module(void *, unsigned long, const char *)
214 long delete_module(const char *, unsigned int)
215 int reboot::__reboot(int, int, int, void *)
216 int syslog::klogctl(int, char *, int)
217 int sysinfo(struct sysinfo *)
220 ; Low-level I/O (generally architecture-specific)
222 <i386,x86_64> int iopl(int)
223 <i386,x86_64> int ioperm(unsigned long, unsigned long, int)
224 <i386> int vm86(struct vm86_struct *)
227 ; Most architectures have the socket interfaces using regular
230 <?!i386> long socketcall::__socketcall(int, const unsigned long *)
231 #include "SOCKETCALLS.def"