syscalls.master revision 1.111
11.111Seeh $NetBSD: syscalls.master,v 1.111 2002/05/03 00:20:56 eeh 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.108Sthorpej; An optional field, MPSAFE, after the type field, indicates that 141.108Sthorpej; the system call is MP-safe. 151.108Sthorpej; 161.1Sglass; types: 171.1Sglass; STD always included 181.23Scgd; OBSOL obsolete, not included in system 191.24Smycroft; UNIMPL unimplemented, not included in system 201.92Schristos; EXCL implemented, but not included in system 211.23Scgd; NODEF included, but don't define the syscall number 221.23Scgd; NOARGS included, but don't define the syscall args structure 231.43Scgd; INDIR included, but don't define the syscall args structure, 241.43Scgd; and allow it to be "really" varargs. 251.23Scgd; 261.23Scgd; The compat options are defined in the syscalls.conf file, and the 271.23Scgd; compat option name is prefixed to the syscall name. Other than 281.23Scgd; that, they're like NODEF (for 'compat' options), or STD (for 291.23Scgd; 'libcompat' options). 301.23Scgd; 311.23Scgd; The type-dependent arguments are as follows: 321.23Scgd; For STD, NODEF, NOARGS, and compat syscalls: 331.23Scgd; { pseudo-proto } [alias] 341.23Scgd; For other syscalls: 351.23Scgd; [comment] 361.23Scgd; 371.23Scgd; #ifdef's, etc. may be included, and are copied to the output files. 381.70Sthorpej; #include's are copied to the syscall names and switch definition files only. 391.77Sthorpej 401.77Sthorpej#include "opt_ktrace.h" 411.78Sthorpej#include "opt_nfsserver.h" 421.102Sbjh21#include "opt_ntp.h" 431.81Sjonathan#include "opt_compat_netbsd.h" 441.85Stron#include "opt_sysv.h" 451.87Schristos#include "opt_compat_43.h" 461.70Sthorpej 471.70Sthorpej#include "fs_lfs.h" 481.70Sthorpej#include "fs_nfs.h" 491.1Sglass 501.23Scgd#include <sys/param.h> 511.23Scgd#include <sys/systm.h> 521.23Scgd#include <sys/signal.h> 531.23Scgd#include <sys/mount.h> 541.23Scgd#include <sys/syscallargs.h> 551.103Smycroft 561.103Smycroft%% 571.1Sglass 581.1Sglass; Reserved/unimplemented system calls in the range 0-150 inclusive 591.1Sglass; are reserved for use in future Berkeley releases. 601.1Sglass; Additional system calls implemented in vendor and other 611.1Sglass; redistributions should be placed in the reserved range at the end 621.1Sglass; of the current calls. 631.1Sglass 641.43Scgd0 INDIR { int sys_syscall(int number, ...); } 651.44Scgd1 STD { void sys_exit(int rval); } 661.28Smycroft2 STD { int sys_fork(void); } 671.46Scgd3 STD { ssize_t sys_read(int fd, void *buf, size_t nbyte); } 681.46Scgd4 STD { ssize_t sys_write(int fd, const void *buf, \ 691.46Scgd size_t nbyte); } 701.46Scgd5 STD { int sys_open(const char *path, \ 711.60Schristos int flags, ... mode_t mode); } 721.28Smycroft6 STD { int sys_close(int fd); } 731.28Smycroft7 STD { int sys_wait4(int pid, int *status, int options, \ 741.23Scgd struct rusage *rusage); } 751.60Schristos8 COMPAT_43 { int sys_creat(const char *path, mode_t mode); } ocreat 761.46Scgd9 STD { int sys_link(const char *path, const char *link); } 771.46Scgd10 STD { int sys_unlink(const char *path); } 781.23Scgd11 OBSOL execv 791.46Scgd12 STD { int sys_chdir(const char *path); } 801.28Smycroft13 STD { int sys_fchdir(int fd); } 811.60Schristos14 STD { int sys_mknod(const char *path, mode_t mode, \ 821.60Schristos dev_t dev); } 831.60Schristos15 STD { int sys_chmod(const char *path, mode_t mode); } 841.46Scgd16 STD { int sys_chown(const char *path, uid_t uid, \ 851.46Scgd gid_t gid); } 861.28Smycroft17 STD { int sys_obreak(char *nsize); } break 871.28Smycroft18 STD { int sys_getfsstat(struct statfs *buf, long bufsize, \ 881.23Scgd int flags); } 891.29Smycroft19 COMPAT_43 { long sys_lseek(int fd, long offset, int whence); } \ 901.29Smycroft olseek 911.104Smycroft#ifdef COMPAT_43 921.108Sthorpej20 STD { pid_t sys_getpid_with_ppid(void); } getpid 931.104Smycroft#else 941.108Sthorpej20 STD MPSAFE { pid_t sys_getpid(void); } 951.104Smycroft#endif 961.46Scgd21 STD { int sys_mount(const char *type, const char *path, \ 971.46Scgd int flags, void *data); } 981.46Scgd22 STD { int sys_unmount(const char *path, int flags); } 991.28Smycroft23 STD { int sys_setuid(uid_t uid); } 1001.104Smycroft#ifdef COMPAT_43 1011.104Smycroft24 STD { uid_t sys_getuid_with_euid(void); } getuid 1021.104Smycroft#else 1031.28Smycroft24 STD { uid_t sys_getuid(void); } 1041.104Smycroft#endif 1051.28Smycroft25 STD { uid_t sys_geteuid(void); } 1061.28Smycroft26 STD { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ 1071.23Scgd int data); } 1081.44Scgd27 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ 1091.28Smycroft int flags); } 1101.46Scgd28 STD { ssize_t sys_sendmsg(int s, \ 1111.46Scgd const struct msghdr *msg, int flags); } 1121.46Scgd29 STD { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ 1131.46Scgd int flags, struct sockaddr *from, \ 1141.88Skleink unsigned int *fromlenaddr); } 1151.46Scgd30 STD { int sys_accept(int s, struct sockaddr *name, \ 1161.88Skleink unsigned int *anamelen); } 1171.46Scgd31 STD { int sys_getpeername(int fdes, struct sockaddr *asa, \ 1181.88Skleink unsigned int *alen); } 1191.46Scgd32 STD { int sys_getsockname(int fdes, struct sockaddr *asa, \ 1201.88Skleink unsigned int *alen); } 1211.46Scgd33 STD { int sys_access(const char *path, int flags); } 1221.46Scgd34 STD { int sys_chflags(const char *path, u_long flags); } 1231.46Scgd35 STD { int sys_fchflags(int fd, u_long flags); } 1241.44Scgd36 STD { void sys_sync(void); } 1251.28Smycroft37 STD { int sys_kill(int pid, int signum); } 1261.60Schristos38 COMPAT_43 { int sys_stat(const char *path, struct stat43 *ub); } \ 1271.60Schristos stat43 1281.28Smycroft39 STD { pid_t sys_getppid(void); } 1291.60Schristos40 COMPAT_43 { int sys_lstat(const char *path, \ 1301.60Schristos struct stat43 *ub); } lstat43 1311.59Smycroft41 STD { int sys_dup(int fd); } 1321.28Smycroft42 STD { int sys_pipe(void); } 1331.28Smycroft43 STD { gid_t sys_getegid(void); } 1341.30Scgd44 STD { int sys_profil(caddr_t samples, size_t size, \ 1351.30Scgd u_long offset, u_int scale); } 1361.92Schristos#if defined(KTRACE) || !defined(_KERNEL) 1371.46Scgd45 STD { int sys_ktrace(const char *fname, int ops, \ 1381.46Scgd int facs, int pid); } 1391.1Sglass#else 1401.92Schristos45 EXCL ktrace 1411.1Sglass#endif 1421.82Smycroft46 COMPAT_13 { int sys_sigaction(int signum, \ 1431.82Smycroft const struct sigaction13 *nsa, \ 1441.82Smycroft struct sigaction13 *osa); } sigaction13 1451.104Smycroft#ifdef COMPAT_43 1461.104Smycroft47 STD { gid_t sys_getgid_with_egid(void); } getgid 1471.104Smycroft#else 1481.28Smycroft47 STD { gid_t sys_getgid(void); } 1491.104Smycroft#endif 1501.82Smycroft48 COMPAT_13 { int sys_sigprocmask(int how, \ 1511.82Smycroft int mask); } sigprocmask13 1521.90Skleink49 STD { int sys___getlogin(char *namebuf, size_t namelen); } 1531.46Scgd50 STD { int sys_setlogin(const char *namebuf); } 1541.46Scgd51 STD { int sys_acct(const char *path); } 1551.82Smycroft52 COMPAT_13 { int sys_sigpending(void); } sigpending13 1561.82Smycroft53 COMPAT_13 { int sys_sigaltstack( \ 1571.82Smycroft const struct sigaltstack13 *nss, \ 1581.82Smycroft struct sigaltstack13 *oss); } sigaltstack13 1591.46Scgd54 STD { int sys_ioctl(int fd, \ 1601.61Schristos u_long com, ... void *data); } 1611.34Smrg55 COMPAT_12 { int sys_reboot(int opt); } oreboot 1621.46Scgd56 STD { int sys_revoke(const char *path); } 1631.46Scgd57 STD { int sys_symlink(const char *path, \ 1641.46Scgd const char *link); } 1651.46Scgd58 STD { int sys_readlink(const char *path, char *buf, \ 1661.72Skleink size_t count); } 1671.46Scgd59 STD { int sys_execve(const char *path, \ 1681.46Scgd char * const *argp, char * const *envp); } 1691.62Smycroft60 STD { mode_t sys_umask(mode_t newmask); } 1701.46Scgd61 STD { int sys_chroot(const char *path); } 1711.60Schristos62 COMPAT_43 { int sys_fstat(int fd, struct stat43 *sb); } fstat43 1721.28Smycroft63 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ 1731.29Smycroft int arg); } ogetkerninfo 1741.29Smycroft64 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 1751.60Schristos65 COMPAT_12 { int sys_msync(caddr_t addr, size_t len); } 1761.67Sthorpej; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 1771.28Smycroft66 STD { int sys_vfork(void); } 1781.23Scgd67 OBSOL vread 1791.23Scgd68 OBSOL vwrite 1801.95Skleink69 STD { int sys_sbrk(intptr_t incr); } 1811.28Smycroft70 STD { int sys_sstk(int incr); } 1821.28Smycroft71 COMPAT_43 { int sys_mmap(caddr_t addr, size_t len, int prot, \ 1831.29Smycroft int flags, int fd, long pos); } ommap 1841.28Smycroft72 STD { int sys_ovadvise(int anom); } vadvise 1851.61Schristos73 STD { int sys_munmap(void *addr, size_t len); } 1861.61Schristos74 STD { int sys_mprotect(void *addr, size_t len, \ 1871.28Smycroft int prot); } 1881.61Schristos75 STD { int sys_madvise(void *addr, size_t len, \ 1891.28Smycroft int behav); } 1901.23Scgd76 OBSOL vhangup 1911.23Scgd77 OBSOL vlimit 1921.91Sthorpej78 STD { int sys_mincore(void *addr, size_t len, \ 1931.28Smycroft char *vec); } 1941.64Sthorpej79 STD { int sys_getgroups(int gidsetsize, \ 1951.59Smycroft gid_t *gidset); } 1961.64Sthorpej80 STD { int sys_setgroups(int gidsetsize, \ 1971.46Scgd const gid_t *gidset); } 1981.28Smycroft81 STD { int sys_getpgrp(void); } 1991.28Smycroft82 STD { int sys_setpgid(int pid, int pgid); } 2001.58Smycroft83 STD { int sys_setitimer(int which, \ 2011.46Scgd const struct itimerval *itv, \ 2021.46Scgd struct itimerval *oitv); } 2031.29Smycroft84 COMPAT_43 { int sys_wait(void); } owait 2041.52Smrg85 COMPAT_12 { int sys_swapon(const char *name); } oswapon 2051.58Smycroft86 STD { int sys_getitimer(int which, \ 2061.28Smycroft struct itimerval *itv); } 2071.29Smycroft87 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \ 2081.29Smycroft ogethostname 2091.29Smycroft88 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } \ 2101.29Smycroft osethostname 2111.29Smycroft89 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 2121.59Smycroft90 STD { int sys_dup2(int from, int to); } 2131.23Scgd91 UNIMPL getdopt 2141.44Scgd92 STD { int sys_fcntl(int fd, int cmd, ... void *arg); } 2151.64Sthorpej93 STD { int sys_select(int nd, fd_set *in, fd_set *ou, \ 2161.23Scgd fd_set *ex, struct timeval *tv); } 2171.23Scgd94 UNIMPL setdopt 2181.28Smycroft95 STD { int sys_fsync(int fd); } 2191.28Smycroft96 STD { int sys_setpriority(int which, int who, int prio); } 2201.28Smycroft97 STD { int sys_socket(int domain, int type, int protocol); } 2211.46Scgd98 STD { int sys_connect(int s, const struct sockaddr *name, \ 2221.88Skleink unsigned int namelen); } 2231.46Scgd99 COMPAT_43 { int sys_accept(int s, caddr_t name, \ 2241.46Scgd int *anamelen); } oaccept 2251.28Smycroft100 STD { int sys_getpriority(int which, int who); } 2261.28Smycroft101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \ 2271.29Smycroft int flags); } osend 2281.28Smycroft102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \ 2291.29Smycroft int flags); } orecv 2301.84Smycroft103 COMPAT_13 { int sys_sigreturn(struct sigcontext13 *sigcntxp); } \ 2311.83Smycroft sigreturn13 2321.46Scgd104 STD { int sys_bind(int s, const struct sockaddr *name, \ 2331.88Skleink unsigned int namelen); } 2341.28Smycroft105 STD { int sys_setsockopt(int s, int level, int name, \ 2351.88Skleink const void *val, unsigned int valsize); } 2361.28Smycroft106 STD { int sys_listen(int s, int backlog); } 2371.23Scgd107 OBSOL vtimes 2381.28Smycroft108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \ 2391.29Smycroft struct sigvec *osv); } osigvec 2401.29Smycroft109 COMPAT_43 { int sys_sigblock(int mask); } osigblock 2411.29Smycroft110 COMPAT_43 { int sys_sigsetmask(int mask); } osigsetmask 2421.82Smycroft111 COMPAT_13 { int sys_sigsuspend(int mask); } sigsuspend13 2431.28Smycroft112 COMPAT_43 { int sys_sigstack(struct sigstack *nss, \ 2441.29Smycroft struct sigstack *oss); } osigstack 2451.28Smycroft113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 2461.29Smycroft int flags); } orecvmsg 2471.29Smycroft114 COMPAT_43 { int sys_sendmsg(int s, caddr_t msg, int flags); } \ 2481.29Smycroft osendmsg 2491.23Scgd115 OBSOL vtrace 2501.28Smycroft116 STD { int sys_gettimeofday(struct timeval *tp, \ 2511.23Scgd struct timezone *tzp); } 2521.28Smycroft117 STD { int sys_getrusage(int who, struct rusage *rusage); } 2531.28Smycroft118 STD { int sys_getsockopt(int s, int level, int name, \ 2541.88Skleink void *val, unsigned int *avalsize); } 2551.26Scgd119 OBSOL resuba 2561.58Smycroft120 STD { ssize_t sys_readv(int fd, \ 2571.58Smycroft const struct iovec *iovp, int iovcnt); } 2581.46Scgd121 STD { ssize_t sys_writev(int fd, \ 2591.58Smycroft const struct iovec *iovp, int iovcnt); } 2601.46Scgd122 STD { int sys_settimeofday(const struct timeval *tv, \ 2611.46Scgd const struct timezone *tzp); } 2621.46Scgd123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); } 2631.60Schristos124 STD { int sys_fchmod(int fd, mode_t mode); } 2641.28Smycroft125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \ 2651.29Smycroft int flags, caddr_t from, int *fromlenaddr); } \ 2661.29Smycroft orecvfrom 2671.46Scgd126 STD { int sys_setreuid(uid_t ruid, uid_t euid); } 2681.46Scgd127 STD { int sys_setregid(gid_t rgid, gid_t egid); } 2691.46Scgd128 STD { int sys_rename(const char *from, const char *to); } 2701.60Schristos129 COMPAT_43 { int sys_truncate(const char *path, long length); } \ 2711.29Smycroft otruncate 2721.29Smycroft130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate 2731.28Smycroft131 STD { int sys_flock(int fd, int how); } 2741.60Schristos132 STD { int sys_mkfifo(const char *path, mode_t mode); } 2751.46Scgd133 STD { ssize_t sys_sendto(int s, const void *buf, \ 2761.46Scgd size_t len, int flags, const struct sockaddr *to, \ 2771.88Skleink unsigned int tolen); } 2781.28Smycroft134 STD { int sys_shutdown(int s, int how); } 2791.28Smycroft135 STD { int sys_socketpair(int domain, int type, \ 2801.28Smycroft int protocol, int *rsv); } 2811.60Schristos136 STD { int sys_mkdir(const char *path, mode_t mode); } 2821.46Scgd137 STD { int sys_rmdir(const char *path); } 2831.46Scgd138 STD { int sys_utimes(const char *path, \ 2841.46Scgd const struct timeval *tptr); } 2851.23Scgd139 OBSOL 4.2 sigreturn 2861.46Scgd140 STD { int sys_adjtime(const struct timeval *delta, \ 2871.23Scgd struct timeval *olddelta); } 2881.28Smycroft141 COMPAT_43 { int sys_getpeername(int fdes, caddr_t asa, \ 2891.29Smycroft int *alen); } ogetpeername 2901.29Smycroft142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 2911.29Smycroft143 COMPAT_43 { int sys_sethostid(int32_t hostid); } osethostid 2921.58Smycroft144 COMPAT_43 { int sys_getrlimit(int which, \ 2931.58Smycroft struct orlimit *rlp); } ogetrlimit 2941.58Smycroft145 COMPAT_43 { int sys_setrlimit(int which, \ 2951.58Smycroft const struct orlimit *rlp); } osetrlimit 2961.29Smycroft146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg 2971.28Smycroft147 STD { int sys_setsid(void); } 2981.46Scgd148 STD { int sys_quotactl(const char *path, int cmd, \ 2991.46Scgd int uid, caddr_t arg); } 3001.29Smycroft149 COMPAT_43 { int sys_quota(void); } oquota 3011.28Smycroft150 COMPAT_43 { int sys_getsockname(int fdec, caddr_t asa, \ 3021.29Smycroft int *alen); } ogetsockname 3031.1Sglass 3041.1Sglass; Syscalls 151-180 inclusive are reserved for vendor-specific 3051.1Sglass; system calls. (This includes various calls added for compatibity 3061.1Sglass; with other Unix variants.) 3071.1Sglass; Some of these calls are now supported by BSD... 3081.23Scgd151 UNIMPL 3091.23Scgd152 UNIMPL 3101.23Scgd153 UNIMPL 3111.23Scgd154 UNIMPL 3121.92Schristos#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 3131.46Scgd155 STD { int sys_nfssvc(int flag, void *argp); } 3141.1Sglass#else 3151.92Schristos155 EXCL nfssvc 3161.1Sglass#endif 3171.28Smycroft156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ 3181.29Smycroft u_int count, long *basep); } ogetdirentries 3191.46Scgd157 STD { int sys_statfs(const char *path, \ 3201.46Scgd struct statfs *buf); } 3211.28Smycroft158 STD { int sys_fstatfs(int fd, struct statfs *buf); } 3221.23Scgd159 UNIMPL 3231.23Scgd160 UNIMPL 3241.46Scgd161 STD { int sys_getfh(const char *fname, fhandle_t *fhp); } 3251.29Smycroft162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \ 3261.29Smycroft ogetdomainname 3271.29Smycroft163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \ 3281.29Smycroft osetdomainname 3291.29Smycroft164 COMPAT_09 { int sys_uname(struct outsname *name); } ouname 3301.71Sperry165 STD { int sys_sysarch(int op, void *parms); } 3311.23Scgd166 UNIMPL 3321.23Scgd167 UNIMPL 3331.23Scgd168 UNIMPL 3341.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 3351.111Seeh#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64) 3361.28Smycroft169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \ 3371.29Smycroft int a5); } osemsys 3381.9Scgd#else 3391.92Schristos169 EXCL 1.0 semsys 3401.9Scgd#endif 3411.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 3421.111Seeh#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64) 3431.28Smycroft170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \ 3441.29Smycroft int a5, int a6); } omsgsys 3451.9Scgd#else 3461.92Schristos170 EXCL 1.0 msgsys 3471.9Scgd#endif 3481.23Scgd; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 3491.111Seeh#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64) 3501.29Smycroft171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } \ 3511.29Smycroft oshmsys 3521.1Sglass#else 3531.92Schristos171 EXCL 1.0 shmsys 3541.1Sglass#endif 3551.23Scgd172 UNIMPL 3561.79Sthorpej173 STD { ssize_t sys_pread(int fd, void *buf, \ 3571.80Sthorpej size_t nbyte, int pad, off_t offset); } 3581.79Sthorpej174 STD { ssize_t sys_pwrite(int fd, const void *buf, \ 3591.80Sthorpej size_t nbyte, int pad, off_t offset); } 3601.102Sbjh21; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded. 3611.45Scgd175 STD { int sys_ntp_gettime(struct ntptimeval *ntvp); } 3621.102Sbjh21#if defined(NTP) || !defined(_KERNEL) 3631.38Sthorpej176 STD { int sys_ntp_adjtime(struct timex *tp); } 3641.102Sbjh21#else 3651.102Sbjh21176 EXCL ntp_adjtime 3661.102Sbjh21#endif 3671.23Scgd177 UNIMPL 3681.23Scgd178 UNIMPL 3691.23Scgd179 UNIMPL 3701.23Scgd180 UNIMPL 3711.1Sglass 3721.1Sglass; Syscalls 180-199 are used by/reserved for BSD 3731.28Smycroft181 STD { int sys_setgid(gid_t gid); } 3741.28Smycroft182 STD { int sys_setegid(gid_t egid); } 3751.28Smycroft183 STD { int sys_seteuid(uid_t euid); } 3761.92Schristos#if defined(LFS) || !defined(_KERNEL) 3771.92Schristos184 STD { int sys_lfs_bmapv(fsid_t *fsidp, \ 3781.23Scgd struct block_info *blkiov, int blkcnt); } 3791.92Schristos185 STD { int sys_lfs_markv(fsid_t *fsidp, \ 3801.23Scgd struct block_info *blkiov, int blkcnt); } 3811.92Schristos186 STD { int sys_lfs_segclean(fsid_t *fsidp, u_long segment); } 3821.92Schristos187 STD { int sys_lfs_segwait(fsid_t *fsidp, \ 3831.92Schristos struct timeval *tv); } 3841.92Schristos#else 3851.92Schristos184 EXCL lfs_bmapv 3861.92Schristos185 EXCL lfs_markv 3871.92Schristos186 EXCL lfs_segclean 3881.92Schristos187 EXCL lfs_segwait 3891.23Scgd#endif 3901.60Schristos188 COMPAT_12 { int sys_stat(const char *path, struct stat12 *ub); } \ 3911.60Schristos stat12 3921.60Schristos189 COMPAT_12 { int sys_fstat(int fd, struct stat12 *sb); } fstat12 3931.60Schristos190 COMPAT_12 { int sys_lstat(const char *path, \ 3941.60Schristos struct stat12 *ub); } lstat12 3951.46Scgd191 STD { long sys_pathconf(const char *path, int name); } 3961.44Scgd192 STD { long sys_fpathconf(int fd, int name); } 3971.23Scgd193 UNIMPL 3981.58Smycroft194 STD { int sys_getrlimit(int which, \ 3991.58Smycroft struct rlimit *rlp); } 4001.58Smycroft195 STD { int sys_setrlimit(int which, \ 4011.46Scgd const struct rlimit *rlp); } 4021.57Sfvdl196 COMPAT_12 { int sys_getdirentries(int fd, char *buf, \ 4031.28Smycroft u_int count, long *basep); } 4041.61Schristos197 STD { void *sys_mmap(void *addr, size_t len, int prot, \ 4051.23Scgd int flags, int fd, long pad, off_t pos); } 4061.43Scgd198 INDIR { quad_t sys___syscall(quad_t num, ...); } 4071.28Smycroft199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ 4081.23Scgd int whence); } 4091.46Scgd200 STD { int sys_truncate(const char *path, int pad, \ 4101.46Scgd off_t length); } 4111.28Smycroft201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 4121.28Smycroft202 STD { int sys___sysctl(int *name, u_int namelen, \ 4131.28Smycroft void *old, size_t *oldlenp, void *new, \ 4141.28Smycroft size_t newlen); } 4151.75Skleink203 STD { int sys_mlock(const void *addr, size_t len); } 4161.75Skleink204 STD { int sys_munlock(const void *addr, size_t len); } 4171.46Scgd205 STD { int sys_undelete(const char *path); } 4181.46Scgd206 STD { int sys_futimes(int fd, \ 4191.46Scgd const struct timeval *tptr); } 4201.86Skleink207 STD { pid_t sys_getpgid(pid_t pid); } 4211.34Smrg208 STD { int sys_reboot(int opt, char *bootstr); } 4221.36Smycroft209 STD { int sys_poll(struct pollfd *fds, u_int nfds, \ 4231.35Smycroft int timeout); } 4241.11Scgd; 4251.11Scgd; Syscalls 210-219 are reserved for dynamically loaded syscalls 4261.11Scgd; 4271.92Schristos#if defined(LKM) || !defined(_KERNEL) 4281.28Smycroft210 NODEF { int sys_lkmnosys(void); } 4291.28Smycroft211 NODEF { int sys_lkmnosys(void); } 4301.28Smycroft212 NODEF { int sys_lkmnosys(void); } 4311.28Smycroft213 NODEF { int sys_lkmnosys(void); } 4321.28Smycroft214 NODEF { int sys_lkmnosys(void); } 4331.28Smycroft215 NODEF { int sys_lkmnosys(void); } 4341.28Smycroft216 NODEF { int sys_lkmnosys(void); } 4351.28Smycroft217 NODEF { int sys_lkmnosys(void); } 4361.28Smycroft218 NODEF { int sys_lkmnosys(void); } 4371.28Smycroft219 NODEF { int sys_lkmnosys(void); } 4381.11Scgd#else /* !LKM */ 4391.92Schristos210 EXCL lkmnosys 4401.92Schristos211 EXCL lkmnosys 4411.92Schristos212 EXCL lkmnosys 4421.92Schristos213 EXCL lkmnosys 4431.92Schristos214 EXCL lkmnosys 4441.92Schristos215 EXCL lkmnosys 4451.92Schristos216 EXCL lkmnosys 4461.92Schristos217 EXCL lkmnosys 4471.92Schristos218 EXCL lkmnosys 4481.92Schristos219 EXCL lkmnosys 4491.6Scgd#endif /* !LKM */ 4501.49Skleink; System calls 220-300 are reserved for use by NetBSD 4511.92Schristos#if defined(SYSVSEM) || !defined(_KERNEL) 4521.97Sthorpej220 COMPAT_14 { int sys___semctl(int semid, int semnum, int cmd, \ 4531.97Sthorpej union __semun *arg); } 4541.28Smycroft221 STD { int sys_semget(key_t key, int nsems, int semflg); } 4551.28Smycroft222 STD { int sys_semop(int semid, struct sembuf *sops, \ 4561.74Skleink size_t nsops); } 4571.28Smycroft223 STD { int sys_semconfig(int flag); } 4581.23Scgd#else 4591.97Sthorpej220 EXCL compat_14_semctl 4601.92Schristos221 EXCL semget 4611.92Schristos222 EXCL semop 4621.92Schristos223 EXCL semconfig 4631.23Scgd#endif 4641.92Schristos#if defined(SYSVMSG) || !defined(_KERNEL) 4651.97Sthorpej224 COMPAT_14 { int sys_msgctl(int msqid, int cmd, \ 4661.97Sthorpej struct msqid_ds14 *buf); } 4671.28Smycroft225 STD { int sys_msgget(key_t key, int msgflg); } 4681.74Skleink226 STD { int sys_msgsnd(int msqid, const void *msgp, \ 4691.74Skleink size_t msgsz, int msgflg); } 4701.74Skleink227 STD { ssize_t sys_msgrcv(int msqid, void *msgp, \ 4711.74Skleink size_t msgsz, long msgtyp, int msgflg); } 4721.23Scgd#else 4731.97Sthorpej224 EXCL compat_14_msgctl 4741.92Schristos225 EXCL msgget 4751.92Schristos226 EXCL msgsnd 4761.92Schristos227 EXCL msgrcv 4771.23Scgd#endif 4781.92Schristos#if defined(SYSVSHM) || !defined(_KERNEL) 4791.74Skleink228 STD { void *sys_shmat(int shmid, const void *shmaddr, \ 4801.44Scgd int shmflg); } 4811.97Sthorpej229 COMPAT_14 { int sys_shmctl(int shmid, int cmd, \ 4821.97Sthorpej struct shmid_ds14 *buf); } 4831.74Skleink230 STD { int sys_shmdt(const void *shmaddr); } 4841.74Skleink231 STD { int sys_shmget(key_t key, size_t size, int shmflg); } 4851.23Scgd#else 4861.92Schristos228 EXCL shmat 4871.97Sthorpej229 EXCL compat_14_shmctl 4881.92Schristos230 EXCL shmdt 4891.92Schristos231 EXCL shmget 4901.23Scgd#endif 4911.39Sjtc232 STD { int sys_clock_gettime(clockid_t clock_id, \ 4921.49Skleink struct timespec *tp); } 4931.39Sjtc233 STD { int sys_clock_settime(clockid_t clock_id, \ 4941.49Skleink const struct timespec *tp); } 4951.39Sjtc234 STD { int sys_clock_getres(clockid_t clock_id, \ 4961.49Skleink struct timespec *tp); } 4971.39Sjtc235 UNIMPL timer_create 4981.39Sjtc236 UNIMPL timer_delete 4991.39Sjtc237 UNIMPL timer_settime 5001.39Sjtc238 UNIMPL timer_gettime 5011.39Sjtc239 UNIMPL timer_getoverrun 5021.54Sveego; 5031.54Sveego; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 5041.54Sveego; 5051.48Sjtc240 STD { int sys_nanosleep(const struct timespec *rqtp, \ 5061.49Skleink struct timespec *rmtp); } 5071.76Skleink241 STD { int sys_fdatasync(int fd); } 5081.93Sthorpej242 STD { int sys_mlockall(int flags); } 5091.93Sthorpej243 STD { int sys_munlockall(void); } 5101.49Skleink244 UNIMPL 5111.49Skleink245 UNIMPL 5121.49Skleink246 UNIMPL 5131.49Skleink247 UNIMPL 5141.49Skleink248 UNIMPL 5151.49Skleink249 UNIMPL 5161.55Sveego250 UNIMPL 5171.49Skleink251 UNIMPL 5181.49Skleink252 UNIMPL 5191.49Skleink253 UNIMPL 5201.49Skleink254 UNIMPL 5211.49Skleink255 UNIMPL 5221.49Skleink256 UNIMPL 5231.49Skleink257 UNIMPL 5241.49Skleink258 UNIMPL 5251.49Skleink259 UNIMPL 5261.49Skleink260 UNIMPL 5271.49Skleink261 UNIMPL 5281.49Skleink262 UNIMPL 5291.49Skleink263 UNIMPL 5301.49Skleink264 UNIMPL 5311.49Skleink265 UNIMPL 5321.49Skleink266 UNIMPL 5331.49Skleink267 UNIMPL 5341.49Skleink268 UNIMPL 5351.49Skleink269 UNIMPL 5361.69Skleink270 STD { int sys___posix_rename(const char *from, \ 5371.49Skleink const char *to); } 5381.64Sthorpej271 STD { int sys_swapctl(int cmd, const void *arg, int misc); } 5391.57Sfvdl272 STD { int sys_getdents(int fd, char *buf, size_t count); } 5401.61Schristos273 STD { int sys_minherit(void *addr, size_t len, \ 5411.54Sveego int inherit); } 5421.60Schristos274 STD { int sys_lchmod(const char *path, mode_t mode); } 5431.56Senami275 STD { int sys_lchown(const char *path, uid_t uid, \ 5441.56Senami gid_t gid); } 5451.56Senami276 STD { int sys_lutimes(const char *path, \ 5461.56Senami const struct timeval *tptr); } 5471.63Sthorpej277 STD { int sys___msync13(void *addr, size_t len, int flags); } 5481.63Sthorpej278 STD { int sys___stat13(const char *path, struct stat *ub); } 5491.63Sthorpej279 STD { int sys___fstat13(int fd, struct stat *sb); } 5501.63Sthorpej280 STD { int sys___lstat13(const char *path, struct stat *ub); } 5511.82Smycroft281 STD { int sys___sigaltstack14( \ 5521.82Smycroft const struct sigaltstack *nss, \ 5531.82Smycroft struct sigaltstack *oss); } 5541.67Sthorpej282 STD { int sys___vfork14(void); } 5551.69Skleink283 STD { int sys___posix_chown(const char *path, uid_t uid, \ 5561.69Skleink gid_t gid); } 5571.69Skleink284 STD { int sys___posix_fchown(int fd, uid_t uid, \ 5581.69Skleink gid_t gid); } 5591.69Skleink285 STD { int sys___posix_lchown(const char *path, uid_t uid, \ 5601.69Skleink gid_t gid); } 5611.68Sthorpej286 STD { pid_t sys_getsid(pid_t pid); } 5621.110Sthorpej287 STD { pid_t sys___clone(int flags, void *stack); } 5631.92Schristos#if defined(KTRACE) || !defined(_KERNEL) 5641.73Schristos288 STD { int sys_fktrace(const int fd, int ops, \ 5651.73Schristos int facs, int pid); } 5661.73Schristos#else 5671.92Schristos288 EXCL ktrace 5681.73Schristos#endif 5691.79Sthorpej289 STD { ssize_t sys_preadv(int fd, \ 5701.79Sthorpej const struct iovec *iovp, int iovcnt, \ 5711.80Sthorpej int pad, off_t offset); } 5721.79Sthorpej290 STD { ssize_t sys_pwritev(int fd, \ 5731.79Sthorpej const struct iovec *iovp, int iovcnt, \ 5741.80Sthorpej int pad, off_t offset); } 5751.82Smycroft291 STD { int sys___sigaction14(int signum, \ 5761.82Smycroft const struct sigaction *nsa, \ 5771.82Smycroft struct sigaction *osa); } 5781.82Smycroft292 STD { int sys___sigpending14(sigset_t *set); } 5791.82Smycroft293 STD { int sys___sigprocmask14(int how, \ 5801.82Smycroft const sigset_t *set, \ 5811.82Smycroft sigset_t *oset); } 5821.82Smycroft294 STD { int sys___sigsuspend14(const sigset_t *set); } 5831.83Smycroft295 STD { int sys___sigreturn14(struct sigcontext *sigcntxp); } 5841.89Ssommerfe296 STD { int sys___getcwd(char *bufp, size_t length); } 5851.89Ssommerfe297 STD { int sys_fchroot(int fd); } 5861.94Swrstuden298 STD { int sys_fhopen(const fhandle_t *fhp, int flags); } 5871.94Swrstuden299 STD { int sys_fhstat(const fhandle_t *fhp, \ 5881.94Swrstuden struct stat *sb); } 5891.94Swrstuden300 STD { int sys_fhstatfs(const fhandle_t *fhp, \ 5901.94Swrstuden struct statfs *buf); } 5911.97Sthorpej#if defined(SYSVSEM) || !defined(_KERNEL) 5921.99Schristos301 STD { int sys_____semctl13(int semid, int semnum, int cmd, \ 5931.99Schristos ... union __semun *arg); } 5941.97Sthorpej#else 5951.99Schristos301 EXCL ____semctl13 5961.97Sthorpej#endif 5971.97Sthorpej#if defined(SYSVMSG) || !defined(_KERNEL) 5981.97Sthorpej302 STD { int sys___msgctl13(int msqid, int cmd, \ 5991.97Sthorpej struct msqid_ds *buf); } 6001.97Sthorpej#else 6011.97Sthorpej302 EXCL __msgctl13 6021.97Sthorpej#endif 6031.97Sthorpej#if defined(SYSVSHM) || !defined(_KERNEL) 6041.97Sthorpej303 STD { int sys___shmctl13(int shmid, int cmd, \ 6051.97Sthorpej struct shmid_ds *buf); } 6061.97Sthorpej#else 6071.97Sthorpej303 EXCL __shmctl13 6081.97Sthorpej#endif 6091.100Smrg304 STD { int sys_lchflags(const char *path, u_long flags); } 6101.101Sminoura305 STD { int sys_issetugid(void); } 6111.106Sjdolecek306 STD { int sys_utrace(const char *label, void *addr, \ 6121.109Skleink size_t len); } 6131.107Snathanw; 6141.107Snathanw; Syscalls 307 and 308 are reserved for getcontext and setcontext 6151.107Snathanw; 6161.107Snathanw307 UNIMPL 6171.107Snathanw308 UNIMPL 6181.107Snathanw; 6191.107Snathanw; Syscalls 309-339 are reserved for LWP and scheduler activation syscalls. 6201.107Snathanw; 6211.107Snathanw309 UNIMPL 6221.107Snathanw310 UNIMPL 6231.107Snathanw311 UNIMPL 6241.107Snathanw312 UNIMPL 6251.107Snathanw313 UNIMPL 6261.107Snathanw314 UNIMPL 6271.107Snathanw315 UNIMPL 6281.107Snathanw316 UNIMPL 6291.107Snathanw317 UNIMPL 6301.107Snathanw318 UNIMPL 6311.107Snathanw319 UNIMPL 6321.107Snathanw320 UNIMPL 6331.107Snathanw321 UNIMPL 6341.107Snathanw322 UNIMPL 6351.107Snathanw323 UNIMPL 6361.107Snathanw324 UNIMPL 6371.107Snathanw325 UNIMPL 6381.107Snathanw326 UNIMPL 6391.107Snathanw327 UNIMPL 6401.107Snathanw328 UNIMPL 6411.107Snathanw329 UNIMPL 6421.107Snathanw330 UNIMPL 6431.107Snathanw331 UNIMPL 6441.107Snathanw332 UNIMPL 6451.107Snathanw333 UNIMPL 6461.107Snathanw334 UNIMPL 6471.107Snathanw335 UNIMPL 6481.107Snathanw336 UNIMPL 6491.107Snathanw337 UNIMPL 6501.107Snathanw338 UNIMPL 6511.107Snathanw339 UNIMPL 652