Home | History | Annotate | Line # | Download | only in aoutm68k
syscalls.master revision 1.10
      1 	$NetBSD: syscalls.master,v 1.10 2003/09/23 18:31:03 cl Exp $
      2 
      3 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
      4 
      5 ; NetBSD 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 ;	EXCL	implemented, but not included in system
     18 ;	NODEF	included, but don't define the syscall number
     19 ;	NOARGS	included, but don't define the syscall args structure
     20 ;	INDIR	included, but don't define the syscall args structure,
     21 ;		and allow it to be "really" varargs.
     22 ;
     23 ; The compat options are defined in the syscalls.conf file, and the
     24 ; compat option name is prefixed to the syscall name.  Other than
     25 ; that, they're like NODEF (for 'compat' options), or STD (for
     26 ; 'libcompat' options).
     27 ;
     28 ; The type-dependent arguments are as follows:
     29 ; For STD, NODEF, NOARGS, and compat syscalls:
     30 ;	{ pseudo-proto } [alias]
     31 ; For other syscalls:
     32 ;	[comment]
     33 ;
     34 ; #ifdef's, etc. may be included, and are copied to the output files.
     35 ; #include's are copied to the syscall names and switch definition files only.
     36 
     37 #if defined(_KERNEL_OPT)
     38 #include "opt_ktrace.h"
     39 #include "opt_nfsserver.h"
     40 #include "opt_ntp.h"
     41 #include "opt_compat_netbsd.h"
     42 #include "opt_sysv.h"
     43 #include "opt_compat_43.h"
     44 
     45 #include "fs_lfs.h"
     46 #include "fs_nfs.h"
     47 #endif
     48 
     49 #include <sys/param.h>
     50 #include <sys/systm.h>
     51 #include <sys/signal.h>
     52 #include <sys/mount.h>
     53 #include <sys/sa.h>
     54 #include <sys/syscallargs.h>
     55 #include <compat/aoutm68k/aoutm68k_syscallargs.h>
     56 
     57 %%
     58 
     59 ; Reserved/unimplemented system calls in the range 0-150 inclusive
     60 ; are reserved for use in future Berkeley releases.
     61 ; Additional system calls implemented in vendor and other
     62 ; redistributions should be placed in the reserved range at the end
     63 ; of the current calls.
     64 
     65 0	INDIR		{ int sys_syscall(int number, ...); }
     66 1	NOARGS		{ void sys_exit(int rval); }
     67 2	NOARGS		{ int sys_fork(void); }
     68 3	NOARGS		{ ssize_t sys_read(int fd, void *buf, size_t nbyte); }
     69 4	NOARGS		{ ssize_t sys_write(int fd, const void *buf, \
     70 			    size_t nbyte); }
     71 #ifdef COMPAT_AOUT_ALTPATH
     72 5	STD		{ int aoutm68k_sys_open(const char *path, \
     73 			    int flags, ... mode_t mode); }
     74 #else
     75 5	NOARGS		{ int sys_open(const char *path, int flags, \
     76 			    ... mode_t mode); }
     77 #endif
     78 6	NOARGS		{ int sys_close(int fd); }
     79 7	NOARGS		{ int sys_wait4(int pid, int *status, int options, \
     80 			    struct rusage *rusage); }
     81 #ifdef COMPAT_43
     82 8	NOARGS		{ int compat_43_sys_creat(const char *path, \
     83 			    mode_t mode); } ocreat
     84 #else
     85 8	EXCL		compat_43_sys_creat
     86 #endif
     87 #ifdef COMPAT_AOUT_ALTPATH
     88 9	STD		{ int aoutm68k_sys_link(const char *path, \
     89 			    const char *link); }
     90 10	STD		{ int aoutm68k_sys_unlink(const char *path); }
     91 #else
     92 9	NOARGS		{ int sys_link(const char *path, const char *link); }
     93 10	NOARGS		{ int sys_unlink(const char *path); }
     94 #endif
     95 11	OBSOL		execv
     96 #ifdef COMPAT_AOUT_ALTPATH
     97 12	STD		{ int aoutm68k_sys_chdir(const char *path); }
     98 #else
     99 12	NOARGS		{ int sys_chdir(const char *path); }
    100 #endif
    101 13	NOARGS		{ int sys_fchdir(int fd); }
    102 14	NOARGS		{ int sys_mknod(const char *path, mode_t mode, \
    103 			    dev_t dev); }
    104 #ifdef COMPAT_AOUT_ALTPATH
    105 15	STD		{ int aoutm68k_sys_chmod(const char *path, \
    106 			    mode_t mode); }
    107 16	STD		{ int aoutm68k_sys_chown(const char *path, uid_t uid, \
    108 			    gid_t gid); }
    109 #else
    110 15	NOARGS		{ int sys_chmod(const char *path, mode_t mode); }
    111 16	NOARGS		{ int sys_chown(const char *path, uid_t uid, \
    112 			    gid_t gid); }
    113 #endif
    114 17	NOARGS		{ int sys_obreak(char *nsize); } break
    115 18	NOARGS		{ int sys_getfsstat(struct statfs *buf, long bufsize, \
    116 			    int flags); }
    117 #ifdef COMPAT_43
    118 19	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, \
    119 			    int whence); } olseek
    120 #else
    121 19	EXCL		compat_43_sys_lseek
    122 #endif
    123 20	NOARGS MPSAFE	{ pid_t sys_getpid(void); }
    124 21	NOARGS		{ int sys_mount(const char *type, \
    125 			    const char *path, int flags, void *data); }
    126 22	NOARGS		{ int sys_unmount(const char *path, int flags); }
    127 23	NOARGS		{ int sys_setuid(uid_t uid); }
    128 24	NOARGS		{ uid_t sys_getuid(void); }
    129 25	NOARGS		{ uid_t sys_geteuid(void); }
    130 26	NOARGS		{ int sys_ptrace(int req, pid_t pid, caddr_t addr, \
    131 			    int data); }
    132 27	NOARGS		{ ssize_t sys_recvmsg(int s, struct msghdr *msg, \
    133 			    int flags); }
    134 28	NOARGS		{ ssize_t sys_sendmsg(int s, \
    135 			    const struct msghdr *msg, int flags); }
    136 29	NOARGS		{ ssize_t sys_recvfrom(int s, void *buf, size_t len, \
    137 			    int flags, struct sockaddr *from, \
    138 			    unsigned int *fromlenaddr); }
    139 30	NOARGS		{ int sys_accept(int s, struct sockaddr *name, \
    140 			    unsigned int *anamelen); }
    141 31	NOARGS		{ int sys_getpeername(int fdes, struct sockaddr *asa, \
    142 			    unsigned int *alen); }
    143 32	NOARGS		{ int sys_getsockname(int fdes, struct sockaddr *asa, \
    144 			    unsigned int *alen); }
    145 #ifdef COMPAT_AOUT_ALTPATH
    146 33	STD		{ int aoutm68k_sys_access(const char *path, int flags); }
    147 34	STD		{ int aoutm68k_sys_chflags(const char *path, \
    148 			    u_long flags); }
    149 #else
    150 33	NOARGS		{ int sys_access(const char *path, int flags); }
    151 34	NOARGS		{ int sys_chflags(const char *path, u_long flags); }
    152 #endif
    153 35	NOARGS		{ int sys_fchflags(int fd, u_long flags); }
    154 36	NOARGS		{ void sys_sync(void); }
    155 37	NOARGS		{ int sys_kill(int pid, int signum); }
    156 #ifdef COMPAT_43
    157 38	STD		{ int aoutm68k_compat_43_sys_stat(const char *path, \
    158 			    struct aoutm68k_stat43 *ub); } stat43
    159 #else
    160 38	EXCL		aoutm68k_compat_43_sys_stat
    161 #endif
    162 39	NOARGS		{ pid_t sys_getppid(void); }
    163 #ifdef COMPAT_43
    164 40	STD		{ int aoutm68k_compat_43_sys_lstat(const char *path, \
    165 			    struct aoutm68k_stat43 *ub); } lstat43
    166 #else
    167 40	EXCL		aoutm68k_compat_43_sys_lstat
    168 #endif
    169 41	NOARGS		{ int sys_dup(int fd); }
    170 42	NOARGS		{ int sys_pipe(void); }
    171 43	NOARGS		{ gid_t sys_getegid(void); }
    172 44	NOARGS		{ int sys_profil(caddr_t samples, size_t size, \
    173 			    u_long offset, u_int scale); }
    174 #if defined(KTRACE) || !defined(_KERNEL)
    175 45	NOARGS		{ int sys_ktrace(const char *fname, int ops, \
    176 			    int facs, int pid); }
    177 #else
    178 45	EXCL		ktrace
    179 #endif
    180 #ifdef COMPAT_13
    181 46	NOARGS		{ int compat_13_sys_sigaction(int signum, \
    182 			    const struct sigaction13 *nsa, \
    183 			    struct sigaction13 *osa); } sigaction13
    184 #else
    185 46	EXCL		compat_13_sys_sigaction
    186 #endif
    187 47	NOARGS		{ gid_t sys_getgid(void); }
    188 #ifdef COMPAT_13
    189 48	NOARGS		{ int compat_13_sys_sigprocmask(int how, \
    190 			    int mask); } sigprocmask13
    191 #else
    192 48	EXCL		compat_13_sys_sigprocmask
    193 #endif
    194 49	NOARGS		{ int sys___getlogin(char *namebuf, size_t namelen); }
    195 50	NOARGS		{ int sys___setlogin(const char *namebuf); }
    196 51	NOARGS		{ int sys_acct(const char *path); }
    197 #ifdef COMPAT_13
    198 52	NOARGS		{ int compat_13_sys_sigpending(void); } sigpending13
    199 53	NOARGS		{ int compat_13_sys_sigaltstack( \
    200 			    const struct sigaltstack13 *nss, \
    201 			    struct sigaltstack13 *oss); } sigaltstack13
    202 #else
    203 52	EXCL		compat_13_sys_sigpending
    204 53	EXCL		compat_13_sys_sigaltstack
    205 #endif
    206 54	STD		{ int aoutm68k_sys_ioctl(int fd, \
    207 			    u_long com, ... void *data); }
    208 #ifdef COMPAT_12
    209 55	NOARGS		{ int compat_12_sys_reboot(int opt); } oreboot
    210 #else
    211 55	EXCL		compat_12_sys_reboot
    212 #endif
    213 #ifdef COMPAT_AOUT_ALTPATH
    214 56	STD		{ int aoutm68k_sys_revoke(const char *path); }
    215 57	STD		{ int aoutm68k_sys_symlink(const char *path, \
    216 			    const char *link); }
    217 58	STD		{ int aoutm68k_sys_readlink(const char *path, \
    218 			    char *buf, size_t count); }
    219 59	STD		{ int aoutm68k_sys_execve(const char *path, \
    220 			    char * const *argp, char * const *envp); }
    221 #else
    222 56	NOARGS		{ int sys_revoke(const char *path); }
    223 57	NOARGS		{ int sys_symlink(const char *path, \
    224 			    const char *link); }
    225 58	NOARGS		{ int sys_readlink(const char *path, \
    226 			    char *buf, size_t count); }
    227 59	NOARGS		{ int sys_execve(const char *path, \
    228 			    char * const *argp, char * const *envp); }
    229 #endif
    230 60	NOARGS		{ mode_t sys_umask(mode_t newmask); }
    231 #ifdef COMPAT_AOUT_ALTPATH
    232 61	STD		{ int aoutm68k_sys_chroot(const char *path); }
    233 #else
    234 61	NOARGS		{ int sys_chroot(const char *path); }
    235 #endif
    236 #ifdef COMPAT_43
    237 62	STD		{ int aoutm68k_compat_43_sys_fstat(int fd, \
    238 			    struct aoutm68k_stat43 *sb); } fstat43
    239 63	NOARGS		{ int compat_43_sys_getkerninfo(int op, char *where, \
    240 			    int *size, int arg); } ogetkerninfo
    241 64	NOARGS		{ int compat_43_sys_getpagesize(void); } ogetpagesize
    242 #else
    243 62	EXCL		aoutm68k_compat_43_sys_fstat
    244 63	EXCL		compat_43_sys_getkerninfo
    245 64	EXCL		compat_43_sys_getpagesize
    246 #endif
    247 #ifdef COMPAT_12
    248 65	NOARGS		{ int compat_12_sys_msync(caddr_t addr, size_t len); }
    249 #else
    250 65	EXCL		compat_12_sys_msync
    251 #endif
    252 ; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
    253 66	NOARGS		{ int sys_vfork(void); }
    254 67	OBSOL		vread
    255 68	OBSOL		vwrite
    256 69	NOARGS		{ int sys_sbrk(intptr_t incr); }
    257 70	NOARGS		{ int sys_sstk(int incr); }
    258 #ifdef COMPAT_43
    259 71	NOARGS		{ int compat_43_sys_mmap(caddr_t addr, size_t len, \
    260 			    int prot, int flags, int fd, long pos); } ommap
    261 #else
    262 71	EXCL		compat_43_sys_mmap
    263 #endif
    264 72	NOARGS		{ int sys_ovadvise(int anom); } vadvise
    265 73	NOARGS		{ int sys_munmap(void *addr, size_t len); }
    266 74	NOARGS		{ int sys_mprotect(void *addr, size_t len, \
    267 			    int prot); }
    268 75	NOARGS		{ int sys_madvise(void *addr, size_t len, \
    269 			    int behav); }
    270 76	OBSOL		vhangup
    271 77	OBSOL		vlimit
    272 78	NOARGS		{ int sys_mincore(caddr_t addr, size_t len, \
    273 			    char *vec); }
    274 79	NOARGS		{ int sys_getgroups(int gidsetsize, \
    275 			    gid_t *gidset); }
    276 80	NOARGS		{ int sys_setgroups(int gidsetsize, \
    277 			    const gid_t *gidset); }
    278 81	NOARGS		{ int sys_getpgrp(void); }
    279 82	NOARGS		{ int sys_setpgid(int pid, int pgid); }
    280 83	NOARGS		{ int sys_setitimer(int which, \
    281 			    const struct itimerval *itv, \
    282 			    struct itimerval *oitv); }
    283 #ifdef COMPAT_43
    284 84	NOARGS		{ int compat_43_sys_wait(void); } owait
    285 #else
    286 84	EXCL		compat_43_sys_wait
    287 #endif
    288 #ifdef COMPAT_12
    289 85	NOARGS		{ int compat_12_sys_swapon(const char *name); } oswapon
    290 #else
    291 85	EXCL		compat_12_sys_swapon
    292 #endif
    293 86	NOARGS		{ int sys_getitimer(int which, \
    294 			    struct itimerval *itv); }
    295 #ifdef COMPAT_43
    296 87	NOARGS		{ int compat_43_sys_gethostname(char *hostname, \
    297 			    u_int len); } ogethostname
    298 88	NOARGS		{ int compat_43_sys_sethostname(char *hostname, \
    299 			    u_int len); } osethostname
    300 89	NOARGS		{ int compat_43_sys_getdtablesize(void); } \
    301 			    ogetdtablesize
    302 #else
    303 87	EXCL		compat_43_sys_gethostname
    304 88	EXCL		compat_43_sys_sethostname
    305 89	EXCL		compat_43_sys_getdtablesize
    306 #endif
    307 90	NOARGS		{ int sys_dup2(int from, int to); }
    308 91	UNIMPL		getdopt
    309 92	NOARGS		{ int sys_fcntl(int fd, int cmd, ... void *arg); }
    310 93	NOARGS		{ int sys_select(int nd, fd_set *in, fd_set *ou, \
    311 			    fd_set *ex, struct timeval *tv); }
    312 94	UNIMPL		setdopt
    313 95	NOARGS		{ int sys_fsync(int fd); }
    314 96	NOARGS		{ int sys_setpriority(int which, int who, int prio); }
    315 97	NOARGS		{ int sys_socket(int domain, int type, int protocol); }
    316 98	NOARGS		{ int sys_connect(int s, const struct sockaddr *name, \
    317 			    int namelen); }
    318 #ifdef COMPAT_43
    319 99	NOARGS		{ int compat_43_sys_accept(int s, caddr_t name, \
    320 			    int *anamelen); } oaccept
    321 #else
    322 99	EXCL		compat_43_sys_accept
    323 #endif
    324 100	NOARGS		{ int sys_getpriority(int which, int who); }
    325 #ifdef COMPAT_43
    326 101	NOARGS		{ int compat_43_sys_send(int s, caddr_t buf, int len, \
    327 			    int flags); } osend
    328 102	NOARGS		{ int compat_43_sys_recv(int s, caddr_t buf, int len, \
    329 			    int flags); } orecv
    330 #else
    331 101	EXCL		compat_43_sys_send
    332 102	EXCL		compat_43_sys_recv
    333 #endif
    334 #ifdef COMPAT_13
    335 103	NOARGS		{ int compat_13_sys_sigreturn( \
    336 			    struct sigcontext13 *sigcntxp); } sigreturn13
    337 #else
    338 103	EXCL		compat_13_sys_sigreturn
    339 #endif
    340 104	NOARGS		{ int sys_bind(int s, const struct sockaddr *name, \
    341 			    int namelen); }
    342 105	NOARGS		{ int sys_setsockopt(int s, int level, int name, \
    343 			    const void *val, int valsize); }
    344 106	NOARGS		{ int sys_listen(int s, int backlog); }
    345 107	OBSOL		vtimes
    346 #ifdef COMPAT_43
    347 108	NOARGS		{ int compat_43_sys_sigvec(int signum, \
    348 			    struct sigvec *nsv, struct sigvec *osv); } osigvec
    349 109	NOARGS		{ int compat_43_sys_sigblock(int mask); } osigblock
    350 110	NOARGS		{ int compat_43_sys_sigsetmask(int mask); } osigsetmask
    351 #else
    352 108	EXCL		compat_43_sys_sigvec
    353 109	EXCL		compat_43_sys_sigblock
    354 110	EXCL		compat_43_sys_sigsetmask
    355 #endif
    356 #ifdef COMPAT_13
    357 111	NOARGS		{ int compat_13_sys_sigsuspend(int mask); } sigsuspend13
    358 #else
    359 111	EXCL		compat_13_sys_sigsuspend
    360 #endif
    361 #ifdef COMPAT_43
    362 112	NOARGS		{ int compat_43_sys_sigstack(struct sigstack *nss, \
    363 			    struct sigstack *oss); } osigstack
    364 113	NOARGS		{ int compat_43_sys_recvmsg(int s, \
    365 			    struct omsghdr *msg, int flags); } orecvmsg
    366 114	NOARGS		{ int compat_43_sys_sendmsg(int s, caddr_t msg, \
    367 			    int flags); } osendmsg
    368 #else
    369 112	EXCL		compat_43_sys_sigstack
    370 113	EXCL		compat_43_sys_recvmesg
    371 114	EXCL		compat_43_sys_sendmesg
    372 #endif
    373 115	OBSOL		vtrace
    374 116	NOARGS		{ int sys_gettimeofday(struct timeval *tp, \
    375 			    struct timezone *tzp); }
    376 117	NOARGS		{ int sys_getrusage(int who, struct rusage *rusage); }
    377 118	NOARGS		{ int sys_getsockopt(int s, int level, int name, \
    378 			    void *val, int *avalsize); }
    379 119	OBSOL		resuba
    380 120	NOARGS		{ ssize_t sys_readv(int fd, \
    381 			    const struct iovec *iovp, int iovcnt); }
    382 121	NOARGS		{ ssize_t sys_writev(int fd, \
    383 			    const struct iovec *iovp, int iovcnt); }
    384 122	NOARGS		{ int sys_settimeofday(const struct timeval *tv, \
    385 			    const struct timezone *tzp); }
    386 123	NOARGS		{ int sys_fchown(int fd, uid_t uid, gid_t gid); }
    387 124	NOARGS		{ int sys_fchmod(int fd, mode_t mode); }
    388 #ifdef COMPAT_43
    389 125	NOARGS		{ int compat_43_sys_recvfrom(int s, caddr_t buf, \
    390 			    size_t len, int flags, caddr_t from, \
    391 			    int *fromlenaddr); } orecvfrom
    392 #else
    393 125	EXCL		compat_43_sys_recvfrom
    394 #endif
    395 126	NOARGS		{ int sys_setreuid(uid_t ruid, uid_t euid); }
    396 127	NOARGS		{ int sys_setregid(gid_t rgid, gid_t egid); }
    397 #ifdef COMPAT_AOUT_ALTPATH
    398 128	STD		{ int aoutm68k_sys_rename(const char *from, \
    399 			    const char *to); }
    400 #else
    401 128	NOARGS		{ int sys_rename(const char *from, const char *to); }
    402 #endif
    403 #ifdef COMPAT_43
    404 #ifdef COMPAT_AOUT_ALTPATH
    405 129	STD		{ int aoutm68k_compat_43_sys_truncate(const char *path, \
    406 			    long length); } otruncate
    407 #else
    408 129	NOARGS		{ int compat_43_sys_truncate(const char *path, \
    409 			    long length); } otruncate
    410 #endif
    411 130	NOARGS		{ int compat_43_sys_ftruncate(int fd, long length); } \
    412 			    oftruncate
    413 #else
    414 #ifdef COMPAT_AOUT_ALTPATH
    415 129	EXCL		aoutm68k_compat_43_sys_truncate
    416 #else
    417 129	EXCL		compat_43_sys_truncate
    418 #endif
    419 130	EXCL		compat_43_sys_ftruncate
    420 #endif
    421 131	NOARGS		{ int sys_flock(int fd, int how); }
    422 132	NOARGS		{ int sys_mkfifo(const char *path, mode_t mode); }
    423 133	NOARGS		{ ssize_t sys_sendto(int s, const void *buf, \
    424 			    size_t len, int flags, const struct sockaddr *to, \
    425 			    int tolen); }
    426 134	NOARGS		{ int sys_shutdown(int s, int how); }
    427 135	NOARGS		{ int sys_socketpair(int domain, int type, \
    428 			    int protocol, int *rsv); }
    429 136	NOARGS		{ int sys_mkdir(const char *path, mode_t mode); }
    430 #ifdef COMPAT_AOUT_ALTPATH
    431 137	STD		{ int aoutm68k_sys_rmdir(const char *path); }
    432 138	STD		{ int aoutm68k_sys_utimes(const char *path, \
    433 			    const struct timeval *tptr); }
    434 #else
    435 137	NOARGS		{ int sys_rmdir(const char *path); }
    436 138	NOARGS		{ int sys_utimes(const char *path, \
    437 			    const struct timeval *tptr); }
    438 #endif
    439 139	OBSOL		4.2 sigreturn
    440 140	NOARGS		{ int sys_adjtime(const struct timeval *delta, \
    441 			    struct timeval *olddelta); }
    442 #ifdef COMPAT_43
    443 141	NOARGS		{ int compat_43_sys_getpeername(int fdes, caddr_t asa, \
    444 			    int *alen); } ogetpeername
    445 142	NOARGS		{ int32_t compat_43_sys_gethostid(void); } ogethostid
    446 143	NOARGS		{ int compat_43_sys_sethostid(int32_t hostid); } \
    447 			    osethostid
    448 144	NOARGS		{ int compat_43_sys_getrlimit(int which, \
    449 			    struct orlimit *rlp); } ogetrlimit
    450 145	NOARGS		{ int compat_43_sys_setrlimit(int which, \
    451 			    const struct orlimit *rlp); } osetrlimit
    452 146	NOARGS		{ int compat_43_sys_killpg(int pgid, int signum); } \
    453 			    okillpg
    454 #else
    455 141	EXCL		compat_43_sys_getpeername
    456 142	EXCL		compat_43_sys_gethostid
    457 143	EXCL		compat_43_sys_sethostid
    458 144	EXCL		compat_43_sys_getrlimit
    459 145	EXCL		compat_43_sys_setrlimit
    460 146	EXCL		compat_43_sys_killpg
    461 #endif
    462 147	NOARGS		{ int sys_setsid(void); }
    463 148	NOARGS		{ int sys_quotactl(const char *path, \
    464 			    int cmd, int uid, caddr_t arg); }
    465 #ifdef COMPAT_43
    466 149	NOARGS		{ int compat_43_sys_quota(void); } oquota
    467 150	NOARGS		{ int compat_43_sys_getsockname(int fdec, caddr_t asa, \
    468 			    int *alen); } ogetsockname
    469 #else
    470 149	EXCL		compat_43_sys_quota
    471 150	EXCL		compat_43_sys_getsockname
    472 #endif
    473 
    474 ; Syscalls 151-180 inclusive are reserved for vendor-specific
    475 ; system calls.  (This includes various calls added for compatibity
    476 ; with other Unix variants.)
    477 ; Some of these calls are now supported by BSD...
    478 151	UNIMPL
    479 152	UNIMPL
    480 153	UNIMPL
    481 154	UNIMPL
    482 #if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
    483 155	NOARGS		{ int sys_nfssvc(int flag, void *argp); }
    484 #else
    485 155	EXCL		nfssvc
    486 #endif
    487 #ifdef COMPAT_43
    488 156	NOARGS		{ int compat_43_sys_getdirentries(int fd, char *buf, \
    489 			    u_int count, long *basep); } ogetdirentries
    490 #else
    491 156	EXCL		compat_43_sys_getdirentries
    492 #endif
    493 #ifdef COMPAT_AOUT_ALTPATH
    494 157	STD		{ int aoutm68k_sys_statfs(const char *path, \
    495 			    struct statfs *buf); }
    496 #else
    497 157	NOARGS		{ int sys_statfs(const char *path, \
    498 			    struct statfs *buf); }
    499 #endif
    500 158	NOARGS		{ int sys_fstatfs(int fd, struct statfs *buf); }
    501 159	UNIMPL
    502 160	UNIMPL
    503 #if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
    504 #ifdef COMPAT_AOUT_ALTPATH
    505 161	STD		{ int aoutm68k_sys_getfh(const char *fname, \
    506 			    fhandle_t *fhp); }
    507 #else
    508 161	NOARGS		{ int sys_getfh(const char *fname, fhandle_t *fhp); }
    509 #endif
    510 #else
    511 161	EXCL		getfh
    512 #endif
    513 #ifdef COMPAT_09
    514 162	NOARGS		{ int compat_09_sys_getdomainname(char *domainname, \
    515 			    int len); } ogetdomainname
    516 163	NOARGS		{ int compat_09_sys_setdomainname(char *domainname, \
    517 			    int len); } osetdomainname
    518 164	NOARGS		{ int compat_09_sys_uname(struct outsname *name); } \
    519 			    ouname
    520 #else
    521 162	EXCL		compat_09_sys_getdomainname
    522 163	EXCL		compat_09_sys_setdomainname
    523 164	EXCL		compat_09_sys_uname
    524 #endif
    525 165	NOARGS		{ int sys_sysarch(int op, void *parms); }
    526 166	UNIMPL
    527 167	UNIMPL
    528 168	UNIMPL
    529 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
    530 #if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64) && defined(COMPAT_10)
    531 169	NOARGS		{ int compat_10_sys_semsys(int which, int a2, int a3, \
    532 			    int a4, int a5); } osemsys
    533 #else
    534 169	EXCL		1.0 semsys
    535 #endif
    536 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
    537 #if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64) && defined(COMPAT_10)
    538 170	NOARGS		{ int compat_10_sys_msgsys(int which, int a2, int a3, \
    539 			    int a4, int a5, int a6); } omsgsys
    540 #else
    541 170	EXCL		1.0 msgsys
    542 #endif
    543 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
    544 #if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64) && defined(COMPAT_10)
    545 171	NOARGS		{ int compat_10_sys_shmsys(int which, int a2, int a3, \
    546 			    int a4); } oshmsys
    547 #else
    548 171	EXCL		1.0 shmsys
    549 #endif
    550 172	UNIMPL
    551 173	NOARGS		{ ssize_t sys_pread(int fd, void *buf, \
    552 			    size_t nbyte, int pad, off_t offset); }
    553 174	NOARGS		{ ssize_t sys_pwrite(int fd, const void *buf, \
    554 			    size_t nbyte, int pad, off_t offset); }
    555 ; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded.
    556 175	NOARGS		{ int sys_ntp_gettime(struct ntptimeval *ntvp); }
    557 #if defined(NTP) || !defined(_KERNEL)
    558 176	NOARGS		{ int sys_ntp_adjtime(struct timex *tp); }
    559 #else
    560 176	EXCL		ntp_adjtime
    561 #endif
    562 177	UNIMPL
    563 178	UNIMPL
    564 179	UNIMPL
    565 180	UNIMPL
    566 
    567 ; Syscalls 180-199 are used by/reserved for BSD
    568 181	NOARGS		{ int sys_setgid(gid_t gid); }
    569 182	NOARGS		{ int sys_setegid(gid_t egid); }
    570 183	NOARGS		{ int sys_seteuid(uid_t euid); }
    571 #if defined(LFS) || !defined(_KERNEL)
    572 184	NOARGS		{ int sys_lfs_bmapv(fsid_t *fsidp, \
    573 			    struct block_info *blkiov, int blkcnt); }
    574 185	NOARGS		{ int sys_lfs_markv(fsid_t *fsidp, \
    575 			    struct block_info *blkiov, int blkcnt); }
    576 186	NOARGS		{ int sys_lfs_segclean(fsid_t *fsidp, u_long segment); }
    577 187	NOARGS		{ int sys_lfs_segwait(fsid_t *fsidp, \
    578 			    struct timeval *tv); }
    579 #else
    580 184	EXCL		lfs_bmapv
    581 185	EXCL		lfs_markv
    582 186	EXCL		lfs_segclean
    583 187	EXCL		lfs_segwait
    584 #endif
    585 #ifdef COMPAT_12
    586 188	STD	{	 int aoutm68k_compat_12_sys_stat(const char *path, \
    587 			    struct aoutm68k_stat12 *ub); } stat12
    588 189	STD		{ int aoutm68k_compat_12_sys_fstat(int fd, \
    589 			    struct aoutm68k_stat12 *sb); } fstat12
    590 190	STD		{ int aoutm68k_compat_12_sys_lstat(const char *path, \
    591 			    struct aoutm68k_stat12 *ub); } lstat12
    592 #else
    593 188	EXCL		aoutm68k_compat_12_sys_stat
    594 189	EXCL		aoutm68k_compat_12_sys_fstat
    595 190	EXCL		aoutm68k_compat_12_sys_lstat
    596 #endif
    597 #ifdef COMPAT_AOUT_ALTPATH
    598 191	STD		{ long aoutm68k_sys_pathconf(const char *path, \
    599 			    int name); }
    600 #else
    601 191	NOARGS		{ long sys_pathconf(const char *path, int name); }
    602 #endif
    603 192	NOARGS		{ long sys_fpathconf(int fd, int name); }
    604 193	UNIMPL
    605 194	NOARGS		{ int sys_getrlimit(int which, \
    606 			    struct rlimit *rlp); }
    607 195	NOARGS		{ int sys_setrlimit(int which, \
    608 			    const struct rlimit *rlp); }
    609 #ifdef COMPAT_12
    610 196	NOARGS		{ int compat_12_sys_getdirentries(int fd, char *buf, \
    611 			    u_int count, long *basep); }
    612 #else
    613 196	EXCL		compat_12_sys_getdirentries
    614 #endif
    615 197	NOARGS		{ void *sys_mmap(void *addr, size_t len, int prot, \
    616 			    int flags, int fd, long pad, off_t pos); }
    617 198	INDIR		{ quad_t sys___syscall(quad_t num, ...); }
    618 199	NOARGS		{ off_t sys_lseek(int fd, int pad, off_t offset, \
    619 			    int whence); }
    620 #ifdef COMPAT_AOUT_ALTPATH
    621 200	STD		{ int aoutm68k_sys_truncate(const char *path, int pad, \
    622 			    off_t length); }
    623 #else
    624 200	NOARGS		{ int sys_truncate(const char *path, int pad, \
    625 			    off_t length); }
    626 #endif
    627 201	NOARGS		{ int sys_ftruncate(int fd, int pad, off_t length); }
    628 202	NOARGS		{ int sys___sysctl(int *name, u_int namelen, \
    629 			    void *old, size_t *oldlenp, void *new, \
    630 			    size_t newlen); }
    631 203	NOARGS		{ int sys_mlock(const void *addr, size_t len); }
    632 204	NOARGS		{ int sys_munlock(const void *addr, size_t len); }
    633 #ifdef COMPAT_AOUT_ALTPATH
    634 205	STD		{ int aoutm68k_sys_undelete(const char *path); }
    635 #else
    636 205	NOARGS		{ int sys_undelete(const char *path); }
    637 #endif
    638 206	NOARGS		{ int sys_futimes(int fd, \
    639 			    const struct timeval *tptr); }
    640 207	NOARGS		{ pid_t sys_getpgid(pid_t pid); }
    641 208	NOARGS		{ int sys_reboot(int opt, char *bootstr); }
    642 209	NOARGS		{ int sys_poll(struct pollfd *fds, u_int nfds, \
    643 			    int timeout); }
    644 ;
    645 ; Syscalls 210-219 are reserved for dynamically loaded syscalls
    646 ;
    647 #if defined(LKM) || !defined(_KERNEL)
    648 210	NODEF		{ int sys_lkmnosys(void); }
    649 211	NODEF		{ int sys_lkmnosys(void); }
    650 212	NODEF		{ int sys_lkmnosys(void); }
    651 213	NODEF		{ int sys_lkmnosys(void); }
    652 214	NODEF		{ int sys_lkmnosys(void); }
    653 215	NODEF		{ int sys_lkmnosys(void); }
    654 216	NODEF		{ int sys_lkmnosys(void); }
    655 217	NODEF		{ int sys_lkmnosys(void); }
    656 218	NODEF		{ int sys_lkmnosys(void); }
    657 219	NODEF		{ int sys_lkmnosys(void); }
    658 #else	/* !LKM */
    659 210	EXCL		lkmnosys
    660 211	EXCL		lkmnosys
    661 212	EXCL		lkmnosys
    662 213	EXCL		lkmnosys
    663 214	EXCL		lkmnosys
    664 215	EXCL		lkmnosys
    665 216	EXCL		lkmnosys
    666 217	EXCL		lkmnosys
    667 218	EXCL		lkmnosys
    668 219	EXCL		lkmnosys
    669 #endif	/* !LKM */
    670 ; System calls 220-300 are reserved for use by NetBSD
    671 #if defined(SYSVSEM) || !defined(_KERNEL)
    672 #ifdef COMPAT_14
    673 220	NOARGS		{ int compat_14_sys___semctl(int semid, \
    674 			    int semnum, int cmd, union __semun *arg); }
    675 #else
    676 220	EXCL		compat_14_semctl
    677 #endif
    678 221	NOARGS		{ int sys_semget(key_t key, int nsems, int semflg); }
    679 222	NOARGS		{ int sys_semop(int semid, struct sembuf *sops, \
    680 			    size_t nsops); }
    681 223	NOARGS		{ int sys_semconfig(int flag); }
    682 #else
    683 220	EXCL		compat_14_semctl
    684 221	EXCL		semget
    685 222	EXCL		semop
    686 223	EXCL		semconfig
    687 #endif
    688 #if defined(SYSVMSG) || !defined(_KERNEL)
    689 #ifdef COMPAT_14
    690 224	NOARGS		{ int compat_14_sys_msgctl(int msqid, int cmd, \
    691 			    struct msqid_ds14 *buf); }
    692 #else
    693 224	EXCL		compat_14_sys_msgctl
    694 #endif
    695 225	NOARGS		{ int sys_msgget(key_t key, int msgflg); }
    696 226	NOARGS		{ int sys_msgsnd(int msqid, const void *msgp, \
    697 			    size_t msgsz, int msgflg); }
    698 227	NOARGS		{ ssize_t sys_msgrcv(int msqid, void *msgp, \
    699 			    size_t msgsz, long msgtyp, int msgflg); }
    700 #else
    701 224	EXCL		compat_14_msgctl
    702 225	EXCL		msgget
    703 226	EXCL		msgsnd
    704 227	EXCL		msgrcv
    705 #endif
    706 #if defined(SYSVSHM) || !defined(_KERNEL)
    707 228	NOARGS		{ void *sys_shmat(int shmid, const void *shmaddr, \
    708 			    int shmflg); }
    709 #ifdef COMPAT_14
    710 229	NOARGS		{ int compat_14_sys_shmctl(int shmid, int cmd, \
    711 			    struct shmid_ds14 *buf); }
    712 #else
    713 229	EXCL		compat_14_sys_shmctl
    714 #endif
    715 230	NOARGS		{ int sys_shmdt(const void *shmaddr); }
    716 231	NOARGS		{ int sys_shmget(key_t key, size_t size, int shmflg); }
    717 #else
    718 228	EXCL		shmat
    719 229	EXCL		compat_14_shmctl
    720 230	EXCL		shmdt
    721 231	EXCL		shmget
    722 #endif
    723 232	NOARGS		{ int sys_clock_gettime(clockid_t clock_id, \
    724 			    struct timespec *tp); }
    725 233	NOARGS		{ int sys_clock_settime(clockid_t clock_id, \
    726 			    const struct timespec *tp); }
    727 234	NOARGS		{ int sys_clock_getres(clockid_t clock_id, \
    728 			    struct timespec *tp); }
    729 235	UNIMPL		timer_create
    730 236	UNIMPL		timer_delete
    731 237	UNIMPL		timer_settime
    732 238	UNIMPL		timer_gettime
    733 239	UNIMPL		timer_getoverrun
    734 ;
    735 ; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
    736 ;
    737 240	NOARGS		{ int sys_nanosleep(const struct timespec *rqtp, \
    738 			    struct timespec *rmtp); }
    739 241	NOARGS		{ int sys_fdatasync(int fd); }
    740 242	NOARGS		{ int sys_mlockall(int flags); }
    741 243	NOARGS		{ int sys_munlockall(void); }
    742 244	UNIMPL
    743 245	UNIMPL
    744 246	UNIMPL
    745 247	UNIMPL
    746 248	UNIMPL
    747 249	UNIMPL
    748 250	UNIMPL
    749 251	UNIMPL
    750 252	UNIMPL
    751 253	UNIMPL
    752 254	UNIMPL
    753 255	UNIMPL
    754 256	UNIMPL
    755 257	UNIMPL
    756 258	UNIMPL
    757 259	UNIMPL
    758 260	UNIMPL
    759 261	UNIMPL
    760 262	UNIMPL
    761 263	UNIMPL
    762 264	UNIMPL
    763 265	UNIMPL
    764 266	UNIMPL
    765 267	UNIMPL
    766 268	UNIMPL
    767 269	UNIMPL
    768 #ifdef COMPAT_AOUT_ALTPATH
    769 270	STD		{ int aoutm68k_sys___posix_rename(const char *from, \
    770 			    const char *to); }
    771 #else
    772 270	NOARGS		{ int sys___posix_rename(const char *from, \
    773 			    const char *to); }
    774 #endif
    775 271	NOARGS		{ int sys_swapctl(int cmd, const void *arg, int misc); }
    776 272	NOARGS		{ int sys_getdents(int fd, char *buf, size_t count); }
    777 273	NOARGS		{ int sys_minherit(void *addr, size_t len, \
    778 			    int inherit); }
    779 #ifdef COMPAT_AOUT_ALTPATH
    780 274	STD		{ int aoutm68k_sys_lchmod(const char *path, \
    781 			    mode_t mode); }
    782 275	STD		{ int aoutm68k_sys_lchown(const char *path, uid_t uid, \
    783 			    gid_t gid); }
    784 276	STD		{ int aoutm68k_sys_lutimes(const char *path, \
    785 			    const struct timeval *tptr); }
    786 #else
    787 274	NOARGS		{ int sys_lchmod(const char *path, mode_t mode); }
    788 275	NOARGS		{ int sys_lchown(const char *path, uid_t uid, \
    789 			    gid_t gid); }
    790 276	NOARGS		{ int sys_lutimes(const char *path, \
    791 			    const struct timeval *tptr); }
    792 #endif
    793 277	NOARGS		{ int sys___msync13(void *addr, size_t len, int flags); }
    794 278	STD		{ int aoutm68k_sys___stat13(const char *path, \
    795 			    struct aoutm68k_stat *ub); }
    796 279	STD		{ int aoutm68k_sys___fstat13(int fd, \
    797 			    struct aoutm68k_stat *sb); }
    798 280	STD		{ int aoutm68k_sys___lstat13(const char *path, \
    799 			    struct aoutm68k_stat *ub); }
    800 281	NOARGS		{ int sys___sigaltstack14( \
    801 			    const struct sigaltstack *nss, \
    802 			    struct sigaltstack *oss); }
    803 282	NOARGS		{ int sys___vfork14(void); }
    804 #ifdef COMPAT_AOUT_ALTPATH
    805 283	STD		{ int aoutm68k_sys___posix_chown(const char *path, \
    806 			    uid_t uid, gid_t gid); }
    807 #else
    808 283	NOARGS		{ int sys___posix_chown(const char *path, uid_t uid, \
    809 			    gid_t gid); }
    810 #endif
    811 284	NOARGS		{ int sys___posix_fchown(int fd, uid_t uid, \
    812 			    gid_t gid); }
    813 285	NOARGS		{ int sys___posix_lchown(const char *path, uid_t uid, \
    814 			    gid_t gid); }
    815 286	NOARGS		{ pid_t sys_getsid(pid_t pid); }
    816 287	UNIMPL
    817 #if defined(KTRACE) || !defined(_KERNEL)
    818 288	NOARGS		{ int sys_fktrace(const int fd, int ops, \
    819 			    int facs, int pid); }
    820 #else
    821 288	EXCL		ktrace
    822 #endif
    823 289	NOARGS		{ ssize_t sys_preadv(int fd, \
    824 			    const struct iovec *iovp, int iovcnt, \
    825 			    int pad, off_t offset); }
    826 290	NOARGS		{ ssize_t sys_pwritev(int fd, \
    827 			    const struct iovec *iovp, int iovcnt, \
    828 			    int pad, off_t offset); }
    829 #ifdef COMPAT_16
    830 291	NOARGS		{ int compat_16_sys___sigaction14(int signum, \
    831 			    const struct sigaction *nsa, \
    832 			    struct sigaction *osa); }
    833 #else
    834 291	EXCL		compat_16_sys___sigaction14
    835 #endif
    836 292	NOARGS		{ int sys___sigpending14(sigset_t *set); }
    837 293	NOARGS		{ int sys___sigprocmask14(int how, \
    838 			    const sigset_t *set, \
    839 			    sigset_t *oset); }
    840 294	NOARGS		{ int sys___sigsuspend14(const sigset_t *set); }
    841 #ifdef COMPAT_16
    842 295	NOARGS		{ int compat_16_sys___sigreturn14(\
    843 			    struct sigcontext *sigcntxp); }
    844 #else
    845 295	EXCL		compat_16_sys___sigreturn14
    846 #endif
    847 296	NOARGS		{ int sys___getcwd(char *bufp, size_t length); }
    848 297	NOARGS		{ int sys_fchroot(int fd); }
    849 298	NOARGS		{ int sys_fhopen(const fhandle_t *fhp, int flags); }
    850 299	STD		{ int aoutm68k_sys_fhstat(const fhandle_t *fhp, \
    851 			    struct aoutm68k_stat *sb); }
    852 300	NOARGS		{ int sys_fhstatfs(const fhandle_t *fhp, \
    853 			    struct statfs *buf); }
    854 #if defined(SYSVSEM) || !defined(_KERNEL)
    855 301	NOARGS		{ int sys_____semctl13(int semid, int semnum, int cmd, \
    856 			    ... union __semun *arg); }
    857 #else
    858 301	EXCL		____semctl13
    859 #endif
    860 #if defined(SYSVMSG) || !defined(_KERNEL)
    861 302	NOARGS		{ int sys___msgctl13(int msqid, int cmd, \
    862 			    struct msqid_ds *buf); }
    863 #else
    864 302	EXCL		__msgctl13
    865 #endif
    866 #if defined(SYSVSHM) || !defined(_KERNEL)
    867 303	NOARGS		{ int sys___shmctl13(int shmid, int cmd, \
    868 			    struct shmid_ds *buf); }
    869 #else
    870 303	EXCL		__shmctl13
    871 #endif
    872 304	NOARGS		{ int sys_lchflags(const char *path, u_long flags); }
    873 305	NOARGS		{ int sys_issetugid(void); }
    874 306	NOARGS		{ int sys_getcontext(struct __ucontext *ucp); }
    875 307	NOARGS		{ int sys_setcontext(const struct __ucontext *ucp); }
    876