syscalls.master revision 1.25 1 $NetBSD: syscalls.master,v 1.25 1998/09/11 12:50:09 mycroft Exp $
2
3 ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4
5 ; NetBSD COMPAT_LINUX system call name/number "master" file.
6 ; (See syscalls.conf to see what it is processed into.)
7 ;
8 ; Fields: number type [type-dependent ...]
9 ; number system call number, must be in order
10 ; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
11 ; the compatibility options defined in syscalls.conf.
12 ;
13 ; types:
14 ; STD always included
15 ; OBSOL obsolete, not included in system
16 ; UNIMPL unimplemented, not included in system
17 ; NODEF included, but don't define the syscall number
18 ; NOARGS included, but don't define the syscall args structure
19 ;
20 ; The compat options are defined in the syscalls.conf file, and the
21 ; compat option name is prefixed to the syscall name. Other than
22 ; that, they're like NODEF (for 'compat' options), or STD (for
23 ; 'libcompat' options).
24 ;
25 ; The type-dependent arguments are as follows:
26 ; For STD, NODEF, NOARGS, and compat syscalls:
27 ; { pseudo-proto } [alias]
28 ; For other syscalls:
29 ; [comment]
30 ;
31 ; #ifdef's, etc. may be included, and are copied to the output files.
32 ; #include's are copied to the syscall names and switch definition files only.
33
34 #include <sys/param.h>
35 #include <sys/systm.h>
36 #include <sys/signal.h>
37 #include <sys/mount.h>
38 #include <sys/syscallargs.h>
39
40 #include <compat/linux/linux_types.h>
41 #include <compat/linux/linux_signal.h>
42 #include <compat/linux/linux_syscallargs.h>
43
44 #include <machine/linux_machdep.h>
45
46 0 NOARGS { int sys_nosys(void); } syscall
47 1 NOARGS { int sys_exit(int rval); }
48 2 NOARGS { int sys_fork(void); }
49 3 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); }
50 4 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); }
51 5 STD { int linux_sys_open(char *path, int flags, int mode); }
52 6 NOARGS { int sys_close(int fd); }
53 7 STD { int linux_sys_waitpid(int pid, int *status, \
54 int options);}
55 8 STD { int linux_sys_creat(char *path, int mode); }
56 9 NOARGS { int sys_link(char *path, char *link); }
57 10 STD { int linux_sys_unlink(char *path); }
58 11 STD { int linux_sys_execve(char *path, char **argp, \
59 char **envp); }
60 12 STD { int linux_sys_chdir(char *path); }
61 13 STD { int linux_sys_time(linux_time_t *t); }
62 14 STD { int linux_sys_mknod(char *path, int mode, int dev); }
63 15 STD { int linux_sys_chmod(char *path, int mode); }
64 16 STD { int linux_sys_chown(char *path, int uid, int gid); }
65 17 STD { int linux_sys_break(char *nsize); }
66 18 OBSOL ostat
67 19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
68 int whence); }
69 20 NOARGS { pid_t sys_getpid(void); }
70 21 UNIMPL mount
71 22 UNIMPL umount
72 23 NOARGS { int sys_setuid(uid_t uid); }
73 24 NOARGS { uid_t sys_getuid(void); }
74 25 UNIMPL stime
75 26 UNIMPL ptrace
76 27 STD { int linux_sys_alarm(unsigned int secs); }
77 28 OBSOL ofstat
78 29 STD { int linux_sys_pause(void); }
79 30 STD { int linux_sys_utime(char *path, \
80 struct linux_utimbuf *times); }
81 31 UNIMPL stty
82 32 UNIMPL gtty
83 33 STD { int linux_sys_access(char *path, int flags); }
84 34 STD { int linux_sys_nice(int incr); }
85 35 UNIMPL ftime
86 36 NOARGS { int sys_sync(void); }
87 37 STD { int linux_sys_kill(int pid, int signum); }
88 38 STD { int linux_sys_rename(char *from, char *to); }
89 39 STD { int linux_sys_mkdir(char *path, int mode); }
90 40 STD { int linux_sys_rmdir(char *path); }
91 41 NOARGS { int sys_dup(u_int fd); }
92 42 STD { int linux_sys_pipe(int *pfds); }
93 43 STD { int linux_sys_times(struct times *tms); }
94 44 UNIMPL prof
95 45 STD { int linux_sys_brk(char *nsize); }
96 46 NOARGS { int sys_setgid(gid_t gid); }
97 47 NOARGS { gid_t sys_getgid(void); }
98 48 STD { int linux_sys_signal(int sig, \
99 linux_handler_t handler); }
100 49 NOARGS { uid_t sys_geteuid(void); }
101 50 NOARGS { gid_t sys_getegid(void); }
102 51 NOARGS { int sys_acct(char *path); }
103 52 UNIMPL phys
104 53 UNIMPL lock
105 54 STD { int linux_sys_ioctl(int fd, u_long com, \
106 caddr_t data); }
107 55 STD { int linux_sys_fcntl(int fd, int cmd, void *arg); }
108 56 UNIMPL mpx
109 57 NOARGS { int sys_setpgid(int pid, int pgid); }
110 58 UNIMPL ulimit
111 59 STD { int linux_sys_oldolduname(struct linux_oldold_utsname *up); }
112 60 NOARGS { int sys_umask(int newmask); }
113 61 NOARGS { int sys_chroot(char *path); }
114 62 UNIMPL ustat
115 63 NOARGS { int sys_dup2(u_int from, u_int to); }
116 64 NOARGS { pid_t sys_getppid(void); }
117 65 NOARGS { int sys_getpgrp(void); }
118 66 NOARGS { int sys_setsid(void); }
119 67 STD { int linux_sys_sigaction(int signum, \
120 const struct linux_sigaction *nsa, \
121 struct linux_sigaction *osa); }
122 68 STD { int linux_sys_siggetmask(void); }
123 69 STD { int linux_sys_sigsetmask(linux_sigset_t mask); }
124 70 STD { int linux_sys_setreuid(int ruid, int euid); }
125 71 STD { int linux_sys_setregid(int rgid, int egid); }
126 72 STD { int linux_sys_sigsuspend(caddr_t restart, \
127 int oldmask, int mask); }
128 73 STD { int linux_sys_sigpending( \
129 linux_sigset_t *set); }
130 74 NOARGS { int compat_43_sys_sethostname(char *hostname, \
131 u_int len);}
132 75 NOARGS { int compat_43_sys_setrlimit(u_int which, \
133 struct orlimit *rlp); }
134 76 NOARGS { int compat_43_sys_getrlimit(u_int which, \
135 struct orlimit *rlp); }
136 77 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
137 78 NOARGS { int sys_gettimeofday(struct timeval *tp, \
138 struct timezone *tzp); }
139 79 NOARGS { int sys_settimeofday(struct timeval *tp, \
140 struct timezone *tzp); }
141 80 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
142 81 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
143 82 STD { int linux_sys_oldselect(struct linux_select *lsp); }
144 83 STD { int linux_sys_symlink(char *path, char *to); }
145 84 NOARGS { int compat_43_sys_lstat(char *path, \
146 struct stat43 *up); } oolstat
147 85 STD { int linux_sys_readlink(char *name, char *buf, \
148 int count); }
149 86 STD { int linux_sys_uselib(char *path); }
150 87 NOARGS { int compat_12_sys_swapon(char *name); }
151 88 NOARGS { int sys_reboot(int opt); }
152 89 STD { int linux_sys_readdir(int fd, caddr_t dent, \
153 unsigned int count); }
154 90 STD { int linux_sys_mmap(struct linux_mmap *lmp); }
155 91 NOARGS { int sys_munmap(caddr_t addr, int len); }
156 92 STD { int linux_sys_truncate(char *path, long length); }
157 93 NOARGS { int compat_43_sys_ftruncate(int fd, long length); }
158 94 NOARGS { int sys_fchmod(int fd, int mode); }
159 95 STD { int linux_sys_fchown(int fd, int uid, int gid); }
160 96 NOARGS { int sys_getpriority(int which, int who); }
161 97 NOARGS { int sys_setpriority(int which, int who, int prio); }
162 98 NOARGS { int sys_profil(caddr_t samples, u_int size, \
163 u_int offset, u_int scale); }
164 99 STD { int linux_sys_statfs(char *path, \
165 struct linux_statfs *sp); }
166 100 STD { int linux_sys_fstatfs(int fd, \
167 struct linux_statfs *sp); }
168 #ifdef __i386__
169 101 STD { int linux_sys_ioperm(unsigned int lo, \
170 unsigned int hi, int val); }
171 #else
172 101 UNIMPL ioperm
173 #endif
174 102 STD { int linux_sys_socketcall(int what, void *args); }
175 103 UNIMPL klog
176 104 NOARGS { int sys_setitimer(u_int which, \
177 struct itimerval *itv, struct itimerval *oitv); }
178 105 NOARGS { int sys_getitimer(u_int which, \
179 struct itimerval *itv); }
180 106 STD { int linux_sys_stat(char *path, \
181 struct linux_stat *sp); }
182 107 STD { int linux_sys_lstat(char *path, \
183 struct linux_stat *sp); }
184 108 STD { int linux_sys_fstat(int fd, struct linux_stat *sp); }
185 109 STD { int linux_sys_olduname(struct linux_old_utsname *up); }
186 #ifdef __i386__
187 110 STD { int linux_sys_iopl(int level); }
188 #else
189 110 UNIMPL iopl
190 #endif
191 111 UNIMPL vhangup
192 112 UNIMPL idle
193 113 UNIMPL vm86
194 114 STD { int linux_sys_wait4(int pid, int *status, \
195 int options, struct rusage *rusage); }
196 115 UNIMPL swapoff
197 116 UNIMPL sysinfo
198 117 STD { int linux_sys_ipc(int what, int a1, int a2, int a3, \
199 caddr_t ptr); }
200 118 NOARGS { int sys_fsync(int fd); }
201 119 STD { int linux_sys_sigreturn(struct linux_sigcontext *scp); }
202 120 UNIMPL clone
203 121 NOARGS { int compat_09_sys_setdomainname(char *name, \
204 int len); }
205 122 STD { int linux_sys_uname(struct linux_utsname *up); }
206 #ifdef __i386__
207 123 STD { int linux_sys_modify_ldt(int func, void *ptr, \
208 size_t bytecount); }
209 #else
210 123 UNIMPL modify_ldt
211 #endif
212 124 UNIMPL adjtimex
213 125 NOARGS { int sys_mprotect(caddr_t addr, int len, int prot); }
214 126 STD { int linux_sys_sigprocmask(int how, \
215 const linux_sigset_t *set, \
216 linux_sigset_t *oset); }
217 127 UNIMPL create_module
218 128 UNIMPL init_module
219 129 UNIMPL delete_module
220 130 UNIMPL get_kernel_syms
221 131 UNIMPL quotactl
222 132 STD { int linux_sys_getpgid(int pid); }
223 133 NOARGS { int sys_fchdir(int fd); }
224 134 UNIMPL bdflush
225 135 UNIMPL sysfs
226 136 STD { int linux_sys_personality(int per); }
227 137 UNIMPL afs_syscall
228 138 UNIMPL setfsuid
229 139 UNIMPL getfsuid
230 140 STD { int linux_sys_llseek(int fd, u_int32_t ohigh, \
231 u_int32_t olow, caddr_t res, int whence); }
232 141 STD { int linux_sys_getdents(int fd, void *dirent, \
233 unsigned count); }
234 142 STD { int linux_sys_select(int nfds, fd_set *readfds, \
235 fd_set *writefds, fd_set *exceptfds, \
236 struct timeval *timeout); }
237 143 NOARGS { int sys_flock(int fd, int how); }
238 144 STD { int linux_sys_msync(caddr_t addr, int len, int fl); }
239 145 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
240 u_int iovcnt); }
241 146 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
242 u_int iovcnt); }
243 147 NOARGS { pid_t sys_getsid(pid_t pid); }
244 148 STD { int linux_sys_fdatasync(int fd); }
245 149 STD { int linux_sys___sysctl(struct linux___sysctl *lsp); }
246 150 NOARGS { int sys_mlock(caddr_t addr, size_t len); }
247 151 NOARGS { int sys_munlock(caddr_t addr, size_t len); }
248 152 UNIMPL mlockall
249 153 UNIMPL munlockall
250 154 UNIMPL sched_setparam
251 155 UNIMPL sched_getparam
252 156 UNIMPL sched_setscheduler
253 157 UNIMPL sched_getscheduler
254 158 UNIMPL sched_yield
255 159 UNIMPL sched_get_priority_max
256 160 UNIMPL sched_get_priority_min
257 161 UNIMPL sched_rr_get_interval
258 162 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
259 struct timespec *rmtp); }
260 163 STD { void *linux_sys_mremap(void *old_address, \
261 size_t old_size, size_t new_size, u_long flags); }
262