chiark / gitweb /
Merge gregkh@ehlo.org:/home/kay/public_html/pub/scm/linux/hotplug/udev-kay
[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
118 ;
119 ; I/O operations
120 ;
121 <!i386,64> int open::__open(const char *, int, mode_t)
122 <64> int open(const char *, int, mode_t)
123 ssize_t read(int, void *, size_t)
124 ssize_t write(int, const void *, size_t)
125 int close(int)
126 <64> off_t lseek(int, off_t, int)
127 <32> int _llseek::__llseek(int, unsigned long, unsigned long, off_t *, int)
128 int dup(int)
129 int dup2(int, int)
130 <i386> int fcntl64@varadic::fcntl(int, int, unsigned long)
131 <ppc64> int fcntl(int, int, unsigned long)
132 <!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long)
133 int ioctl(int, int, void *)
134 int flock(int, int)
135 int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
136 int poll(struct pollfd *, nfds_t, long)
137 int fsync(int)
138 int fdatasync,fsync::fdatasync(int)
139 int readv(int, const struct iovec *, int)
140 int writev(int, const struct iovec *, int)
141 int ftruncate64,ftruncate::ftruncate(int, off_t)
142 ssize_t pread64,pread::pread(int, void *, size_t, off_t)
143 ssize_t pwrite64,pwrite::pwrite(int, void *, size_t, off_t)
144
145 ;
146 ; Signal operations
147 ;
148 ; We really should get rid of the non-rt_* of these, but that takes
149 ; sanitizing <signal.h> for all architectures, sigh.
150 #ifdef __NR_sigaction
151 int sigaction::__sigaction(int, const struct sigaction *, struct sigaction *)
152 #else
153 int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t)
154 #endif
155 #ifdef __NR_sigsuspend
156 int sigsuspend(const sigset_t *)
157 #else
158 int rt_sigsuspend::__rt_sigsuspend(const sigset_t *, size_t)
159 #endif
160 #ifdef __NR_sigpending
161 int sigpending(sigset_t *)
162 #else
163 int rt_sigpending::__rt_sigpending(sigset_t *, size_t)
164 #endif
165 #ifdef __NR_sigprocmask
166 int sigprocmask(int, const sigset_t *, sigset_t *)
167 #else
168 int rt_sigprocmask::__rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t)
169 #endif
170 int kill(pid_t, int)
171 <?> unsigned int alarm(unsigned int)
172 int getitimer(int, struct itimerval *)
173 int setitimer(int, const struct itimerval *, struct itimerval *)
174
175 ;
176 ; Time-related system calls
177 ;
178 <?> time_t time(time_t *)
179 clock_t times(struct tms *)
180 int gettimeofday(struct timeval *, struct timezone *)
181 int settimeofday(const struct timeval *, const struct timezone *)
182 int nanosleep(const struct timespec *, struct timespec *)
183 <?> int pause()
184
185 ;
186 ; Memory
187 ;
188 void * brk::__brk(void *)
189 int munmap(void *, size_t)
190 void * mremap(void *, size_t, size_t, unsigned long)
191 int msync(const void *, size_t, int)
192 int mprotect(const void *, size_t, int)
193 #if (_BITSIZE == 32 && defined(__NR_mmap2)) || \
194     (_BITSIZE == 64 && !defined(__NR_mmap))
195 <!s390> void * mmap2::__mmap2(void *, size_t, int, int, int, long)
196 #else
197 <!s390x> void * mmap(void *, size_t, int, int, int, long)
198 #endif
199 int mlockall(int)
200 int munlockall()
201 int mlock(const void *, size_t)
202 int munlock(const void *, size_t)
203
204 ;
205 ; System stuff
206 ;
207 int uname(struct utsname *)
208 int setdomainname(const char *, size_t)
209 int sethostname(const char *, size_t)
210 long init_module(void *, unsigned long, const char *)
211 long delete_module(const char *, unsigned int)
212 int reboot::__reboot(int, int, int, void *)
213 int syslog::klogctl(int, char *, int)
214 int sysinfo(struct sysinfo *)
215
216 ;
217 ; Low-level I/O (generally architecture-specific)
218 ;
219 <i386,x86_64> int iopl(int)
220 <i386,x86_64> int ioperm(unsigned long, unsigned long, int)
221 <i386> int vm86(struct vm86_struct *)
222
223 ;
224 ; Most architectures have the socket interfaces using regular
225 ; system calls.
226 ;
227 <?!i386> long socketcall::__socketcall(int, const unsigned long *)
228 #include "SOCKETCALLS.def"