chiark / gitweb /
klibc: update to version 1.1.1
[elogind.git] / klibc / klibc / SYSCALLS.def
1 ; -*- fundamental -*-
2 ;
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.
6 ;
7 ; The full description of a line is:
8 ; [<[?][!]arch,...>] type [sysname,...][@systype][::funcname](args)
9 ;
10 ; ? means only instantiate this system call if present in asm/unistd.h
11 ;
12
13 #include <asm/unistd.h>
14 #include <bitsize.h>
15
16 ;
17 ; Process-related syscalls
18 ;
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)
29 pid_t getpgid(pid_t)
30 <!alpha> pid_t getppid()
31 <alpha> pid_t getxpid@dual1::getppid()
32 pid_t setsid()
33 pid_t getsid(pid_t)
34 pid_t wait4(pid_t, int *, int, struct rusage *)
35 int execve(const char *, char * const *, char * const *)
36 <?> int nice(int)
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 *)
41 int sched_yield()
42
43 ;
44 ; User and group IDs
45 ;
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)
63
64 ;
65 ; Filesystem-related system calls
66 ;
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 *)
71 int sync()
72 #ifdef __NR_statfs64
73 int statfs64::__statfs64(const char *, size_t, struct statfs *)
74 #else
75 int statfs(const char *, struct statfs *)
76 #endif
77 #ifdef __NR_fstatfs64
78 int fstatfs64::__fstatfs64(int, size_t, struct statfs *)
79 #else
80 int fstatfs(int, struct statfs *)
81 #endif
82 int swapon(const char *, int)
83 int swapoff(const char *)
84
85 ;
86 ; Inode-related system calls
87 ;
88 int access(const char *, int)
89 int link(const char *, const char *)
90 int unlink(const char *)
91 int chdir(const char *)
92 int fchdir(int)
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 *)
100 mode_t umask(mode_t)
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)
120
121 ;
122 ; I/O operations
123 ;
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)
128 int close(int)
129 <64> off_t lseek(int, off_t, int)
130 <32> int _llseek::__llseek(int, unsigned long, unsigned long, off_t *, int)
131 int dup(int)
132 int dup2(int, 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 *)
137 int flock(int, int)
138 int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
139 int poll(struct pollfd *, nfds_t, long)
140 int fsync(int)
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)
147
148 ;
149 ; Signal operations
150 ;
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 *)
155 #else
156 int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t)
157 #endif
158 #ifdef __NR_sigsuspend
159 int sigsuspend(const sigset_t *)
160 #else
161 int rt_sigsuspend::__rt_sigsuspend(const sigset_t *, size_t)
162 #endif
163 #ifdef __NR_sigpending
164 int sigpending(sigset_t *)
165 #else
166 int rt_sigpending::__rt_sigpending(sigset_t *, size_t)
167 #endif
168 #ifdef __NR_sigprocmask
169 int sigprocmask(int, const sigset_t *, sigset_t *)
170 #else
171 int rt_sigprocmask::__rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t)
172 #endif
173 int kill(pid_t, int)
174 <?> unsigned int alarm(unsigned int)
175 int getitimer(int, struct itimerval *)
176 int setitimer(int, const struct itimerval *, struct itimerval *)
177
178 ;
179 ; Time-related system calls
180 ;
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 *)
186 <?> int pause()
187
188 ;
189 ; Memory
190 ;
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)
199 #else
200 <!s390x> void * mmap(void *, size_t, int, int, int, long)
201 #endif
202 int mlockall(int)
203 int munlockall()
204 int mlock(const void *, size_t)
205 int munlock(const void *, size_t)
206
207 ;
208 ; System stuff
209 ;
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 *)
218
219 ;
220 ; Low-level I/O (generally architecture-specific)
221 ;
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 *)
225
226 ;
227 ; Most architectures have the socket interfaces using regular
228 ; system calls.
229 ;
230 <?!i386> long socketcall::__socketcall(int, const unsigned long *)
231 #include "SOCKETCALLS.def"