syscalls.master revision 1.105
11.105Sjdolecek $NetBSD: syscalls.master,v 1.105 2000/12/28 11:10:15 jdolecek Exp $ 21.28Smycroft 31.22Scgd; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 41.1Sglass 51.23Scgd; NetBSD system call name/number "master" file. 61.23Scgd; (See syscalls.conf to see what it is processed into.) 71.23Scgd; 81.23Scgd; Fields: number type [type-dependent ...] 91.1Sglass; number system call number, must be in order 101.23Scgd; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 111.24Smycroft; the compatibility options defined in syscalls.conf. 121.23Scgd; 131.1Sglass; types: 141.1Sglass; STD always included 151.23Scgd; OBSOL obsolete, not included in system 161.24Smycroft; UNIMPL unimplemented, not included in system 171.92Schristos; EXCL implemented, but not included in system 181.23Scgd; NODEF included, but don't define the syscall number 191.23Scgd; NOARGS included, but don't define the syscall args structure 201.43Scgd; INDIR included, but don't define the syscall args structure, 211.43Scgd; and allow it to be "really" varargs. 221.23Scgd; 231.23Scgd; The compat options are defined in the syscalls.conf file, and the 241.23Scgd; compat option name is prefixed to the syscall name. Other than 251.23Scgd; that, they're like NODEF (for 'compat' options), or STD (for 261.23Scgd; 'libcompat' options). 271.23Scgd; 281.23Scgd; The type-dependent arguments are as follows: 291.23Scgd; For STD, NODEF, NOARGS, and compat syscalls: 301.23Scgd; { pseudo-proto } [alias] 311.23Scgd; For other syscalls: 321.23Scgd; [comment] 331.23Scgd; 341.23Scgd; #ifdef's, etc. may be included, and are copied to the output files. 351.70Sthorpej; #include's are copied to the syscall names and switch definition files only. 361.77Sthorpej 371.77Sthorpej#include "opt_ktrace.h" 381.78Sthorpej#include "opt_nfsserver.h" 391.102Sbjh21#include "opt_ntp.h" 401.81Sjonathan#include "opt_compat_netbsd.h" 411.85Stron#include "opt_sysv.h" 421.87Schristos#include "opt_compat_43.h" 431.70Sthorpej 441.70Sthorpej#include "fs_lfs.h" 451.70Sthorpej#include "fs_nfs.h" 461.1Sglass 471.23Scgd#include <sys/param.h> 481.23Scgd#include <sys/systm.h> 491.23Scgd#include <sys/signal.h> 501.23Scgd#include <sys/mount.h> 511.23Scgd#include <sys/syscallargs.h> 521.103Smycroft 531.103Smycroft%% 541.1Sglass 551.1Sglass; Reserved/unimplemented system calls in the range 0-150 inclusive 561.1Sglass; are reserved for use in future Berkeley releases. 571.1Sglass; Additional system calls implemented in vendor and other 581.1Sglass; redistributions should be placed in the reserved range at the end 591.1Sglass; of the current calls. 601.1Sglass 611.43Scgd0 INDIR { int sys_syscall(int number, ...); } 621.44Scgd1 STD { void sys_exit(int rval); } 631.28Smycroft2 STD { int sys_fork(void); } 641.46Scgd3 STD { ssize_t sys_read(int fd, void *buf, size_t nbyte); } 651.46Scgd4 STD { ssize_t sys_write(int fd, const void *buf, \ 661.46Scgd size_t nbyte); } 671.46Scgd5 STD { int sys_open(const char *path, \ 681.60Schristos int flags, ... mode_t mode); } 691.28Smycroft6 STD { int sys_close(int fd); } 701.28Smycroft7 STD { int sys_wait4(int pid, int *status, int options, \ 711.23Scgd struct rusage *rusage); } 721.60Schristos8 COMPAT_43 { int sys_creat(const char *path, mode_t mode); } ocreat 731.46Scgd9 STD { int sys_link(const char *path, const char *link); } 741.46Scgd10 STD { int sys_unlink(const char *path); } 751.23Scgd11 OBSOL execv 761.46Scgd12 STD { int sys_chdir(const char *path); } 771.28Smycroft13 STD { int sys_fchdir(int fd); } 781.60Schristos14 STD { int sys_mknod(const char *path, mode_t mode, \ 791.60Schristos dev_t dev); } 801.60Schristos15 STD { int sys_chmod(const char *path, mode_t mode); } 811.46Scgd16 STD { int sys_chown(const char *path, uid_t uid, \ 821.46Scgd gid_t gid); } 831.28Smycroft17 STD { int sys_obreak(char *nsize); } break 841.28Smycroft18 STD { int sys_getfsstat(struct statfs *buf, long bufsize, \ 851.23Scgd int flags); } 861.29Smycroft19 COMPAT_43 { long sys_lseek(int fd, long offset, int whence); } \ 871.29Smycroft olseek 881.104Smycroft#ifdef COMPAT_43 891.104Smycroft20 STD { pid_t sys_getpid_with_ppid(void); } getpid 901.104Smycroft#else 911.28Smycroft20 STD { pid_t sys_getpid(void); } 921.104Smycroft#endif 931.46Scgd21 STD { int sys_mount(const char *type, const char *path, \ 941.46Scgd int flags, void *data); } 951.46Scgd22 STD { int sys_unmount(const char *path, int flags); } 961.28Smycroft23 STD { int sys_setuid(uid_t uid); } 971.104Smycroft#ifdef COMPAT_43 981.104Smycroft24 STD { uid_t sys_getuid_with_euid(void); } getuid 991.104Smycroft#else 1001.28Smycroft24 STD { uid_t sys_getuid(void); } 1011.104Smycroft#endif 1021.28Smycroft25 STD { uid_t sys_geteuid(void); } 1031.28Smycroft26 STD { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ 1041.23Scgd int data); } 1051.44Scgd27 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ 1061.28Smycroft int flags); } 1071.46Scgd28 STD { ssize_t sys_sendmsg(int s, \ 1081.46Scgd const struct msghdr *msg, int flags); } 1091.46Scgd29 STD { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ 1101.46Scgd int flags, struct sockaddr *from, \ 1111.88Skleink unsigned int *fromlenaddr); } 1121.46Scgd30 STD { int sys_accept(int s, struct sockaddr *name, \ 1131.88Skleink unsigned int *anamelen); } 1141.46Scgd31 STD { int sys_getpeername(int fdes, struct sockaddr *asa, \ 1151.88Skleink unsigned int *alen); } 1161.46Scgd32 STD { int sys_getsockname(int fdes, struct sockaddr *asa, \ 1171.88Skleink unsigned int *alen); } 1181.46Scgd33 STD { int sys_access(const char *path, int flags); } 1191.46Scgd34 STD { int sys_chflags(const char *path, u_long flags); } 1201.46Scgd35 STD { int sys_fchflags(int fd, u_long flags); } 1211.44Scgd36 STD { void sys_sync(void); } 1221.28Smycroft37 STD { int sys_kill(int pid, int signum); } 1231.60Schristos38 COMPAT_43 { int sys_stat(const char *path, struct stat43 *ub); } \ 1241.60Schristos stat43 1251.28Smycroft39 STD { pid_t sys_getppid(void); } 1261.60Schristos40 COMPAT_43 { int sys_lstat(const char *path, \ 1271.60Schristos struct stat43 *ub); } lstat43 1281.59Smycroft41 STD { int sys_dup(int fd); } 1291.28Smycroft42 STD { int sys_pipe(void); } 1301.28Smycroft43 STD { gid_t sys_getegid(void); } 1311.30Scgd44 STD { int sys_profil(caddr_t samples, size_t size, \ 1321.30Scgd u_long offset, u_int scale); } 1331.92Schristos#if defined(KTRACE) || !defined(_KERNEL) 1341.46Scgd45 STD { int sys_ktrace(const char *fname, int ops, \ 1351.46Scgd int facs, int pid); } 1361.1Sglass#else 1371.92Schristos45 EXCL ktrace 1381.1Sglass#endif 1391.82Smycroft46 COMPAT_13 { int sys_sigaction(int signum, \ 1401.82Smycroft const struct sigaction13 *nsa, \ 1411.82Smycroft struct sigaction13 *osa); } sigaction13 1421.104Smycroft#ifdef COMPAT_43 1431.104Smycroft47 STD { gid_t sys_getgid_with_egid(void); } getgid 1441.104Smycroft#else 1451.28Smycroft47 STD { gid_t sys_getgid(void); } 1461.104Smycroft#endif 1471.82Smycroft48 COMPAT_13 { int sys_sigprocmask(int how, \ 1481.82Smycroft int mask); } sigprocmask13 1491.90Skleink49 STD { int sys___getlogin(char *namebuf, size_t namelen); } 1501.46Scgd50 STD { int sys_setlogin(const char *namebuf); } 1511.46Scgd51 STD { int sys_acct(const char *path); } 1521.82Smycroft52 COMPAT_13 { int sys_sigpending(void); } sigpending13 1531.82Smycroft53 COMPAT_13 { int sys_sigaltstack( \ 1541.82Smycroft const struct sigaltstack13 *nss, \ 1551.82Smycroft struct sigaltstack13 *oss); } sigaltstack13 1561.46Scgd54 STD { int sys_ioctl(int fd, \ 1571.61Schristos u_long com, ... void *data); } 1581.34Smrg55 COMPAT_12 { int sys_reboot(int opt); } oreboot 1591.46Scgd56 STD { int sys_revoke(const char *path); } 1601.46Scgd57 STD { int sys_symlink(const char *path, \ 1611.46Scgd const char *link); } 1621.46Scgd58 STD { int sys_readlink(const char *path, char *buf, \ 1631.72Skleink size_t count); } 1641.46Scgd59 STD { int sys_execve(const char *path, \ 1651.46Scgd char * const *argp, char * const *envp); } 1661.62Smycroft60 STD { mode_t sys_umask(mode_t newmask); } 1671.46Scgd61 STD { int sys_chroot(const char *path); } 1681.60Schristos62 COMPAT_43 { int sys_fstat(int fd, struct stat43 *sb); } fstat43 1691.28Smycroft63 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ 1701.29Smycroft int arg); } ogetkerninfo 1711.29Smycroft64 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 1721.60Schristos65 COMPAT_12 { int sys_msync(caddr_t addr, size_t len); } 1731.67Sthorpej; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 1741.28Smycroft66 STD { int sys_vfork(void); } 1751.23Scgd67 OBSOL vread 1761.23Scgd68 OBSOL vwrite 1771.95Skleink69 STD { int sys_sbrk(intptr_t incr); } 1781.28Smycroft70 STD { int sys_sstk(int incr); } 1791.28Smycroft71 COMPAT_43 { int sys_mmap(caddr_t addr, size_t len, int prot, \ 1801.29Smycroft int flags, int fd, long pos); } ommap 1811.28Smycroft72 STD { int sys_ovadvise(int anom); } vadvise 1821.61Schristos73 STD { int sys_munmap(void *addr, size_t len); } 1831.61Schristos74 STD { int sys_mprotect(void *addr, size_t len, \ 1841.28Smycroft int prot); } 1851.61Schristos75 STD { int sys_madvise(void *addr, size_t len, \ 1861.28Smycroft int behav); } 1871.23Scgd76 OBSOL vhangup 1881.23Scgd77 OBSOL vlimit 1891.91Sthorpej78 STD { int sys_mincore(void *addr, size_t len, \ 1901.28Smycroft char *vec); } 1911.64Sthorpej79 STD { int sys_getgroups(int gidsetsize, \ 1921.59Smycroft gid_t *gidset); } 1931.64Sthorpej80 STD { int sys_setgroups(int gidsetsize, \ 1941.46Scgd const gid_t *gidset); } 1951.28Smycroft81 STD { int sys_getpgrp(void); } 1961.28Smycroft82 STD { int sys_setpgid(int pid, int pgid); } 1971.58Smycroft83 STD { int sys_setitimer(int which, \ 1981.46Scgd const struct itimerval *itv, \ 1991.46Scgd struct itimerval *oitv); } 2001.29Smycroft84 COMPAT_43 { int sys_wait(void); } owait 2011.52Smrg85 COMPAT_12 { int sys_swapon(const char *name); } oswapon 2021.58Smycroft86 STD { int sys_getitimer(int which, \ 2031.28Smycroft struct itimerval *itv); } 2041.29Smycroft87 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \ 2051.29Smycroft ogethostname 2061.29Smycroft88 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } \ 2071.29Smycroft osethostname 2081.29Smycroft89 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 2091.59Smycroft90 STD { int sys_dup2(int from, int to); } 2101.23Scgd91 UNIMPL getdopt 2111.44Scgd92 STD { int sys_fcntl(int fd, int cmd, ... void *arg); } 2121.64Sthorpej93 STD { int sys_select(int nd, fd_set *in, fd_set *ou, \ 2131.23Scgd fd_set *ex, struct timeval *tv); } 2141.23Scgd94 UNIMPL setdopt 2151.28Smycroft95 STD { int sys_fsync(int fd); } 2161.28Smycroft96 STD { int sys_setpriority(int which, int who, int prio); } 2171.28Smycroft97 STD { int sys_socket(int domain, int type, int protocol); } 2181.46Scgd98 STD { int sys_connect(int s, const struct sockaddr *name, \ 2191.88Skleink unsigned int namelen); } 2201.46Scgd99 COMPAT_43 { int sys_accept(int s, caddr_t name, \ 2211.46Scgd int *anamelen); } oaccept 2221.28Smycroft100 STD { int sys_getpriority(int which, int who); } 2231.28Smycroft101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \ 2241.29Smycroft int flags); } osend 2251.28Smycroft102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \ 2261.29Smycroft int flags); } orecv 2271.84Smycroft103 COMPAT_13 { int sys_sigreturn(struct sigcontext13 *sigcntxp); } \ 2281.83Smycroft sigreturn13 2291.46Scgd104 STD { int sys_bind(int s, const struct sockaddr *name, \ 2301.88Skleink unsigned int namelen); } 2311.28Smycroft105 STD { int sys_setsockopt(int s, int level, int name, \ 2321.88Skleink const void *val, unsigned int valsize); } 2331.28Smycroft106 STD { int sys_listen(int s, int backlog); } 2341.23Scgd107 OBSOL vtimes 2351.28Smycroft108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \ 2361.29Smycroft struct sigvec *osv); } osigvec 2371.29Smycroft109 COMPAT_43 { int sys_sigblock(int mask); } osigblock 2381.29Smycroft110 COMPAT_43 { int sys_sigsetmask(int mask); } osigsetmask 2391.82Smycroft111 COMPAT_13 { int sys_sigsuspend(int mask); } sigsuspend13 2401.28Smycroft112 COMPAT_43 { int sys_sigstack(struct sigstack *nss, \ 2411.29Smycroft struct sigstack *oss); } osigstack 2421.28Smycroft113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 2431.29Smycroft int flags); } orecvmsg 2441.29Smycroft114 COMPAT_43 { int sys_sendmsg(int s, caddr_t msg, int flags); } \ 2451.29Smycroft osendmsg 2461.23Scgd115 OBSOL vtrace 2471.28Smycroft116 STD { int sys_gettimeofday(struct timeval *tp, \ 2481.23Scgd struct timezone *tzp); } 2491.28Smycroft117 STD { int sys_getrusage(int who, struct rusage *rusage); } 2501.28Smycroft118 STD { int sys_getsockopt(int s, int level, int name, \ 2511.88Skleink void *val, unsigned int *avalsize); } 2521.26Scgd119 OBSOL resuba 2531.58Smycroft120 STD { ssize_t sys_readv(int fd, \ 2541.58Smycroft const struct iovec *iovp, int iovcnt); } 2551.46Scgd121 STD { ssize_t sys_writev(int fd, \ 2561.58Smycroft const struct iovec *iovp, int iovcnt); } 2571.46Scgd122 STD { int sys_settimeofday(const struct timeval *tv, \ 2581.46Scgd const struct timezone *tzp); } 2591.46Scgd123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); } 2601.60Schristos124 STD { int sys_fchmod(int fd, mode_t mode); } 2611.28Smycroft125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \ 2621.29Smycroft int flags, caddr_t from, int *fromlenaddr); } \ 2631.29Smycroft orecvfrom 2641.46Scgd126 STD { int sys_setreuid(uid_t ruid, uid_t euid); } 2651.46Scgd127 STD { int sys_setregid(gid_t rgid, gid_t egid); } 2661.46Scgd128 STD { int sys_rename(const char *from, const char *to); } 2671.60Schristos129 COMPAT_43 { int sys_truncate(const char *path, long length); } \ 2681.29Smycroft otruncate 2691.29Smycroft130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate 2701.28Smycroft131 STD { int sys_flock(int fd, int how); } 2711.60Schristos132 STD { int sys_mkfifo(const char *path, mode_t mode); } 2721.46Scgd133 STD { ssize_t sys_sendto(int s, const void *buf, \ 2731.46Scgd size_t len, int flags, const struct sockaddr *to, \ 2741.88Skleink unsigned int tolen); } 2751.28Smycroft134 STD { int sys_shutdown(int s, int how); } 2761.28Smycroft135 STD { int sys_socketpair(int domain, int type, \ 2771.28Smycroft int protocol, int *rsv); } 2781.60Schristos136 STD { int sys_mkdir(const char *path, mode_t mode); } 2791.46Scgd137 STD { int sys_rmdir(const char *path); } 2801.46Scgd138 STD { int sys_utimes(const char *path, \ 2811.46Scgd const struct timeval *tptr); } 2821.23Scgd139 OBSOL 4.2 sigreturn 2831.46Scgd140 STD { int sys_adjtime(const struct timeval *delta, \ 2841.23Scgd struct timeval *olddelta); } 2851.28Smycroft141 COMPAT_43 { int sys_getpeername(int fdes, caddr_t asa, \ 2861.29Smycroft int *alen); } ogetpeername 2871.29Smycroft142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 2881.29Smycroft143 COMPAT_43 { int sys_sethostid(int32_t hostid); } osethostid 2891.58Smycroft144 COMPAT_43 { int sys_getrlimit(int which, \ 2901.58Smycroft struct orlimit *rlp); } ogetrlimit 2911.58Smycroft145 COMPAT_43 { int sys_setrlimit(int which, \ 2921.58Smycroft const struct orlimit *rlp); } osetrlimit 2931.29Smycroft146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg 2941.28Smycroft147 STD { int sys_setsid(void); } 2951.46Scgd148 STD { int sys_quotactl(const char *path, int cmd, \ 2961.46Scgd int uid, caddr_t arg); } 2971.29Smycroft149 COMPAT_43 { int sys_quota(void); } oquota 2981.28Smycroft150 COMPAT_43 { int sys_getsockname(int fdec, caddr_t asa, \ 2991.29Smycroft int *alen); } ogetsockname 3001.1Sglass 3011.1Sglass; Syscalls 151-180 inclusive are reserved for vendor-specific 3021.1Sglass; system calls. (This includes various calls added for compatibity 3031.1Sglass; with other Unix variants.) 3041.1Sglass; Some of these calls are now supported by BSD... 3051.23Scgd151 UNIMPL 3061.23Scgd152 UNIMPL 3071.23Scgd153 UNIMPL 3081.23Scgd154 UNIMPL 3091.92Schristos#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 3101.46Scgd155 STD { int sys_nfssvc(int flag, void *argp); } 3111.1Sglass#else 3121.92Schristos155 EXCL nfssvc 3131.1Sglass#endif 3141.28Smycroft156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ 3151.29Smycroft u_int count, long *basep); } ogetdirentries 3161.46Scgd157 STD { int sys_statfs(const char *path, \ 3171.46Scgd struct statfs *buf); } 3181.28Smycroft158 STD { int sys_fstatfs(int fd, struct statfs *buf); } 3191.23Scgd159 UNIMPL 3201.23Scgd160 UNIMPL 3211.46Scgd161 STD { int sys_getfh(const char *fname, fhandle_t *fhp); } 3221.29Smycroft162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \ 3231.29Smycroft ogetdomainname 3241.29Smycroft163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \ 3251.29Smycroft osetdomainname 3261.29Smycroft164 COMPAT_09 { int sys_uname(struct outsname *name); } ouname 3271.71Sperry165 STD { int sys_sysarch(int op, void *parms); } 3281.23Scgd166 UNIMPL 3291.23Scgd167 UNIMPL 3301.23Scgd168 UNIMPL 3311.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 3321.92Schristos#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(alpha) 3331.28Smycroft169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \ 3341.29Smycroft int a5); } osemsys 3351.9Scgd#else 3361.92Schristos169 EXCL 1.0 semsys 3371.9Scgd#endif 3381.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 3391.92Schristos#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(alpha) 3401.28Smycroft170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \ 3411.29Smycroft int a5, int a6); } omsgsys 3421.9Scgd#else 3431.92Schristos170 EXCL 1.0 msgsys 3441.9Scgd#endif 3451.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 3461.92Schristos#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(alpha) 3471.29Smycroft171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } \ 3481.29Smycroft oshmsys 3491.1Sglass#else 3501.92Schristos171 EXCL 1.0 shmsys 3511.1Sglass#endif 3521.23Scgd172 UNIMPL 3531.79Sthorpej173 STD { ssize_t sys_pread(int fd, void *buf, \ 3541.80Sthorpej size_t nbyte, int pad, off_t offset); } 3551.79Sthorpej174 STD { ssize_t sys_pwrite(int fd, const void *buf, \ 3561.80Sthorpej size_t nbyte, int pad, off_t offset); } 3571.102Sbjh21; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded. 3581.45Scgd175 STD { int sys_ntp_gettime(struct ntptimeval *ntvp); } 3591.102Sbjh21#if defined(NTP) || !defined(_KERNEL) 3601.38Sthorpej176 STD { int sys_ntp_adjtime(struct timex *tp); } 3611.102Sbjh21#else 3621.102Sbjh21176 EXCL ntp_adjtime 3631.102Sbjh21#endif 3641.23Scgd177 UNIMPL 3651.23Scgd178 UNIMPL 3661.23Scgd179 UNIMPL 3671.23Scgd180 UNIMPL 3681.1Sglass 3691.1Sglass; Syscalls 180-199 are used by/reserved for BSD 3701.28Smycroft181 STD { int sys_setgid(gid_t gid); } 3711.28Smycroft182 STD { int sys_setegid(gid_t egid); } 3721.28Smycroft183 STD { int sys_seteuid(uid_t euid); } 3731.92Schristos#if defined(LFS) || !defined(_KERNEL) 3741.92Schristos184 STD { int sys_lfs_bmapv(fsid_t *fsidp, \ 3751.23Scgd struct block_info *blkiov, int blkcnt); } 3761.92Schristos185 STD { int sys_lfs_markv(fsid_t *fsidp, \ 3771.23Scgd struct block_info *blkiov, int blkcnt); } 3781.92Schristos186 STD { int sys_lfs_segclean(fsid_t *fsidp, u_long segment); } 3791.92Schristos187 STD { int sys_lfs_segwait(fsid_t *fsidp, \ 3801.92Schristos struct timeval *tv); } 3811.92Schristos#else 3821.92Schristos184 EXCL lfs_bmapv 3831.92Schristos185 EXCL lfs_markv 3841.92Schristos186 EXCL lfs_segclean 3851.92Schristos187 EXCL lfs_segwait 3861.23Scgd#endif 3871.60Schristos188 COMPAT_12 { int sys_stat(const char *path, struct stat12 *ub); } \ 3881.60Schristos stat12 3891.60Schristos189 COMPAT_12 { int sys_fstat(int fd, struct stat12 *sb); } fstat12 3901.60Schristos190 COMPAT_12 { int sys_lstat(const char *path, \ 3911.60Schristos struct stat12 *ub); } lstat12 3921.46Scgd191 STD { long sys_pathconf(const char *path, int name); } 3931.44Scgd192 STD { long sys_fpathconf(int fd, int name); } 3941.23Scgd193 UNIMPL 3951.58Smycroft194 STD { int sys_getrlimit(int which, \ 3961.58Smycroft struct rlimit *rlp); } 3971.58Smycroft195 STD { int sys_setrlimit(int which, \ 3981.46Scgd const struct rlimit *rlp); } 3991.57Sfvdl196 COMPAT_12 { int sys_getdirentries(int fd, char *buf, \ 4001.28Smycroft u_int count, long *basep); } 4011.61Schristos197 STD { void *sys_mmap(void *addr, size_t len, int prot, \ 4021.23Scgd int flags, int fd, long pad, off_t pos); } 4031.43Scgd198 INDIR { quad_t sys___syscall(quad_t num, ...); } 4041.28Smycroft199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ 4051.23Scgd int whence); } 4061.46Scgd200 STD { int sys_truncate(const char *path, int pad, \ 4071.46Scgd off_t length); } 4081.28Smycroft201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 4091.28Smycroft202 STD { int sys___sysctl(int *name, u_int namelen, \ 4101.28Smycroft void *old, size_t *oldlenp, void *new, \ 4111.28Smycroft size_t newlen); } 4121.75Skleink203 STD { int sys_mlock(const void *addr, size_t len); } 4131.75Skleink204 STD { int sys_munlock(const void *addr, size_t len); } 4141.46Scgd205 STD { int sys_undelete(const char *path); } 4151.46Scgd206 STD { int sys_futimes(int fd, \ 4161.46Scgd const struct timeval *tptr); } 4171.86Skleink207 STD { pid_t sys_getpgid(pid_t pid); } 4181.34Smrg208 STD { int sys_reboot(int opt, char *bootstr); } 4191.36Smycroft209 STD { int sys_poll(struct pollfd *fds, u_int nfds, \ 4201.35Smycroft int timeout); } 4211.11Scgd; 4221.11Scgd; Syscalls 210-219 are reserved for dynamically loaded syscalls 4231.11Scgd; 4241.92Schristos#if defined(LKM) || !defined(_KERNEL) 4251.28Smycroft210 NODEF { int sys_lkmnosys(void); } 4261.28Smycroft211 NODEF { int sys_lkmnosys(void); } 4271.28Smycroft212 NODEF { int sys_lkmnosys(void); } 4281.28Smycroft213 NODEF { int sys_lkmnosys(void); } 4291.28Smycroft214 NODEF { int sys_lkmnosys(void); } 4301.28Smycroft215 NODEF { int sys_lkmnosys(void); } 4311.28Smycroft216 NODEF { int sys_lkmnosys(void); } 4321.28Smycroft217 NODEF { int sys_lkmnosys(void); } 4331.28Smycroft218 NODEF { int sys_lkmnosys(void); } 4341.28Smycroft219 NODEF { int sys_lkmnosys(void); } 4351.11Scgd#else /* !LKM */ 4361.92Schristos210 EXCL lkmnosys 4371.92Schristos211 EXCL lkmnosys 4381.92Schristos212 EXCL lkmnosys 4391.92Schristos213 EXCL lkmnosys 4401.92Schristos214 EXCL lkmnosys 4411.92Schristos215 EXCL lkmnosys 4421.92Schristos216 EXCL lkmnosys 4431.92Schristos217 EXCL lkmnosys 4441.92Schristos218 EXCL lkmnosys 4451.92Schristos219 EXCL lkmnosys 4461.6Scgd#endif /* !LKM */ 4471.49Skleink; System calls 220-300 are reserved for use by NetBSD 4481.92Schristos#if defined(SYSVSEM) || !defined(_KERNEL) 4491.97Sthorpej220 COMPAT_14 { int sys___semctl(int semid, int semnum, int cmd, \ 4501.97Sthorpej union __semun *arg); } 4511.28Smycroft221 STD { int sys_semget(key_t key, int nsems, int semflg); } 4521.28Smycroft222 STD { int sys_semop(int semid, struct sembuf *sops, \ 4531.74Skleink size_t nsops); } 4541.28Smycroft223 STD { int sys_semconfig(int flag); } 4551.23Scgd#else 4561.97Sthorpej220 EXCL compat_14_semctl 4571.92Schristos221 EXCL semget 4581.92Schristos222 EXCL semop 4591.92Schristos223 EXCL semconfig 4601.23Scgd#endif 4611.92Schristos#if defined(SYSVMSG) || !defined(_KERNEL) 4621.97Sthorpej224 COMPAT_14 { int sys_msgctl(int msqid, int cmd, \ 4631.97Sthorpej struct msqid_ds14 *buf); } 4641.28Smycroft225 STD { int sys_msgget(key_t key, int msgflg); } 4651.74Skleink226 STD { int sys_msgsnd(int msqid, const void *msgp, \ 4661.74Skleink size_t msgsz, int msgflg); } 4671.74Skleink227 STD { ssize_t sys_msgrcv(int msqid, void *msgp, \ 4681.74Skleink size_t msgsz, long msgtyp, int msgflg); } 4691.23Scgd#else 4701.97Sthorpej224 EXCL compat_14_msgctl 4711.92Schristos225 EXCL msgget 4721.92Schristos226 EXCL msgsnd 4731.92Schristos227 EXCL msgrcv 4741.23Scgd#endif 4751.92Schristos#if defined(SYSVSHM) || !defined(_KERNEL) 4761.74Skleink228 STD { void *sys_shmat(int shmid, const void *shmaddr, \ 4771.44Scgd int shmflg); } 4781.97Sthorpej229 COMPAT_14 { int sys_shmctl(int shmid, int cmd, \ 4791.97Sthorpej struct shmid_ds14 *buf); } 4801.74Skleink230 STD { int sys_shmdt(const void *shmaddr); } 4811.74Skleink231 STD { int sys_shmget(key_t key, size_t size, int shmflg); } 4821.23Scgd#else 4831.92Schristos228 EXCL shmat 4841.97Sthorpej229 EXCL compat_14_shmctl 4851.92Schristos230 EXCL shmdt 4861.92Schristos231 EXCL shmget 4871.23Scgd#endif 4881.39Sjtc232 STD { int sys_clock_gettime(clockid_t clock_id, \ 4891.49Skleink struct timespec *tp); } 4901.39Sjtc233 STD { int sys_clock_settime(clockid_t clock_id, \ 4911.49Skleink const struct timespec *tp); } 4921.39Sjtc234 STD { int sys_clock_getres(clockid_t clock_id, \ 4931.49Skleink struct timespec *tp); } 4941.39Sjtc235 UNIMPL timer_create 4951.39Sjtc236 UNIMPL timer_delete 4961.39Sjtc237 UNIMPL timer_settime 4971.39Sjtc238 UNIMPL timer_gettime 4981.39Sjtc239 UNIMPL timer_getoverrun 4991.54Sveego; 5001.54Sveego; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 5011.54Sveego; 5021.48Sjtc240 STD { int sys_nanosleep(const struct timespec *rqtp, \ 5031.49Skleink struct timespec *rmtp); } 5041.76Skleink241 STD { int sys_fdatasync(int fd); } 5051.93Sthorpej242 STD { int sys_mlockall(int flags); } 5061.93Sthorpej243 STD { int sys_munlockall(void); } 5071.49Skleink244 UNIMPL 5081.49Skleink245 UNIMPL 5091.49Skleink246 UNIMPL 5101.49Skleink247 UNIMPL 5111.49Skleink248 UNIMPL 5121.49Skleink249 UNIMPL 5131.55Sveego250 UNIMPL 5141.49Skleink251 UNIMPL 5151.49Skleink252 UNIMPL 5161.49Skleink253 UNIMPL 5171.49Skleink254 UNIMPL 5181.49Skleink255 UNIMPL 5191.49Skleink256 UNIMPL 5201.49Skleink257 UNIMPL 5211.49Skleink258 UNIMPL 5221.49Skleink259 UNIMPL 5231.49Skleink260 UNIMPL 5241.49Skleink261 UNIMPL 5251.49Skleink262 UNIMPL 5261.49Skleink263 UNIMPL 5271.49Skleink264 UNIMPL 5281.49Skleink265 UNIMPL 5291.49Skleink266 UNIMPL 5301.49Skleink267 UNIMPL 5311.49Skleink268 UNIMPL 5321.49Skleink269 UNIMPL 5331.69Skleink270 STD { int sys___posix_rename(const char *from, \ 5341.49Skleink const char *to); } 5351.64Sthorpej271 STD { int sys_swapctl(int cmd, const void *arg, int misc); } 5361.57Sfvdl272 STD { int sys_getdents(int fd, char *buf, size_t count); } 5371.61Schristos273 STD { int sys_minherit(void *addr, size_t len, \ 5381.54Sveego int inherit); } 5391.60Schristos274 STD { int sys_lchmod(const char *path, mode_t mode); } 5401.56Senami275 STD { int sys_lchown(const char *path, uid_t uid, \ 5411.56Senami gid_t gid); } 5421.56Senami276 STD { int sys_lutimes(const char *path, \ 5431.56Senami const struct timeval *tptr); } 5441.63Sthorpej277 STD { int sys___msync13(void *addr, size_t len, int flags); } 5451.63Sthorpej278 STD { int sys___stat13(const char *path, struct stat *ub); } 5461.63Sthorpej279 STD { int sys___fstat13(int fd, struct stat *sb); } 5471.63Sthorpej280 STD { int sys___lstat13(const char *path, struct stat *ub); } 5481.82Smycroft281 STD { int sys___sigaltstack14( \ 5491.82Smycroft const struct sigaltstack *nss, \ 5501.82Smycroft struct sigaltstack *oss); } 5511.67Sthorpej282 STD { int sys___vfork14(void); } 5521.69Skleink283 STD { int sys___posix_chown(const char *path, uid_t uid, \ 5531.69Skleink gid_t gid); } 5541.69Skleink284 STD { int sys___posix_fchown(int fd, uid_t uid, \ 5551.69Skleink gid_t gid); } 5561.69Skleink285 STD { int sys___posix_lchown(const char *path, uid_t uid, \ 5571.69Skleink gid_t gid); } 5581.68Sthorpej286 STD { pid_t sys_getsid(pid_t pid); } 5591.73Schristos287 UNIMPL 5601.92Schristos#if defined(KTRACE) || !defined(_KERNEL) 5611.73Schristos288 STD { int sys_fktrace(const int fd, int ops, \ 5621.73Schristos int facs, int pid); } 5631.73Schristos#else 5641.92Schristos288 EXCL ktrace 5651.73Schristos#endif 5661.79Sthorpej289 STD { ssize_t sys_preadv(int fd, \ 5671.79Sthorpej const struct iovec *iovp, int iovcnt, \ 5681.80Sthorpej int pad, off_t offset); } 5691.79Sthorpej290 STD { ssize_t sys_pwritev(int fd, \ 5701.79Sthorpej const struct iovec *iovp, int iovcnt, \ 5711.80Sthorpej int pad, off_t offset); } 5721.82Smycroft291 STD { int sys___sigaction14(int signum, \ 5731.82Smycroft const struct sigaction *nsa, \ 5741.82Smycroft struct sigaction *osa); } 5751.82Smycroft292 STD { int sys___sigpending14(sigset_t *set); } 5761.82Smycroft293 STD { int sys___sigprocmask14(int how, \ 5771.82Smycroft const sigset_t *set, \ 5781.82Smycroft sigset_t *oset); } 5791.82Smycroft294 STD { int sys___sigsuspend14(const sigset_t *set); } 5801.83Smycroft295 STD { int sys___sigreturn14(struct sigcontext *sigcntxp); } 5811.89Ssommerfe296 STD { int sys___getcwd(char *bufp, size_t length); } 5821.89Ssommerfe297 STD { int sys_fchroot(int fd); } 5831.94Swrstuden298 STD { int sys_fhopen(const fhandle_t *fhp, int flags); } 5841.94Swrstuden299 STD { int sys_fhstat(const fhandle_t *fhp, \ 5851.94Swrstuden struct stat *sb); } 5861.94Swrstuden300 STD { int sys_fhstatfs(const fhandle_t *fhp, \ 5871.94Swrstuden struct statfs *buf); } 5881.97Sthorpej#if defined(SYSVSEM) || !defined(_KERNEL) 5891.99Schristos301 STD { int sys_____semctl13(int semid, int semnum, int cmd, \ 5901.99Schristos ... union __semun *arg); } 5911.97Sthorpej#else 5921.99Schristos301 EXCL ____semctl13 5931.97Sthorpej#endif 5941.97Sthorpej#if defined(SYSVMSG) || !defined(_KERNEL) 5951.97Sthorpej302 STD { int sys___msgctl13(int msqid, int cmd, \ 5961.97Sthorpej struct msqid_ds *buf); } 5971.97Sthorpej#else 5981.97Sthorpej302 EXCL __msgctl13 5991.97Sthorpej#endif 6001.97Sthorpej#if defined(SYSVSHM) || !defined(_KERNEL) 6011.97Sthorpej303 STD { int sys___shmctl13(int shmid, int cmd, \ 6021.97Sthorpej struct shmid_ds *buf); } 6031.97Sthorpej#else 6041.97Sthorpej303 EXCL __shmctl13 6051.97Sthorpej#endif 6061.100Smrg304 STD { int sys_lchflags(const char *path, u_long flags); } 6071.101Sminoura305 STD { int sys_issetugid(void); } 6081.105Sjdolecek306 STD { int sys_utrace(const char *id, void *addr, \ 6091.105Sjdolecek size_t len); } 610