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