1 $NetBSD: syscalls.master,v 1.230 2009/11/26 09:00:45 pooka Exp $
3 ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
5 ; NetBSD system call name/number "master" file.
6 ; (See syscalls.conf to see what it is processed into.)
8 ; Fields: number type [type-dependent ...]
9 ; number system call number, must be in order
10 ; type one of STD, OBSOL, UNIMPL, IGNORED, NODEF, NOARGS, or one of
11 ; the compatibility options defined in syscalls.conf.
13 ; Optional fields are specified after the type field
14 ; (NOTE! they *must* be specified in this order):
15 ; MODULAR:attempt to autoload system call if not present
16 ; RUMP: the system call can be called directly from rumps
20 ; OBSOL obsolete, not included in system
21 ; IGNORED syscall is a null op, but always succeeds
22 ; UNIMPL unimplemented, not included in system
23 ; EXCL implemented, but not included in system
24 ; NODEF included, but don't define the syscall number
25 ; NOARGS included, but don't define the syscall args structure
26 ; INDIR included, but don't define the syscall args structure,
27 ; and allow it to be "really" varargs.
30 ; PAD argument not part of the C interface, used only for padding
32 ; The compat options are defined in the syscalls.conf file, and the
33 ; compat option name is prefixed to the syscall name. Other than
34 ; that, they're like NODEF (for 'compat' options), or STD (for
35 ; 'libcompat' options).
37 ; The type-dependent arguments are as follows:
38 ; For STD, NODEF, NOARGS, and compat syscalls:
39 ; { return_type|prefix|compat(optional)|basename(pseudo-proto); } [alias]
43 ; #ifdef's, etc. may be included, and are copied to the output files.
44 ; #include's are copied to the syscall names and switch definition files only.
46 #include "opt_modular.h"
52 #include <sys/param.h>
53 #include <sys/systm.h>
54 #include <sys/signal.h>
55 #include <sys/mount.h>
56 #include <sys/sched.h>
57 #include <sys/syscallargs.h>
61 ; Reserved/unimplemented system calls in the range 0-150 inclusive
62 ; are reserved for use in future Berkeley releases.
63 ; Additional system calls implemented in vendor and other
64 ; redistributions should be placed in the reserved range at the end
65 ; of the current calls.
67 0 INDIR { int|sys||syscall(int code, \
68 ... register_t args[SYS_MAXSYSARGS]); }
69 1 STD { void|sys||exit(int rval); }
70 2 STD { int|sys||fork(void); }
71 3 STD RUMP { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
72 4 STD RUMP { ssize_t|sys||write(int fd, const void *buf, \
74 5 STD RUMP { int|sys||open(const char *path, \
75 int flags, ... mode_t mode); }
76 6 STD RUMP { int|sys||close(int fd); }
77 7 COMPAT_50 MODULAR { int|sys||wait4(int pid, int *status, \
78 int options, struct rusage50 *rusage); }
79 8 COMPAT_43 MODULAR { int|sys||creat(const char *path, mode_t mode); } ocreat
80 9 STD RUMP { int|sys||link(const char *path, const char *link); }
81 10 STD RUMP { int|sys||unlink(const char *path); }
83 12 STD RUMP { int|sys||chdir(const char *path); }
84 13 STD RUMP { int|sys||fchdir(int fd); }
85 14 COMPAT_50 MODULAR { int|sys||mknod(const char *path, mode_t mode, \
87 15 STD RUMP { int|sys||chmod(const char *path, mode_t mode); }
88 16 STD RUMP { int|sys||chown(const char *path, uid_t uid, \
90 17 STD { int|sys||obreak(char *nsize); } break
91 18 COMPAT_20 MODULAR { int|sys||getfsstat(struct statfs12 *buf, \
92 long bufsize, int flags); }
93 19 COMPAT_43 MODULAR { long|sys||lseek(int fd, long offset, int whence); }\
95 20 STD { pid_t|sys||getpid_with_ppid(void); } getpid
96 21 COMPAT_40 MODULAR { int|sys||mount(const char *type, const char *path, \
97 int flags, void *data); }
98 22 STD RUMP { int|sys||unmount(const char *path, int flags); }
99 23 STD { int|sys||setuid(uid_t uid); }
100 24 STD { uid_t|sys||getuid_with_euid(void); } getuid
101 25 STD { uid_t|sys||geteuid(void); }
102 26 STD { int|sys||ptrace(int req, pid_t pid, void *addr, \
104 27 STD RUMP { ssize_t|sys||recvmsg(int s, struct msghdr *msg, \
106 28 STD RUMP { ssize_t|sys||sendmsg(int s, \
107 const struct msghdr *msg, int flags); }
108 29 STD RUMP { ssize_t|sys||recvfrom(int s, void *buf, size_t len, \
109 int flags, struct sockaddr *from, \
110 unsigned int *fromlenaddr); }
111 30 STD RUMP { int|sys||accept(int s, struct sockaddr *name, \
112 unsigned int *anamelen); }
113 31 STD RUMP { int|sys||getpeername(int fdes, struct sockaddr *asa, \
114 unsigned int *alen); }
115 32 STD RUMP { int|sys||getsockname(int fdes, struct sockaddr *asa, \
116 unsigned int *alen); }
117 33 STD RUMP { int|sys||access(const char *path, int flags); }
118 34 STD RUMP { int|sys||chflags(const char *path, u_long flags); }
119 35 STD RUMP { int|sys||fchflags(int fd, u_long flags); }
120 36 STD RUMP { void|sys||sync(void); }
121 37 STD { int|sys||kill(int pid, int signum); }
122 38 COMPAT_43 MODULAR { int|sys||stat(const char *path, struct stat43 *ub); } \
124 39 STD { pid_t|sys||getppid(void); }
125 40 COMPAT_43 MODULAR { int|sys||lstat(const char *path, \
126 struct stat43 *ub); } lstat43
127 41 STD RUMP { int|sys||dup(int fd); }
128 42 STD RUMP { int|sys||pipe(void); }
129 43 STD { gid_t|sys||getegid(void); }
130 44 STD { int|sys||profil(char *samples, size_t size, \
131 u_long offset, u_int scale); }
132 45 STD { int|sys||ktrace(const char *fname, int ops, \
133 int facs, int pid); }
134 46 COMPAT_13 MODULAR { int|sys||sigaction(int signum, \
135 const struct sigaction13 *nsa, \
136 struct sigaction13 *osa); } sigaction13
137 47 STD { gid_t|sys||getgid_with_egid(void); } getgid
138 48 COMPAT_13 MODULAR { int|sys||sigprocmask(int how, \
139 int mask); } sigprocmask13
140 49 STD { int|sys||__getlogin(char *namebuf, size_t namelen); }
141 50 STD { int|sys||__setlogin(const char *namebuf); }
142 51 STD { int|sys||acct(const char *path); }
143 52 COMPAT_13 MODULAR { int|sys||sigpending(void); } sigpending13
144 53 COMPAT_13 MODULAR { int|sys||sigaltstack( \
145 const struct sigaltstack13 *nss, \
146 struct sigaltstack13 *oss); } sigaltstack13
147 54 STD RUMP { int|sys||ioctl(int fd, \
148 u_long com, ... void *data); }
149 55 COMPAT_12 MODULAR { int|sys||reboot(int opt); } oreboot
150 56 STD RUMP { int|sys||revoke(const char *path); }
151 57 STD RUMP { int|sys||symlink(const char *path, \
153 58 STD RUMP { ssize_t|sys||readlink(const char *path, char *buf, \
155 59 STD { int|sys||execve(const char *path, \
156 char * const *argp, char * const *envp); }
157 60 STD { mode_t|sys||umask(mode_t newmask); }
158 61 STD RUMP { int|sys||chroot(const char *path); }
159 62 COMPAT_43 MODULAR { int|sys||fstat(int fd, struct stat43 *sb); } fstat43
160 63 COMPAT_43 MODULAR { int|sys||getkerninfo(int op, char *where, int *size, \
161 int arg); } ogetkerninfo
162 64 COMPAT_43 MODULAR { int|sys||getpagesize(void); } ogetpagesize
163 65 COMPAT_12 MODULAR { int|sys||msync(void *addr, size_t len); }
164 ; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
165 66 STD { int|sys||vfork(void); }
168 69 STD { int|sys||sbrk(intptr_t incr); }
169 70 STD { int|sys||sstk(int incr); }
170 71 COMPAT_43 MODULAR { int|sys||mmap(void *addr, size_t len, int prot, \
171 int flags, int fd, long pos); } ommap
172 72 STD { int|sys||ovadvise(int anom); } vadvise
173 73 STD { int|sys||munmap(void *addr, size_t len); }
174 74 STD { int|sys||mprotect(void *addr, size_t len, \
176 75 STD { int|sys||madvise(void *addr, size_t len, \
180 78 STD { int|sys||mincore(void *addr, size_t len, \
182 79 STD { int|sys||getgroups(int gidsetsize, \
184 80 STD { int|sys||setgroups(int gidsetsize, \
185 const gid_t *gidset); }
186 81 STD { int|sys||getpgrp(void); }
187 82 STD { int|sys||setpgid(int pid, int pgid); }
188 83 COMPAT_50 MODULAR { int|sys||setitimer(int which, \
189 const struct itimerval50 *itv, \
190 struct itimerval50 *oitv); }
191 84 COMPAT_43 MODULAR { int|sys||wait(void); } owait
192 85 COMPAT_12 MODULAR { int|sys||swapon(const char *name); } oswapon
193 86 COMPAT_50 MODULAR { int|sys||getitimer(int which, \
194 struct itimerval50 *itv); }
195 87 COMPAT_43 MODULAR { int|sys||gethostname(char *hostname, u_int len); } \
197 88 COMPAT_43 MODULAR { int|sys||sethostname(char *hostname, u_int len); } \
199 89 COMPAT_43 MODULAR { int|sys||getdtablesize(void); } ogetdtablesize
200 90 STD RUMP { int|sys||dup2(int from, int to); }
202 92 STD RUMP { int|sys||fcntl(int fd, int cmd, ... void *arg); }
203 93 COMPAT_50 MODULAR { int|sys||select(int nd, fd_set *in, fd_set *ou, \
204 fd_set *ex, struct timeval50 *tv); }
206 95 STD RUMP { int|sys||fsync(int fd); }
207 96 STD { int|sys||setpriority(int which, id_t who, int prio); }
208 97 COMPAT_30 MODULAR { int|sys||socket(int domain, int type, int protocol); }
209 98 STD RUMP { int|sys||connect(int s, const struct sockaddr *name, \
210 unsigned int namelen); }
211 99 COMPAT_43 MODULAR { int|sys||accept(int s, void *name, \
212 int *anamelen); } oaccept
213 100 STD { int|sys||getpriority(int which, id_t who); }
214 101 COMPAT_43 MODULAR { int|sys||send(int s, void *buf, int len, \
216 102 COMPAT_43 MODULAR { int|sys||recv(int s, void *buf, int len, \
218 103 COMPAT_13 MODULAR { int|sys||sigreturn(struct sigcontext13 *sigcntxp); } \
220 104 STD RUMP { int|sys||bind(int s, const struct sockaddr *name, \
221 unsigned int namelen); }
222 105 STD RUMP { int|sys||setsockopt(int s, int level, int name, \
223 const void *val, unsigned int valsize); }
224 106 STD RUMP { int|sys||listen(int s, int backlog); }
226 108 COMPAT_43 MODULAR { int|sys||sigvec(int signum, struct sigvec *nsv, \
227 struct sigvec *osv); } osigvec
228 109 COMPAT_43 MODULAR { int|sys||sigblock(int mask); } osigblock
229 110 COMPAT_43 MODULAR { int|sys||sigsetmask(int mask); } osigsetmask
230 111 COMPAT_13 MODULAR { int|sys||sigsuspend(int mask); } sigsuspend13
231 112 COMPAT_43 MODULAR { int|sys||sigstack(struct sigstack *nss, \
232 struct sigstack *oss); } osigstack
233 113 COMPAT_43 MODULAR { int|sys||recvmsg(int s, struct omsghdr *msg, \
234 int flags); } orecvmsg
235 114 COMPAT_43 MODULAR { int|sys||sendmsg(int s, void *msg, int flags); } \
238 116 COMPAT_50 MODULAR { int|sys||gettimeofday(struct timeval50 *tp, \
240 117 COMPAT_50 MODULAR { int|sys||getrusage(int who, struct rusage50 *rusage); }
241 118 STD RUMP { int|sys||getsockopt(int s, int level, int name, \
242 void *val, unsigned int *avalsize); }
244 120 STD RUMP { ssize_t|sys||readv(int fd, \
245 const struct iovec *iovp, int iovcnt); }
246 121 STD RUMP { ssize_t|sys||writev(int fd, \
247 const struct iovec *iovp, int iovcnt); }
248 122 COMPAT_50 MODULAR { int|sys||settimeofday(const struct timeval50 *tv, \
250 123 STD RUMP { int|sys||fchown(int fd, uid_t uid, gid_t gid); }
251 124 STD RUMP { int|sys||fchmod(int fd, mode_t mode); }
252 125 COMPAT_43 MODULAR { int|sys||recvfrom(int s, void *buf, size_t len, \
253 int flags, void *from, int *fromlenaddr); } \
255 126 STD { int|sys||setreuid(uid_t ruid, uid_t euid); }
256 127 STD { int|sys||setregid(gid_t rgid, gid_t egid); }
257 128 STD RUMP { int|sys||rename(const char *from, const char *to); }
258 129 COMPAT_43 MODULAR { int|sys||truncate(const char *path, long length); } \
260 130 COMPAT_43 MODULAR { int|sys||ftruncate(int fd, long length); } oftruncate
261 131 STD RUMP { int|sys||flock(int fd, int how); }
262 132 STD RUMP { int|sys||mkfifo(const char *path, mode_t mode); }
263 133 STD RUMP { ssize_t|sys||sendto(int s, const void *buf, \
264 size_t len, int flags, const struct sockaddr *to, \
265 unsigned int tolen); }
266 134 STD RUMP { int|sys||shutdown(int s, int how); }
267 135 STD RUMP { int|sys||socketpair(int domain, int type, \
268 int protocol, int *rsv); }
269 136 STD RUMP { int|sys||mkdir(const char *path, mode_t mode); }
270 137 STD RUMP { int|sys||rmdir(const char *path); }
271 138 COMPAT_50 MODULAR { int|sys||utimes(const char *path, \
272 const struct timeval50 *tptr); }
273 139 OBSOL 4.2 sigreturn
274 140 COMPAT_50 MODULAR { int|sys||adjtime(const struct timeval50 *delta, \
275 struct timeval50 *olddelta); }
276 141 COMPAT_43 MODULAR { int|sys||getpeername(int fdes, void *asa, \
277 int *alen); } ogetpeername
278 142 COMPAT_43 MODULAR { int32_t|sys||gethostid(void); } ogethostid
279 143 COMPAT_43 MODULAR { int|sys||sethostid(int32_t hostid); } osethostid
280 144 COMPAT_43 MODULAR { int|sys||getrlimit(int which, \
281 struct orlimit *rlp); } ogetrlimit
282 145 COMPAT_43 MODULAR { int|sys||setrlimit(int which, \
283 const struct orlimit *rlp); } osetrlimit
284 146 COMPAT_43 MODULAR { int|sys||killpg(int pgid, int signum); } okillpg
285 147 STD { int|sys||setsid(void); }
286 148 STD { int|sys||quotactl(const char *path, int cmd, \
287 int uid, void *arg); }
288 149 COMPAT_43 MODULAR { int|sys||quota(void); } oquota
289 150 COMPAT_43 MODULAR { int|sys||getsockname(int fdec, void *asa, \
290 int *alen); } ogetsockname
292 ; Syscalls 151-180 inclusive are reserved for vendor-specific
293 ; system calls. (This includes various calls added for compatibity
294 ; with other Unix variants.)
295 ; Some of these calls are now supported by BSD...
300 155 STD MODULAR RUMP { int|sys||nfssvc(int flag, void *argp); }
301 156 COMPAT_43 MODULAR { int|sys||getdirentries(int fd, char *buf, \
302 u_int count, long *basep); } ogetdirentries
303 157 COMPAT_20 MODULAR { int|sys||statfs(const char *path, \
304 struct statfs12 *buf); }
305 158 COMPAT_20 MODULAR { int|sys||fstatfs(int fd, struct statfs12 *buf); }
308 161 COMPAT_30 MODULAR { int|sys||getfh(const char *fname, \
309 struct compat_30_fhandle *fhp); }
310 162 COMPAT_09 MODULAR { int|sys||getdomainname(char *domainname, int len); } \
312 163 COMPAT_09 MODULAR { int|sys||setdomainname(char *domainname, int len); } \
314 164 COMPAT_09 MODULAR { int|sys||uname(struct outsname *name); } ouname
315 165 STD { int|sys||sysarch(int op, void *parms); }
319 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
320 #if (defined(SYSVSEM) || !defined(_KERNEL_OPT)) && !defined(_LP64)
321 169 COMPAT_10 MODULAR { int|sys||semsys(int which, int a2, int a3, int a4, \
326 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
327 #if (defined(SYSVMSG) || !defined(_KERNEL_OPT)) && !defined(_LP64)
328 170 COMPAT_10 MODULAR { int|sys||msgsys(int which, int a2, int a3, int a4, \
329 int a5, int a6); } omsgsys
333 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
334 #if (defined(SYSVSHM) || !defined(_KERNEL_OPT)) && !defined(_LP64)
335 171 COMPAT_10 MODULAR { int|sys||shmsys(int which, int a2, int a3, int a4); } \
341 173 STD RUMP { ssize_t|sys||pread(int fd, void *buf, \
342 size_t nbyte, int PAD, off_t offset); }
343 174 STD RUMP { ssize_t|sys||pwrite(int fd, const void *buf, \
344 size_t nbyte, int PAD, off_t offset); }
345 ; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
346 175 COMPAT_30 { int|sys||ntp_gettime(struct ntptimeval30 *ntvp); }
347 #if defined(NTP) || !defined(_KERNEL_OPT)
348 176 STD { int|sys||ntp_adjtime(struct timex *tp); }
357 ; Syscalls 180-199 are used by/reserved for BSD
358 181 STD { int|sys||setgid(gid_t gid); }
359 182 STD { int|sys||setegid(gid_t egid); }
360 183 STD { int|sys||seteuid(uid_t euid); }
361 #if defined(LFS) || !defined(_KERNEL)
362 184 STD { int|sys||lfs_bmapv(fsid_t *fsidp, \
363 struct block_info *blkiov, int blkcnt); }
364 185 STD { int|sys||lfs_markv(fsid_t *fsidp, \
365 struct block_info *blkiov, int blkcnt); }
366 186 STD { int|sys||lfs_segclean(fsid_t *fsidp, u_long segment); }
367 187 COMPAT_50 MODULAR { int|sys||lfs_segwait(fsid_t *fsidp, \
368 struct timeval50 *tv); }
372 186 EXCL lfs_segclean
375 188 COMPAT_12 MODULAR { int|sys||stat(const char *path, struct stat12 *ub); } \
377 189 COMPAT_12 MODULAR { int|sys||fstat(int fd, struct stat12 *sb); } fstat12
378 190 COMPAT_12 MODULAR { int|sys||lstat(const char *path, \
379 struct stat12 *ub); } lstat12
380 191 STD { long|sys||pathconf(const char *path, int name); }
381 192 STD { long|sys||fpathconf(int fd, int name); }
383 194 STD { int|sys||getrlimit(int which, \
384 struct rlimit *rlp); }
385 195 STD { int|sys||setrlimit(int which, \
386 const struct rlimit *rlp); }
387 196 COMPAT_12 MODULAR { int|sys||getdirentries(int fd, char *buf, \
388 u_int count, long *basep); }
389 197 STD { void *|sys||mmap(void *addr, size_t len, int prot, \
390 int flags, int fd, long PAD, off_t pos); }
391 198 INDIR { quad_t|sys||__syscall(quad_t code, \
392 ... register_t args[SYS_MAXSYSARGS]); }
393 199 STD RUMP { off_t|sys||lseek(int fd, int PAD, off_t offset, \
395 200 STD RUMP { int|sys||truncate(const char *path, int PAD, \
397 201 STD RUMP { int|sys||ftruncate(int fd, int PAD, off_t length); }
398 202 STD RUMP { int|sys||__sysctl(const int *name, u_int namelen, \
399 void *old, size_t *oldlenp, const void *new, \
401 203 STD { int|sys||mlock(const void *addr, size_t len); }
402 204 STD { int|sys||munlock(const void *addr, size_t len); }
403 205 STD { int|sys||undelete(const char *path); }
404 206 COMPAT_50 MODULAR { int|sys||futimes(int fd, \
405 const struct timeval50 *tptr); }
406 207 STD { pid_t|sys||getpgid(pid_t pid); }
407 208 STD RUMP { int|sys||reboot(int opt, char *bootstr); }
408 209 STD RUMP { int|sys||poll(struct pollfd *fds, u_int nfds, \
411 ; Syscalls 210-219 are reserved for dynamically loaded syscalls
423 ; System calls 220-300 are reserved for use by NetBSD
424 #if defined(SYSVSEM) || !defined(_KERNEL_OPT)
425 220 COMPAT_14 MODULAR { int|sys||__semctl(int semid, int semnum, int cmd, \
426 union __semun *arg); }
427 221 STD { int|sys||semget(key_t key, int nsems, int semflg); }
428 222 STD { int|sys||semop(int semid, struct sembuf *sops, \
430 223 STD { int|sys||semconfig(int flag); }
432 220 EXCL compat_14_semctl
437 #if defined(SYSVMSG) || !defined(_KERNEL_OPT)
438 224 COMPAT_14 MODULAR { int|sys||msgctl(int msqid, int cmd, \
439 struct msqid_ds14 *buf); }
440 225 STD { int|sys||msgget(key_t key, int msgflg); }
441 226 STD { int|sys||msgsnd(int msqid, const void *msgp, \
442 size_t msgsz, int msgflg); }
443 227 STD { ssize_t|sys||msgrcv(int msqid, void *msgp, \
444 size_t msgsz, long msgtyp, int msgflg); }
446 224 EXCL compat_14_msgctl
451 #if defined(SYSVSHM) || !defined(_KERNEL_OPT)
452 228 STD { void *|sys||shmat(int shmid, const void *shmaddr, \
454 229 COMPAT_14 MODULAR { int|sys||shmctl(int shmid, int cmd, \
455 struct shmid_ds14 *buf); }
456 230 STD { int|sys||shmdt(const void *shmaddr); }
457 231 STD { int|sys||shmget(key_t key, size_t size, int shmflg); }
460 229 EXCL compat_14_shmctl
464 232 COMPAT_50 MODULAR { int|sys||clock_gettime(clockid_t clock_id, \
465 struct timespec50 *tp); }
466 233 COMPAT_50 MODULAR { int|sys||clock_settime(clockid_t clock_id, \
467 const struct timespec50 *tp); }
468 234 COMPAT_50 MODULAR { int|sys||clock_getres(clockid_t clock_id, \
469 struct timespec50 *tp); }
470 235 STD { int|sys||timer_create(clockid_t clock_id, \
471 struct sigevent *evp, timer_t *timerid); }
472 236 STD { int|sys||timer_delete(timer_t timerid); }
473 237 COMPAT_50 MODULAR { int|sys||timer_settime(timer_t timerid, int flags, \
474 const struct itimerspec50 *value, \
475 struct itimerspec50 *ovalue); }
476 238 COMPAT_50 MODULAR { int|sys||timer_gettime(timer_t timerid, struct \
477 itimerspec50 *value); }
478 239 STD { int|sys||timer_getoverrun(timer_t timerid); }
480 ; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
482 240 COMPAT_50 MODULAR { int|sys||nanosleep(const struct timespec50 *rqtp, \
483 struct timespec50 *rmtp); }
484 241 STD RUMP { int|sys||fdatasync(int fd); }
485 242 STD { int|sys||mlockall(int flags); }
486 243 STD { int|sys||munlockall(void); }
487 244 COMPAT_50 MODULAR { int|sys||__sigtimedwait(const sigset_t *set, \
489 struct timespec50 *timeout); }
490 245 UNIMPL sys_sigqueue
491 246 STD RUMP { int|sys||modctl(int cmd, void *arg); }
492 247 STD MODULAR { int|sys||_ksem_init(unsigned int value, intptr_t *idp); }
493 248 STD MODULAR { int|sys||_ksem_open(const char *name, int oflag, \
494 mode_t mode, unsigned int value, intptr_t *idp); }
495 249 STD MODULAR { int|sys||_ksem_unlink(const char *name); }
496 250 STD MODULAR { int|sys||_ksem_close(intptr_t id); }
497 251 STD MODULAR { int|sys||_ksem_post(intptr_t id); }
498 252 STD MODULAR { int|sys||_ksem_wait(intptr_t id); }
499 253 STD MODULAR { int|sys||_ksem_trywait(intptr_t id); }
500 254 STD MODULAR { int|sys||_ksem_getvalue(intptr_t id, \
501 unsigned int *value); }
502 255 STD MODULAR { int|sys||_ksem_destroy(intptr_t id); }
503 256 UNIMPL sys__ksem_timedwait
504 257 STD MODULAR { mqd_t|sys||mq_open(const char * name, int oflag, \
505 mode_t mode, struct mq_attr *attr); }
506 258 STD MODULAR { int|sys||mq_close(mqd_t mqdes); }
507 259 STD MODULAR { int|sys||mq_unlink(const char *name); }
508 260 STD MODULAR { int|sys||mq_getattr(mqd_t mqdes, \
509 struct mq_attr *mqstat); }
510 261 STD MODULAR { int|sys||mq_setattr(mqd_t mqdes, \
511 const struct mq_attr *mqstat, \
512 struct mq_attr *omqstat); }
513 262 STD MODULAR { int|sys||mq_notify(mqd_t mqdes, \
514 const struct sigevent *notification); }
515 263 STD MODULAR { int|sys||mq_send(mqd_t mqdes, const char *msg_ptr, \
516 size_t msg_len, unsigned msg_prio); }
517 264 STD MODULAR { ssize_t|sys||mq_receive(mqd_t mqdes, char *msg_ptr, \
518 size_t msg_len, unsigned *msg_prio); }
519 265 COMPAT_50 MODULAR { int|sys||mq_timedsend(mqd_t mqdes, \
520 const char *msg_ptr, size_t msg_len, \
522 const struct timespec50 *abs_timeout); }
523 266 COMPAT_50 MODULAR { ssize_t|sys||mq_timedreceive(mqd_t mqdes, \
524 char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
525 const struct timespec50 *abs_timeout); }
529 270 STD { int|sys||__posix_rename(const char *from, \
531 271 STD { int|sys||swapctl(int cmd, void *arg, int misc); }
532 272 COMPAT_30 MODULAR { int|sys||getdents(int fd, char *buf, size_t count); }
533 273 STD { int|sys||minherit(void *addr, size_t len, \
535 274 STD RUMP { int|sys||lchmod(const char *path, mode_t mode); }
536 275 STD RUMP { int|sys||lchown(const char *path, uid_t uid, \
538 276 COMPAT_50 MODULAR { int|sys||lutimes(const char *path, \
539 const struct timeval50 *tptr); }
540 277 STD { int|sys|13|msync(void *addr, size_t len, int flags); }
541 278 COMPAT_30 MODULAR { int|sys|13|stat(const char *path, struct stat13 *ub); }
542 279 COMPAT_30 MODULAR { int|sys|13|fstat(int fd, struct stat13 *sb); }
543 280 COMPAT_30 MODULAR { int|sys|13|lstat(const char *path, struct stat13 *ub); }
544 281 STD { int|sys|14|sigaltstack( \
545 const struct sigaltstack *nss, \
546 struct sigaltstack *oss); }
547 282 STD { int|sys|14|vfork(void); }
548 283 STD { int|sys||__posix_chown(const char *path, uid_t uid, \
550 284 STD { int|sys||__posix_fchown(int fd, uid_t uid, \
552 285 STD { int|sys||__posix_lchown(const char *path, uid_t uid, \
554 286 STD { pid_t|sys||getsid(pid_t pid); }
555 287 STD { pid_t|sys||__clone(int flags, void *stack); }
556 288 STD { int|sys||fktrace(int fd, int ops, \
557 int facs, int pid); }
558 289 STD { ssize_t|sys||preadv(int fd, \
559 const struct iovec *iovp, int iovcnt, \
560 int PAD, off_t offset); }
561 290 STD { ssize_t|sys||pwritev(int fd, \
562 const struct iovec *iovp, int iovcnt, \
563 int PAD, off_t offset); }
564 291 COMPAT_16 MODULAR { int|sys|14|sigaction(int signum, \
565 const struct sigaction *nsa, \
566 struct sigaction *osa); }
567 292 STD { int|sys|14|sigpending(sigset_t *set); }
568 293 STD { int|sys|14|sigprocmask(int how, \
569 const sigset_t *set, \
571 294 STD { int|sys|14|sigsuspend(const sigset_t *set); }
572 295 COMPAT_16 MODULAR { int|sys|14|sigreturn(struct sigcontext *sigcntxp); }
573 296 STD { int|sys||__getcwd(char *bufp, size_t length); }
574 297 STD RUMP { int|sys||fchroot(int fd); }
575 298 COMPAT_30 MODULAR { int|sys||fhopen(const struct compat_30_fhandle *fhp, int flags); }
576 299 COMPAT_30 MODULAR { int|sys||fhstat(const struct compat_30_fhandle *fhp, \
577 struct stat13 *sb); }
578 300 COMPAT_20 MODULAR { int|sys||fhstatfs(const struct compat_30_fhandle *fhp, \
579 struct statfs12 *buf); }
580 #if defined(SYSVSEM) || !defined(_KERNEL_OPT)
581 301 COMPAT_50 MODULAR { int|sys|13|__semctl(int semid, int semnum, int cmd, \
582 ... union __semun *arg); }
584 301 EXCL ____semctl13
586 #if defined(SYSVMSG) || !defined(_KERNEL_OPT)
587 302 COMPAT_50 MODULAR { int|sys|13|msgctl(int msqid, int cmd, \
588 struct msqid_ds *buf); }
592 #if defined(SYSVSHM) || !defined(_KERNEL_OPT)
593 303 COMPAT_50 MODULAR { int|sys|13|shmctl(int shmid, int cmd, \
594 struct shmid_ds13 *buf); }
598 304 STD RUMP { int|sys||lchflags(const char *path, u_long flags); }
599 305 STD { int|sys||issetugid(void); }
600 306 STD { int|sys||utrace(const char *label, void *addr, \
602 307 STD { int|sys||getcontext(struct __ucontext *ucp); }
603 308 STD { int|sys||setcontext(const struct __ucontext *ucp); }
604 309 STD { int|sys||_lwp_create(const struct __ucontext *ucp, \
605 u_long flags, lwpid_t *new_lwp); }
606 310 STD { int|sys||_lwp_exit(void); }
607 311 STD { lwpid_t|sys||_lwp_self(void); }
608 312 STD { int|sys||_lwp_wait(lwpid_t wait_for, \
609 lwpid_t *departed); }
610 313 STD { int|sys||_lwp_suspend(lwpid_t target); }
611 314 STD { int|sys||_lwp_continue(lwpid_t target); }
612 315 STD { int|sys||_lwp_wakeup(lwpid_t target); }
613 316 STD { void *|sys||_lwp_getprivate(void); }
614 317 STD { void|sys||_lwp_setprivate(void *ptr); }
615 318 STD { int|sys||_lwp_kill(lwpid_t target, int signo); }
616 319 STD { int|sys||_lwp_detach(lwpid_t target); }
617 320 COMPAT_50 MODULAR { int|sys||_lwp_park(const struct timespec50 *ts, \
618 lwpid_t unpark, const void *hint, \
619 const void *unparkhint); }
620 321 STD { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }
621 322 STD { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, \
622 size_t ntargets, const void *hint); }
623 323 STD { int|sys||_lwp_setname(lwpid_t target, \
625 324 STD { int|sys||_lwp_getname(lwpid_t target, \
626 char *name, size_t len); }
627 325 STD { int|sys||_lwp_ctl(int features, \
628 struct lwpctl **address); }
629 ; Syscalls 326-339 reserved for LWP syscalls.
635 330 STD { int|sys||sa_register(sa_upcall_t new, \
636 sa_upcall_t *old, int flags, \
637 ssize_t stackinfo_offset); }
638 331 STD { int|sys||sa_stacks(int num, stack_t *stacks); }
639 332 STD { int|sys||sa_enable(void); }
640 333 STD { int|sys||sa_setconcurrency(int concurrency); }
641 334 STD { int|sys||sa_yield(void); }
642 335 STD { int|sys||sa_preempt(int sa_id); }
643 336 OBSOL sys_sa_unblockyield
645 ; Syscalls 337-339 are reserved for other scheduler activation syscalls.
650 340 STD { int|sys||__sigaction_sigtramp(int signum, \
651 const struct sigaction *nsa, \
652 struct sigaction *osa, \
653 const void *tramp, int vers); }
654 341 STD { int|sys||pmc_get_info(int ctr, int op, void *args); }
655 342 STD { int|sys||pmc_control(int ctr, int op, void *args); }
656 343 STD { int|sys||rasctl(void *addr, size_t len, int op); }
657 344 STD RUMP { int|sys||kqueue(void); }
658 345 COMPAT_50 MODULAR { int|sys||kevent(int fd, \
659 const struct kevent *changelist, size_t nchanges, \
660 struct kevent *eventlist, size_t nevents, \
661 const struct timespec50 *timeout); }
663 ; Scheduling system calls.
664 346 STD { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, \
665 int policy, const struct sched_param *params); }
666 347 STD { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, \
667 int *policy, struct sched_param *params); }
668 348 STD { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, \
669 size_t size, const cpuset_t *cpuset); }
670 349 STD { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, \
671 size_t size, cpuset_t *cpuset); }
672 350 STD { int|sys||sched_yield(void); }
677 354 STD RUMP { int|sys||fsync_range(int fd, int flags, off_t start, \
679 355 STD { int|sys||uuidgen(struct uuid *store, int count); }
680 356 STD RUMP { int|sys||getvfsstat(struct statvfs *buf, \
681 size_t bufsize, int flags); }
682 357 STD RUMP { int|sys||statvfs1(const char *path, \
683 struct statvfs *buf, int flags); }
684 358 STD RUMP { int|sys||fstatvfs1(int fd, struct statvfs *buf, \
686 359 COMPAT_30 MODULAR { int|sys||fhstatvfs1(const struct compat_30_fhandle *fhp, \
687 struct statvfs *buf, int flags); }
688 360 STD RUMP { int|sys||extattrctl(const char *path, int cmd, \
689 const char *filename, int attrnamespace, \
690 const char *attrname); }
691 361 STD RUMP { int|sys||extattr_set_file(const char *path, \
692 int attrnamespace, const char *attrname, \
693 const void *data, size_t nbytes); }
694 362 STD RUMP { ssize_t|sys||extattr_get_file(const char *path, \
695 int attrnamespace, const char *attrname, \
696 void *data, size_t nbytes); }
697 363 STD RUMP { int|sys||extattr_delete_file(const char *path, \
698 int attrnamespace, const char *attrname); }
699 364 STD RUMP { int|sys||extattr_set_fd(int fd, \
700 int attrnamespace, const char *attrname, \
701 const void *data, size_t nbytes); }
702 365 STD RUMP { ssize_t|sys||extattr_get_fd(int fd, \
703 int attrnamespace, const char *attrname, \
704 void *data, size_t nbytes); }
705 366 STD RUMP { int|sys||extattr_delete_fd(int fd, \
706 int attrnamespace, const char *attrname); }
707 367 STD RUMP { int|sys||extattr_set_link(const char *path, \
708 int attrnamespace, const char *attrname, \
709 const void *data, size_t nbytes); }
710 368 STD RUMP { ssize_t|sys||extattr_get_link(const char *path, \
711 int attrnamespace, const char *attrname, \
712 void *data, size_t nbytes); }
713 369 STD RUMP { int|sys||extattr_delete_link(const char *path, \
714 int attrnamespace, const char *attrname); }
715 370 STD RUMP { ssize_t|sys||extattr_list_fd(int fd, \
716 int attrnamespace, void *data, size_t nbytes); }
717 371 STD RUMP { ssize_t|sys||extattr_list_file(const char *path, \
718 int attrnamespace, void *data, size_t nbytes); }
719 372 STD RUMP { ssize_t|sys||extattr_list_link(const char *path, \
720 int attrnamespace, void *data, size_t nbytes); }
721 373 COMPAT_50 MODULAR { int|sys||pselect(int nd, fd_set *in, fd_set *ou, \
722 fd_set *ex, const struct timespec50 *ts, \
723 const sigset_t *mask); }
724 374 COMPAT_50 MODULAR { int|sys||pollts(struct pollfd *fds, u_int nfds, \
725 const struct timespec50 *ts, const sigset_t *mask); }
726 375 STD RUMP { int|sys||setxattr(const char *path, \
727 const char *name, void *value, size_t size, \
729 376 STD RUMP { int|sys||lsetxattr(const char *path, \
730 const char *name, void *value, size_t size, \
732 377 STD RUMP { int|sys||fsetxattr(int fd, \
733 const char *name, void *value, size_t size, \
735 378 STD RUMP { int|sys||getxattr(const char *path, \
736 const char *name, void *value, size_t size); }
737 379 STD RUMP { int|sys||lgetxattr(const char *path, \
738 const char *name, void *value, size_t size); }
739 380 STD RUMP { int|sys||fgetxattr(int fd, \
740 const char *name, void *value, size_t size); }
741 381 STD RUMP { int|sys||listxattr(const char *path, \
742 char *list, size_t size); }
743 382 STD RUMP { int|sys||llistxattr(const char *path, \
744 char *list, size_t size); }
745 383 STD RUMP { int|sys||flistxattr(int fd, \
746 char *list, size_t size); }
747 384 STD RUMP { int|sys||removexattr(const char *path, \
749 385 STD RUMP { int|sys||lremovexattr(const char *path, \
751 386 STD RUMP { int|sys||fremovexattr(int fd, \
753 387 COMPAT_50 MODULAR { int|sys|30|stat(const char *path, struct stat30 *ub); }
754 388 COMPAT_50 MODULAR { int|sys|30|fstat(int fd, struct stat30 *sb); }
755 389 COMPAT_50 MODULAR { int|sys|30|lstat(const char *path, struct stat30 *ub); }
756 390 STD RUMP { int|sys|30|getdents(int fd, char *buf, size_t count); }
757 391 IGNORED old posix_fadvise
758 392 COMPAT_30 MODULAR { int|sys|30|fhstat(const struct compat_30_fhandle \
759 *fhp, struct stat30 *sb); }
760 393 COMPAT_50 MODULAR { int|sys|30|ntp_gettime(struct ntptimeval50 *ntvp); }
761 394 STD RUMP { int|sys|30|socket(int domain, int type, int protocol); }
762 395 STD RUMP { int|sys|30|getfh(const char *fname, void *fhp, \
764 396 STD RUMP { int|sys|40|fhopen(const void *fhp, size_t fh_size,\
766 397 STD RUMP { int|sys|40|fhstatvfs1(const void *fhp, \
767 size_t fh_size, struct statvfs *buf, int flags); }
768 398 COMPAT_50 MODULAR { int|sys|40|fhstat(const void *fhp, \
769 size_t fh_size, struct stat30 *sb); }
771 ; Asynchronous I/O system calls
772 399 STD MODULAR { int|sys||aio_cancel(int fildes, struct aiocb *aiocbp); }
773 400 STD MODULAR { int|sys||aio_error(const struct aiocb *aiocbp); }
774 401 STD MODULAR { int|sys||aio_fsync(int op, struct aiocb *aiocbp); }
775 402 STD MODULAR { int|sys||aio_read(struct aiocb *aiocbp); }
776 403 STD MODULAR { int|sys||aio_return(struct aiocb *aiocbp); }
777 404 COMPAT_50 MODULAR { int|sys||aio_suspend(const struct aiocb *const *list, \
778 int nent, const struct timespec50 *timeout); }
779 405 STD MODULAR { int|sys||aio_write(struct aiocb *aiocbp); }
780 406 STD MODULAR { int|sys||lio_listio(int mode, struct aiocb *const *list, \
781 int nent, struct sigevent *sig); }
787 410 STD RUMP { int|sys|50|mount(const char *type, \
788 const char *path, int flags, void *data, \
790 411 STD { void *|sys||mremap(void *old_address, size_t old_size, \
791 void *new_address, size_t new_size, int flags); }
793 ; Processor-sets system calls
794 412 STD { int|sys||pset_create(psetid_t *psid); }
795 413 STD { int|sys||pset_destroy(psetid_t psid); }
796 414 STD { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, \
798 415 STD { int|sys||_pset_bind(idtype_t idtype, id_t first_id, \
799 id_t second_id, psetid_t psid, psetid_t *opsid); }
800 416 STD { int|sys|50|posix_fadvise(int fd, int PAD, \
801 off_t offset, off_t len, int advice); }
802 417 STD RUMP { int|sys|50|select(int nd, fd_set *in, fd_set *ou, \
803 fd_set *ex, struct timeval *tv); }
804 418 STD { int|sys|50|gettimeofday(struct timeval *tp, \
806 419 STD { int|sys|50|settimeofday(const struct timeval *tv, \
808 420 STD RUMP { int|sys|50|utimes(const char *path, \
809 const struct timeval *tptr); }
810 421 STD { int|sys|50|adjtime(const struct timeval *delta, \
811 struct timeval *olddelta); }
812 #if defined(LFS) || !defined(_KERNEL)
813 422 STD { int|sys|50|lfs_segwait(fsid_t *fsidp, \
814 struct timeval *tv); }
816 422 EXCL __lfs_segwait50
818 423 STD RUMP { int|sys|50|futimes(int fd, \
819 const struct timeval *tptr); }
820 424 STD RUMP { int|sys|50|lutimes(const char *path, \
821 const struct timeval *tptr); }
822 425 STD { int|sys|50|setitimer(int which, \
823 const struct itimerval *itv, \
824 struct itimerval *oitv); }
825 426 STD { int|sys|50|getitimer(int which, \
826 struct itimerval *itv); }
827 427 STD { int|sys|50|clock_gettime(clockid_t clock_id, \
828 struct timespec *tp); }
829 428 STD { int|sys|50|clock_settime(clockid_t clock_id, \
830 const struct timespec *tp); }
831 429 STD { int|sys|50|clock_getres(clockid_t clock_id, \
832 struct timespec *tp); }
833 430 STD { int|sys|50|nanosleep(const struct timespec *rqtp, \
834 struct timespec *rmtp); }
835 431 STD { int|sys|50|__sigtimedwait(const sigset_t *set, \
837 struct timespec *timeout); }
838 432 STD MODULAR { int|sys|50|mq_timedsend(mqd_t mqdes, \
839 const char *msg_ptr, size_t msg_len, \
841 const struct timespec *abs_timeout); }
842 433 STD MODULAR { ssize_t|sys|50|mq_timedreceive(mqd_t mqdes, \
843 char *msg_ptr, size_t msg_len, unsigned *msg_prio, \
844 const struct timespec *abs_timeout); }
845 434 STD { int|sys|50|_lwp_park(const struct timespec *ts, \
846 lwpid_t unpark, const void *hint, \
847 const void *unparkhint); }
848 435 STD RUMP { int|sys|50|kevent(int fd, \
849 const struct kevent *changelist, size_t nchanges, \
850 struct kevent *eventlist, size_t nevents, \
851 const struct timespec *timeout); }
852 436 STD RUMP { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, \
853 fd_set *ex, const struct timespec *ts, \
854 const sigset_t *mask); }
855 437 STD RUMP { int|sys|50|pollts(struct pollfd *fds, u_int nfds, \
856 const struct timespec *ts, const sigset_t *mask); }
857 438 STD MODULAR { int|sys|50|aio_suspend( \
858 const struct aiocb *const *list, \
859 int nent, const struct timespec *timeout); }
860 439 STD RUMP { int|sys|50|stat(const char *path, struct stat *ub); }
861 440 STD RUMP { int|sys|50|fstat(int fd, struct stat *sb); }
862 441 STD RUMP { int|sys|50|lstat(const char *path, struct stat *ub); }
863 #if defined(SYSVSEM) || !defined(_KERNEL_OPT)
864 442 STD { int|sys|50|__semctl(int semid, int semnum, int cmd, \
865 ... union __semun *arg); }
867 442 EXCL ____semctl50
869 #if defined(SYSVSHM) || !defined(_KERNEL_OPT)
870 443 STD { int|sys|50|shmctl(int shmid, int cmd, \
871 struct shmid_ds *buf); }
873 443 EXCL ____shmctl50
875 #if defined(SYSVMSG) || !defined(_KERNEL_OPT)
876 444 STD { int|sys|50|msgctl(int msqid, int cmd, \
877 struct msqid_ds *buf); }
879 444 EXCL ____msgctl50
881 445 STD { int|sys|50|getrusage(int who, struct rusage *rusage); }
882 446 STD { int|sys|50|timer_settime(timer_t timerid, \
883 int flags, const struct itimerspec *value, \
884 struct itimerspec *ovalue); }
885 447 STD { int|sys|50|timer_gettime(timer_t timerid, struct \
886 itimerspec *value); }
887 #if defined(NTP) || !defined(_KERNEL_OPT)
888 448 STD { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }
890 448 EXCL ___ntp_gettime50
892 449 STD { int|sys|50|wait4(int pid, int *status, \
893 int options, struct rusage *rusage); }
894 450 STD RUMP { int|sys|50|mknod(const char *path, mode_t mode, \
896 451 STD RUMP { int|sys|50|fhstat(const void *fhp, \
897 size_t fh_size, struct stat *sb); }