1 $NetBSD: syscalls.master,v 1.41 2005/12/11 12:20:22 christos Exp $ 2 3; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp 4; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 5 6; NetBSD system call name/number "master" file. 7; (See syscalls.conf to see what it is processed into.) 8; 9; Fields: number type [type-dependent ...] 10; number system call number, must be in order 11; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 12; the compatibility options defined in syscalls.conf. 13; 14; types: 15; STD always included 16; OBSOL obsolete, not included in system 17; UNIMPL unimplemented, not included in system 18; EXCL implemented, but not included in system 19; NODEF included, but don't define the syscall number 20; NOARGS included, but don't define the syscall args structure 21; INDIR included, but don't define the syscall args structure, 22; and allow it to be "really" varargs. 23; 24; The compat options are defined in the syscalls.conf file, and the 25; compat option name is prefixed to the syscall name. Other than 26; that, they're like NODEF (for 'compat' options), or STD (for 27; 'libcompat' options). 28; 29; The type-dependent arguments are as follows: 30; For STD, NODEF, NOARGS, and compat syscalls: 31; { pseudo-proto } [alias] 32; For other syscalls: 33; [comment] 34; 35; #ifdef's, etc. may be included, and are copied to the output files. 36; #include's are copied to the syscall names and switch definition files only. 37 38#if defined(_KERNEL_OPT) 39#include "opt_ktrace.h" 40#include "opt_nfsserver.h" 41#include "opt_compat_netbsd.h" 42#include "opt_ntp.h" 43#include "opt_sysv.h" 44#include "opt_compat_43.h" 45 46#include "fs_lfs.h" 47#include "fs_nfs.h" 48#endif 49 50#include <sys/param.h> 51#include <sys/systm.h> 52#include <sys/signal.h> 53#include <sys/mount.h> 54#include <sys/sa.h> 55#include <sys/syscallargs.h> 56 57#include <compat/netbsd32/netbsd32.h> 58#include <compat/netbsd32/netbsd32_syscallargs.h> 59 60%% 61 62; Reserved/unimplemented system calls in the range 0-150 inclusive 63; are reserved for use in future Berkeley releases. 64; Additional system calls implemented in vendor and other 65; redistributions should be placed in the reserved range at the end 66; of the current calls. 67 680 INDIR { int sys_syscall(int number, ...); } 691 STD { void netbsd32_exit(int rval); } 702 NOARGS { int sys_fork(void); } 713 STD { netbsd32_ssize_t netbsd32_read(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte); } 724 STD { netbsd32_ssize_t netbsd32_write(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte); } 735 STD { int netbsd32_open(const netbsd32_charp path, int flags, ... mode_t mode); } 746 STD { int netbsd32_close(int fd); } 757 STD { int netbsd32_wait4(int pid, netbsd32_intp status, int options, netbsd32_rusagep_t rusage); } 768 COMPAT_43 { int netbsd32_ocreat(const netbsd32_charp path, mode_t mode); } 779 STD { int netbsd32_link(const netbsd32_charp path, const netbsd32_charp link); } 7810 STD { int netbsd32_unlink(const netbsd32_charp path); } 7911 OBSOL execv 8012 STD { int netbsd32_chdir(const netbsd32_charp path); } 8113 STD { int netbsd32_fchdir(int fd); } 8214 STD { int netbsd32_mknod(const netbsd32_charp path, mode_t mode, dev_t dev); } 8315 STD { int netbsd32_chmod(const netbsd32_charp path, mode_t mode); } 8416 STD { int netbsd32_chown(const netbsd32_charp path, uid_t uid, gid_t gid); } 8517 STD { int netbsd32_break(netbsd32_charp nsize); } 8618 COMPAT_20 { int netbsd32_getfsstat(netbsd32_statfsp_t buf, netbsd32_long bufsize, int flags); } 8719 COMPAT_43 { netbsd32_long netbsd32_olseek(int fd, netbsd32_long offset, int whence); } 8820 NOARGS MPSAFE { pid_t sys_getpid(void); } 8921 STD { int netbsd32_mount(const netbsd32_charp type, const netbsd32_charp path, int flags, netbsd32_voidp data); } 9022 STD { int netbsd32_unmount(const netbsd32_charp path, int flags); } 9123 STD { int netbsd32_setuid(uid_t uid); } 9224 NOARGS { uid_t sys_getuid(void); } 9325 NOARGS { uid_t sys_geteuid(void); } 9426 STD { int netbsd32_ptrace(int req, pid_t pid, netbsd32_caddr_t addr, int data); } 9527 STD { netbsd32_ssize_t netbsd32_recvmsg(int s, netbsd32_msghdrp_t msg, int flags); } 9628 STD { netbsd32_ssize_t netbsd32_sendmsg(int s, const netbsd32_msghdrp_t msg, int flags); } 9729 STD { netbsd32_ssize_t netbsd32_recvfrom(int s, netbsd32_voidp buf, netbsd32_size_t len, int flags, netbsd32_sockaddrp_t from, netbsd32_intp fromlenaddr); } 9830 STD { int netbsd32_accept(int s, netbsd32_sockaddrp_t name, netbsd32_intp anamelen); } 9931 STD { int netbsd32_getpeername(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); } 10032 STD { int netbsd32_getsockname(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); } 10133 STD { int netbsd32_access(const netbsd32_charp path, int flags); } 10234 STD { int netbsd32_chflags(const netbsd32_charp path, netbsd32_u_long flags); } 10335 STD { int netbsd32_fchflags(int fd, netbsd32_u_long flags); } 10436 NOARGS { void sys_sync(void); } 10537 STD { int netbsd32_kill(int pid, int signum); } 10638 COMPAT_43 { int netbsd32_stat43(const netbsd32_charp path, netbsd32_stat43p_t ub); } 10739 NOARGS { pid_t sys_getppid(void); } 10840 COMPAT_43 { int netbsd32_lstat43(const netbsd32_charp path, netbsd32_stat43p_t ub); } 10941 STD { int netbsd32_dup(int fd); } 11042 NOARGS { int sys_pipe(void); } 11143 NOARGS { gid_t sys_getegid(void); } 11244 STD { int netbsd32_profil(netbsd32_caddr_t samples, netbsd32_size_t size, netbsd32_u_long offset, u_int scale); } 113#if defined(KTRACE) || !defined(_KERNEL) 11445 STD { int netbsd32_ktrace(const netbsd32_charp fname, int ops, int facs, int pid); } 115#else 11645 EXCL netbsd32_ktrace 117#endif 11846 STD { int netbsd32_sigaction(int signum, const netbsd32_sigactionp_t nsa, netbsd32_sigactionp_t osa); } 11947 NOARGS { gid_t sys_getgid(void); } 12048 COMPAT_13 { int netbsd32_sigprocmask(int how, \ 121 int mask); } sigprocmask13 12249 STD { int netbsd32___getlogin(netbsd32_charp namebuf, u_int namelen); } 12350 STD { int netbsd32_setlogin(const netbsd32_charp namebuf); } 12451 STD { int netbsd32_acct(const netbsd32_charp path); } 12552 COMPAT_13 { int sys_sigpending(void); } sigpending13 12653 COMPAT_13 { int netbsd32_sigaltstack13(const netbsd32_sigaltstack13p_t nss, netbsd32_sigaltstack13p_t oss); } 12754 STD { int netbsd32_ioctl(int fd, netbsd32_u_long com, ... netbsd32_voidp data); } 12855 COMPAT_12 { int netbsd32_reboot(int opt); } 12956 STD { int netbsd32_revoke(const netbsd32_charp path); } 13057 STD { int netbsd32_symlink(const netbsd32_charp path, const netbsd32_charp link); } 13158 STD { int netbsd32_readlink(const netbsd32_charp path, netbsd32_charp buf, netbsd32_size_t count); } 13259 STD { int netbsd32_execve(const netbsd32_charp path, netbsd32_charpp argp, netbsd32_charpp envp); } 13360 STD { mode_t netbsd32_umask(mode_t newmask); } 13461 STD { int netbsd32_chroot(const netbsd32_charp path); } 13562 COMPAT_43 { int netbsd32_fstat43(int fd, netbsd32_stat43p_t sb); } 13663 COMPAT_43 { int netbsd32_ogetkerninfo(int op, netbsd32_charp where, netbsd32_intp size, int arg); } 13764 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 13865 COMPAT_12 { int netbsd32_msync(netbsd32_caddr_t addr, netbsd32_size_t len); } 139; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 14066 NOARGS { int sys_vfork(void); } 14167 OBSOL vread 14268 OBSOL vwrite 14369 STD { int netbsd32_sbrk(netbsd32_intptr_t incr); } 14470 STD { int netbsd32_sstk(int incr); } 14571 COMPAT_43 { int netbsd32_ommap(netbsd32_caddr_t addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pos); } 14672 STD { int netbsd32_ovadvise(int anom); } vadvise 14773 STD { int netbsd32_munmap(netbsd32_voidp addr, netbsd32_size_t len); } 14874 STD { int netbsd32_mprotect(netbsd32_voidp addr, netbsd32_size_t len, int prot); } 14975 STD { int netbsd32_madvise(netbsd32_voidp addr, netbsd32_size_t len, int behav); } 15076 OBSOL vhangup 15177 OBSOL vlimit 15278 STD { int netbsd32_mincore(netbsd32_caddr_t addr, netbsd32_size_t len, netbsd32_charp vec); } 15379 STD { int netbsd32_getgroups(int gidsetsize, netbsd32_gid_tp gidset); } 15480 STD { int netbsd32_setgroups(int gidsetsize, const netbsd32_gid_tp gidset); } 15581 NOARGS { int sys_getpgrp(void); } 15682 STD { int netbsd32_setpgid(int pid, int pgid); } 15783 STD { int netbsd32_setitimer(int which, const netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); } 15884 COMPAT_43 { int sys_wait(void); } owait 15985 COMPAT_12 { int netbsd32_oswapon(const netbsd32_charp name); } 16086 STD { int netbsd32_getitimer(int which, netbsd32_itimervalp_t itv); } 16187 COMPAT_43 { int netbsd32_ogethostname(netbsd32_charp hostname, u_int len); } 16288 COMPAT_43 { int netbsd32_osethostname(netbsd32_charp hostname, u_int len); } 16389 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 16490 STD { int netbsd32_dup2(int from, int to); } 16591 UNIMPL getdopt 16692 STD { int netbsd32_fcntl(int fd, int cmd, ... netbsd32_voidp arg); } 16793 STD { int netbsd32_select(int nd, netbsd32_fd_setp_t in, netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, netbsd32_timevalp_t tv); } 16894 UNIMPL setdopt 16995 STD { int netbsd32_fsync(int fd); } 17096 STD { int netbsd32_setpriority(int which, int who, int prio); } 17197 STD { int netbsd32_socket(int domain, int type, int protocol); } 17298 STD { int netbsd32_connect(int s, const netbsd32_sockaddrp_t name, int namelen); } 17399 COMPAT_43 { int netbsd32_oaccept(int s, netbsd32_caddr_t name, netbsd32_intp anamelen); } 174100 STD { int netbsd32_getpriority(int which, int who); } 175101 COMPAT_43 { int netbsd32_osend(int s, netbsd32_caddr_t buf, int len, int flags); } 176102 COMPAT_43 { int netbsd32_orecv(int s, netbsd32_caddr_t buf, int len, int flags); } 177103 COMPAT_13 { int netbsd32_sigreturn(netbsd32_sigcontextp_t sigcntxp); } sigreturn13 178104 STD { int netbsd32_bind(int s, const netbsd32_sockaddrp_t name, int namelen); } 179105 STD { int netbsd32_setsockopt(int s, int level, int name, const netbsd32_voidp val, int valsize); } 180106 STD { int netbsd32_listen(int s, int backlog); } 181107 OBSOL vtimes 182108 COMPAT_43 { int netbsd32_osigvec(int signum, netbsd32_sigvecp_t nsv, netbsd32_sigvecp_t osv); } 183#if defined(COMPAT_43) || defined(COMPAT_SUNOS) 184109 COMPAT_43 { int netbsd32_sigblock(int mask); } 185110 COMPAT_43 { int netbsd32_sigsetmask(int mask); } 186#else 187109 OBSOL sigblock 188110 OBSOL sigsetmask 189#endif 190111 COMPAT_13 { int netbsd32_sigsuspend(int mask); } sigsuspend13 191112 COMPAT_43 { int netbsd32_osigstack(netbsd32_sigstackp_t nss, netbsd32_sigstackp_t oss); } 192113 COMPAT_43 { int netbsd32_orecvmsg(int s, netbsd32_omsghdrp_t msg, int flags); } 193114 COMPAT_43 { int netbsd32_osendmsg(int s, netbsd32_caddr_t msg, int flags); } 194115 OBSOL vtrace 195116 STD { int netbsd32_gettimeofday(netbsd32_timevalp_t tp, netbsd32_timezonep_t tzp); } 196117 STD { int netbsd32_getrusage(int who, netbsd32_rusagep_t rusage); } 197118 STD { int netbsd32_getsockopt(int s, int level, int name, netbsd32_voidp val, netbsd32_intp avalsize); } 198119 OBSOL resuba 199120 STD { netbsd32_ssize_t netbsd32_readv(int fd, const netbsd32_iovecp_t iovp, int iovcnt); } 200121 STD { netbsd32_ssize_t netbsd32_writev(int fd, const netbsd32_iovecp_t iovp, int iovcnt); } 201122 STD { int netbsd32_settimeofday(const netbsd32_timevalp_t tv, const netbsd32_timezonep_t tzp); } 202123 STD { int netbsd32_fchown(int fd, uid_t uid, gid_t gid); } 203124 STD { int netbsd32_fchmod(int fd, mode_t mode); } 204125 COMPAT_43 { int netbsd32_orecvfrom(int s, netbsd32_caddr_t buf, netbsd32_size_t len, int flags, netbsd32_caddr_t from, netbsd32_intp fromlenaddr); } 205126 STD { int netbsd32_setreuid(uid_t ruid, uid_t euid); } 206127 STD { int netbsd32_setregid(gid_t rgid, gid_t egid); } 207128 STD { int netbsd32_rename(const netbsd32_charp from, const netbsd32_charp to); } 208129 COMPAT_43 { int netbsd32_otruncate(const netbsd32_charp path, netbsd32_long length); } 209130 COMPAT_43 { int netbsd32_oftruncate(int fd, netbsd32_long length); } 210131 STD { int netbsd32_flock(int fd, int how); } 211132 STD { int netbsd32_mkfifo(const netbsd32_charp path, mode_t mode); } 212133 STD { netbsd32_ssize_t netbsd32_sendto(int s, const netbsd32_voidp buf, netbsd32_size_t len, int flags, const netbsd32_sockaddrp_t to, int tolen); } 213134 STD { int netbsd32_shutdown(int s, int how); } 214135 STD { int netbsd32_socketpair(int domain, int type, int protocol, netbsd32_intp rsv); } 215136 STD { int netbsd32_mkdir(const netbsd32_charp path, mode_t mode); } 216137 STD { int netbsd32_rmdir(const netbsd32_charp path); } 217138 STD { int netbsd32_utimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); } 218139 OBSOL 4.2 sigreturn 219140 STD { int netbsd32_adjtime(const netbsd32_timevalp_t delta, netbsd32_timevalp_t olddelta); } 220141 COMPAT_43 { int netbsd32_ogetpeername(int fdes, netbsd32_caddr_t asa, netbsd32_intp alen); } 221142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 222#if defined(COMPAT_43) || defined(COMPAT_SUNOS) 223143 COMPAT_43 { int netbsd32_sethostid(int32_t hostid); } 224#else 225143 OBSOL sethostid 226#endif 227144 COMPAT_43 { int netbsd32_ogetrlimit(int which, netbsd32_orlimitp_t rlp); } 228145 COMPAT_43 { int netbsd32_osetrlimit(int which, const netbsd32_orlimitp_t rlp); } 229#if defined(COMPAT_43) || defined(COMPAT_SUNOS) 230146 COMPAT_43 { int netbsd32_killpg(int pgid, int signum); } 231#else 232146 OBSOL killpg 233#endif 234147 NOARGS { int sys_setsid(void); } 235148 STD { int netbsd32_quotactl(const netbsd32_charp path, int cmd, int uid, netbsd32_caddr_t arg); } 236149 COMPAT_43 { int sys_quota(void); } oquota 237150 COMPAT_43 { int netbsd32_ogetsockname(int fdec, netbsd32_caddr_t asa, netbsd32_intp alen); } 238 239; Syscalls 151-180 inclusive are reserved for vendor-specific 240; system calls. (This includes various calls added for compatibity 241; with other Unix variants.) 242; Some of these calls are now supported by BSD... 243151 UNIMPL 244152 UNIMPL 245153 UNIMPL 246154 UNIMPL 247#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 248155 STD { int netbsd32_nfssvc(int flag, netbsd32_voidp argp); } 249#else 250155 EXCL netbsd32_nfssvc 251#endif 252156 COMPAT_43 { int netbsd32_ogetdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); } 253157 COMPAT_20 { int netbsd32_statfs(const netbsd32_charp path, netbsd32_statfsp_t buf); } 254158 COMPAT_20 { int netbsd32_fstatfs(int fd, netbsd32_statfsp_t buf); } 255159 UNIMPL 256160 UNIMPL 257#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 258161 STD { int netbsd32_getfh(const netbsd32_charp fname, netbsd32_fhandlep_t fhp); } 259#else 260161 EXCL netbsd32_getfh 261#endif 262162 COMPAT_09 { int netbsd32_ogetdomainname(netbsd32_charp domainname, int len); } 263163 COMPAT_09 { int netbsd32_osetdomainname(netbsd32_charp domainname, int len); } 264164 COMPAT_09 { int netbsd32_uname(netbsd32_outsnamep_t name); } 265165 STD { int netbsd32_sysarch(int op, netbsd32_voidp parms); } 266166 UNIMPL 267167 UNIMPL 268168 UNIMPL 269#if defined(SYSVSEM) || !defined(_KERNEL) 270169 COMPAT_10 { int netbsd32_sys_semsys(int which, int a2, int a3, int a4, int a5); } osemsys 271#else 272169 EXCL netbsd32_sys_semsys 273#endif 274#if defined(SYSVMSG) || !defined(_KERNEL) 275170 COMPAT_10 { int netbsd32_sys_msgsys(int which, int a2, int a3, int a4, int a5, int a6); } omsgsys 276#else 277170 EXCL netbsd32_sys_msgsys 278#endif 279#if defined(SYSVSHM) || !defined(_KERNEL) 280171 COMPAT_10 { int netbsd32_sys_shmsys(int which, int a2, int a3, int a4); } oshmsys 281#else 282171 EXCL netbsd32_sys_shmsys 283#endif 284172 UNIMPL 285173 STD { netbsd32_ssize_t netbsd32_pread(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); } 286174 STD { netbsd32_ssize_t netbsd32_pwrite(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); } 287; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded. 288175 STD { int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); } 289176 STD { int netbsd32_ntp_adjtime(netbsd32_timexp_t tp); } 290177 UNIMPL 291178 UNIMPL 292179 UNIMPL 293180 UNIMPL 294 295; Syscalls 180-199 are used by/reserved for BSD 296181 STD { int netbsd32_setgid(gid_t gid); } 297182 STD { int netbsd32_setegid(gid_t egid); } 298183 STD { int netbsd32_seteuid(uid_t euid); } 299#if defined(LFS) || !defined(_KERNEL) 300184 STD { int netbsd32_sys_lfs_bmapv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); } 301185 STD { int netbsd32_sys_lfs_markv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); } 302186 STD { int netbsd32_sys_lfs_segclean(netbsd32_fsid_tp_t fsidp, netbsd32_u_long segment); } 303187 STD { int netbsd32_sys_lfs_segwait(netbsd32_fsid_tp_t fsidp, netbsd32_timevalp_t tv); } 304#else 305184 EXCL netbsd32_sys_lfs_bmapv 306185 EXCL netbsd32_sys_lfs_markv 307186 EXCL netbsd32_sys_lfs_segclean 308187 EXCL netbsd32_sys_lfs_segwait 309#endif 310188 COMPAT_12 { int netbsd32_stat12(const netbsd32_charp path, netbsd32_stat12p_t ub); } 311189 COMPAT_12 { int netbsd32_fstat12(int fd, netbsd32_stat12p_t sb); } 312190 COMPAT_12 { int netbsd32_lstat12(const netbsd32_charp path, netbsd32_stat12p_t ub); } 313191 STD { netbsd32_long netbsd32_pathconf(const netbsd32_charp path, int name); } 314192 STD { netbsd32_long netbsd32_fpathconf(int fd, int name); } 315193 UNIMPL 316194 STD { int netbsd32_getrlimit(int which, netbsd32_rlimitp_t rlp); } 317195 STD { int netbsd32_setrlimit(int which, const netbsd32_rlimitp_t rlp); } 318196 COMPAT_12 { int netbsd32_getdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); } 319197 STD { netbsd32_voidp netbsd32_mmap(netbsd32_voidp addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pad, off_t pos); } 320198 INDIR { quad_t sys___syscall(quad_t num, ...); } 321199 STD { off_t netbsd32_lseek(int fd, int pad, off_t offset, int whence); } 322200 STD { int netbsd32_truncate(const netbsd32_charp path, int pad, off_t length); } 323201 STD { int netbsd32_ftruncate(int fd, int pad, off_t length); } 324202 STD { int netbsd32___sysctl(netbsd32_intp name, u_int namelen, netbsd32_voidp old, netbsd32_size_tp oldlenp, netbsd32_voidp new, netbsd32_size_t newlen); } 325203 STD { int netbsd32_mlock(const netbsd32_voidp addr, netbsd32_size_t len); } 326204 STD { int netbsd32_munlock(const netbsd32_voidp addr, netbsd32_size_t len); } 327205 STD { int netbsd32_undelete(const netbsd32_charp path); } 328206 STD { int netbsd32_futimes(int fd, const netbsd32_timevalp_t tptr); } 329207 STD { int netbsd32_getpgid(pid_t pid); } 330208 STD { int netbsd32_reboot(int opt, netbsd32_charp bootstr); } 331209 STD { int netbsd32_poll(netbsd32_pollfdp_t fds, u_int nfds, int timeout); } 332; 333; Syscalls 210-219 are reserved for dynamically loaded syscalls 334; 335#if defined(LKM) || !defined(_KERNEL) 336210 NODEF { int sys_lkmnosys(void); } 337211 NODEF { int sys_lkmnosys(void); } 338212 NODEF { int sys_lkmnosys(void); } 339213 NODEF { int sys_lkmnosys(void); } 340214 NODEF { int sys_lkmnosys(void); } 341215 NODEF { int sys_lkmnosys(void); } 342216 NODEF { int sys_lkmnosys(void); } 343217 NODEF { int sys_lkmnosys(void); } 344218 NODEF { int sys_lkmnosys(void); } 345219 NODEF { int sys_lkmnosys(void); } 346#else /* !LKM || !_KERNEL */ 347210 EXCL lkmnosys 348211 EXCL lkmnosys 349212 EXCL lkmnosys 350213 EXCL lkmnosys 351214 EXCL lkmnosys 352215 EXCL lkmnosys 353216 EXCL lkmnosys 354217 EXCL lkmnosys 355218 EXCL lkmnosys 356219 EXCL lkmnosys 357#endif /* !LKM || !_KERNEL */ 358; System calls 220-300 are reserved for use by NetBSD 359#if defined(SYSVSEM) || !defined(_KERNEL) 360220 COMPAT_14 { int netbsd32___semctl(int semid, int semnum, int cmd, netbsd32_semunu_t arg); } 361221 STD { int netbsd32_semget(netbsd32_key_t key, int nsems, int semflg); } 362222 STD { int netbsd32_semop(int semid, netbsd32_sembufp_t sops, netbsd32_size_t nsops); } 363223 STD { int netbsd32_semconfig(int flag); } 364#else 365220 EXCL compat_14_netbsd32_semctl 366221 EXCL netbsd32_semget 367222 EXCL netbsd32_semop 368223 EXCL netbsd32_semconfig 369#endif 370#if defined(SYSVMSG) || !defined(_KERNEL) 371224 COMPAT_14 { int netbsd32_msgctl(int msqid, int cmd, netbsd32_msqid_dsp_t buf); } 372225 STD { int netbsd32_msgget(netbsd32_key_t key, int msgflg); } 373226 STD { int netbsd32_msgsnd(int msqid, const netbsd32_voidp msgp, netbsd32_size_t msgsz, int msgflg); } 374227 STD { netbsd32_ssize_t netbsd32_msgrcv(int msqid, netbsd32_voidp msgp, netbsd32_size_t msgsz, netbsd32_long msgtyp, int msgflg); } 375#else 376224 EXCL compat_14_netbsd32_msgctl 377225 EXCL netbsd32_msgget 378226 EXCL netbsd32_msgsnd 379227 EXCL netbsd32_msgrcv 380#endif 381#if defined(SYSVSHM) || !defined(_KERNEL) 382228 STD { netbsd32_voidp netbsd32_shmat(int shmid, const netbsd32_voidp shmaddr, int shmflg); } 383229 COMPAT_14 { int netbsd32_shmctl(int shmid, int cmd, netbsd32_shmid_dsp_t buf); } 384230 STD { int netbsd32_shmdt(const netbsd32_voidp shmaddr); } 385231 STD { int netbsd32_shmget(netbsd32_key_t key, netbsd32_size_t size, int shmflg); } 386#else 387228 EXCL netbsd32_shmat 388229 EXCL compat_14_netbsd32_shmctl 389230 EXCL netbsd32_shmdt 390231 EXCL netbsd32_shmget 391#endif 392232 STD { int netbsd32_clock_gettime(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); } 393233 STD { int netbsd32_clock_settime(netbsd32_clockid_t clock_id, const netbsd32_timespecp_t tp); } 394234 STD { int netbsd32_clock_getres(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); } 395235 STD { int netbsd32_timer_create(netbsd32_clockid_t clock_id, netbsd32_sigeventp_t evp, \ 396 netbsd32_timerp_t timerid); } 397236 STD { int netbsd32_timer_delete(netbsd32_timer_t timerid); } 398237 STD { int netbsd32_timer_settime(netbsd32_timer_t timerid, int flags, \ 399 const netbsd32_itimerspecp_t value, \ 400 netbsd32_itimerspecp_t ovalue); } 401238 STD { int netbsd32_timer_gettime(netbsd32_timer_t timerid, netbsd32_itimerspecp_t value); } 402239 STD { int netbsd32_timer_getoverrun(netbsd32_timer_t timerid); } 403; 404; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 405; 406240 STD { int netbsd32_nanosleep(const netbsd32_timespecp_t rqtp, netbsd32_timespecp_t rmtp); } 407241 STD { int netbsd32_fdatasync(int fd); } 408242 STD { int netbsd32_mlockall(int flags); } 409243 NOARGS { int sys_munlockall(void); } 410244 STD { int netbsd32___sigtimedwait(const netbsd32_sigsetp_t set, \ 411 netbsd32_siginfop_t info, \ 412 netbsd32_timespecp_t timeout); } 413245 UNIMPL 414246 UNIMPL 415247 UNIMPL 416248 UNIMPL 417249 UNIMPL 418250 UNIMPL 419251 UNIMPL 420252 UNIMPL 421253 UNIMPL 422254 UNIMPL 423255 UNIMPL 424256 UNIMPL 425257 UNIMPL 426258 UNIMPL 427259 UNIMPL 428260 UNIMPL 429261 UNIMPL 430262 UNIMPL 431263 UNIMPL 432264 UNIMPL 433265 UNIMPL 434266 UNIMPL 435267 UNIMPL 436268 UNIMPL 437269 UNIMPL 438270 STD { int netbsd32___posix_rename(const netbsd32_charp from, const netbsd32_charp to); } 439271 STD { int netbsd32_swapctl(int cmd, netbsd32_voidp arg, int misc); } 440272 STD { int netbsd32_getdents(int fd, netbsd32_charp buf, netbsd32_size_t count); } 441273 STD { int netbsd32_minherit(netbsd32_voidp addr, netbsd32_size_t len, int inherit); } 442274 STD { int netbsd32_lchmod(const netbsd32_charp path, mode_t mode); } 443275 STD { int netbsd32_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); } 444276 STD { int netbsd32_lutimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); } 445277 STD { int netbsd32___msync13(netbsd32_voidp addr, netbsd32_size_t len, int flags); } 446278 STD { int netbsd32___stat13(const netbsd32_charp path, netbsd32_stat13p_t ub); } 447279 STD { int netbsd32___fstat13(int fd, netbsd32_stat13p_t sb); } 448280 STD { int netbsd32___lstat13(const netbsd32_charp path, netbsd32_stat13p_t ub); } 449281 STD { int netbsd32___sigaltstack14(const netbsd32_sigaltstackp_t nss, netbsd32_sigaltstackp_t oss); } 450282 NOARGS { int sys___vfork14(void); } 451283 STD { int netbsd32___posix_chown(const netbsd32_charp path, uid_t uid, gid_t gid); } 452284 STD { int netbsd32___posix_fchown(int fd, uid_t uid, gid_t gid); } 453285 STD { int netbsd32___posix_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); } 454286 STD { pid_t netbsd32_getsid(pid_t pid); } 455287 STD { int netbsd32___clone(int flags, netbsd32_voidp stack); } 456#if defined(KTRACE) || !defined(_KERNEL) 457288 STD { int netbsd32_fktrace(const int fd, int ops, int facs, int pid); } 458#else 459288 EXCL netbsd32_fktrace 460#endif 461289 STD { netbsd32_ssize_t netbsd32_preadv(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); } 462290 STD { netbsd32_ssize_t netbsd32_pwritev(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); } 463291 STD { int netbsd32___sigaction14(int signum, \ 464 const netbsd32_sigactionp_t nsa, \ 465 netbsd32_sigactionp_t osa); } 466292 STD { int netbsd32___sigpending14(netbsd32_sigsetp_t set); } 467293 STD { int netbsd32___sigprocmask14(int how, \ 468 const netbsd32_sigsetp_t set, \ 469 netbsd32_sigsetp_t oset); } 470294 STD { int netbsd32___sigsuspend14(const netbsd32_sigsetp_t set); } 471295 COMPAT_16 { int netbsd32___sigreturn14(netbsd32_sigcontextp_t sigcntxp); } 472296 STD { int netbsd32___getcwd(netbsd32_charp bufp, netbsd32_size_t length); } 473297 STD { int netbsd32_fchroot(int fd); } 474298 STD { int netbsd32_fhopen(const netbsd32_fhandlep_t fhp, \ 475 int flags); } 476299 STD { int netbsd32_fhstat(const netbsd32_fhandlep_t fhp, \ 477 netbsd32_statp_t sb); } 478300 COMPAT_20 { int netbsd32_fhstatfs(netbsd32_fhandlep_t fhp, \ 479 netbsd32_statp_t buf); } 480#if defined(SYSVSEM) || !defined(_KERNEL) 481301 STD { int netbsd32___semctl14(int semid, int semnum, int cmd, \ 482 union netbsd32_semun3* arg); } 483#else 484301 EXCL __semctl14 485#endif 486#if defined(SYSVMSG) || !defined(_KERNEL) 487302 STD { int netbsd32___msgctl13(int msqid, int cmd, \ 488 netbsd32_msqid_dsp_t buf); } 489#else 490302 EXCL __msgctl13 491#endif 492#if defined(SYSVSHM) || !defined(_KERNEL) 493303 STD { int netbsd32___shmctl13(int shmid, int cmd, \ 494 netbsd32_shmid_dsp_t buf); } 495#else 496303 EXCL __shmctl13 497#endif 498304 STD { int netbsd32_lchflags(const netbsd32_charp path, netbsd32_u_long flags); } 499305 STD { int sys_issetugid(void); } 500306 STD { int netbsd32_utrace(const netbsd32_charp label, netbsd32_voidp addr, \ 501 netbsd32_size_t len); } 502; 503; Syscalls 307 and 308 are reserved for getcontext and setcontext 504; 505307 STD { int netbsd32_getcontext(netbsd32_ucontextp ucp); } 506308 STD { int netbsd32_setcontext(netbsd32_ucontextp ucp, \ 507 uint32_t flags, netbsd32_lwpidp new_lwp); } 508; 509; Syscalls 309-339 are reserved for LWP and scheduler activation syscalls. 510; 511309 UNIMPL 512310 UNIMPL 513311 UNIMPL 514312 UNIMPL 515313 UNIMPL 516314 UNIMPL 517315 UNIMPL 518316 UNIMPL 519317 UNIMPL 520318 UNIMPL 521319 UNIMPL 522320 UNIMPL 523321 UNIMPL 524322 UNIMPL 525323 UNIMPL 526324 UNIMPL 527325 UNIMPL 528326 UNIMPL 529327 UNIMPL 530328 UNIMPL 531329 UNIMPL 532330 UNIMPL 533331 UNIMPL 534332 UNIMPL 535333 UNIMPL 536334 UNIMPL 537335 UNIMPL 538336 UNIMPL 539337 UNIMPL 540338 UNIMPL 541339 UNIMPL 542340 STD { int netbsd32___sigaction_sigtramp(int signum, \ 543 const netbsd32_sigactionp_t nsa, \ 544 netbsd32_sigactionp_t osa, \ 545 netbsd32_voidp tramp, int vers); } 546341 UNIMPL 547342 UNIMPL 548343 STD { int netbsd32_rasctl(netbsd32_caddr_t addr, netbsd32_size_t len, \ 549 int op); } 550344 NOARGS { int sys_kqueue(void); } 551345 STD { int netbsd32_kevent(int fd, \ 552 netbsd32_keventp_t changelist, netbsd32_size_t nchanges, \ 553 netbsd32_keventp_t eventlist, netbsd32_size_t nevents, \ 554 netbsd32_timespecp_t timeout); } 555346 UNIMPL 556347 UNIMPL 557348 UNIMPL 558349 UNIMPL 559350 UNIMPL 560351 UNIMPL 561352 UNIMPL 562353 UNIMPL 563354 STD { int netbsd32_fsync_range(int fd, int flags, off_t start, \ 564 off_t length); } 565355 STD { int netbsd32_uuidgen(netbsd32_uuidp_t store, int count); } 566356 STD { int netbsd32_getvfsstat(netbsd32_statvfsp_t buf, \ 567 netbsd32_size_t bufsize, int flags); } 568357 STD { int netbsd32_statvfs1(const netbsd32_charp path, \ 569 netbsd32_statvfsp_t buf, int flags); } 570358 STD { int netbsd32_fstatvfs1(int fd, netbsd32_statvfsp_t buf, \ 571 int flags); } 572359 STD { int netbsd32_fhstatvfs1(const netbsd32_fhandlep_t fhp, \ 573 netbsd32_statvfsp_t buf, int flags); } 574360 STD { int netbsd32_extattrctl(const netbsd32_charp path, \ 575 int cmd, const netbsd32_charp filename, int attrnamespace, \ 576 const netbsd32_charp attrname); } 577361 STD { int netbsd32_extattr_set_file(const netbsd32_charp path, \ 578 int attrnamespace, const netbsd32_charp attrname, \ 579 const netbsd32_voidp data, netbsd32_size_t nbytes); } 580362 STD { int netbsd32_extattr_get_file(const netbsd32_charp path, \ 581 int attrnamespace, const netbsd32_charp attrname, \ 582 netbsd32_voidp data, netbsd32_size_t nbytes); } 583363 STD { int netbsd32_extattr_delete_file(const netbsd32_charp path, \ 584 int attrnamespace, const netbsd32_charp attrname); } 585364 STD { int netbsd32_extattr_set_fd(int fd, \ 586 int attrnamespace, const netbsd32_charp attrname, \ 587 const netbsd32_voidp data, netbsd32_size_t nbytes); } 588365 STD { int netbsd32_extattr_get_fd(int fd, \ 589 int attrnamespace, const netbsd32_charp attrname, \ 590 netbsd32_voidp data, netbsd32_size_t nbytes); } 591366 STD { int netbsd32_extattr_delete_fd(int fd, \ 592 int attrnamespace, const netbsd32_charp attrname); } 593367 STD { int netbsd32_extattr_set_link(const netbsd32_charp path, \ 594 int attrnamespace, const netbsd32_charp attrname, \ 595 const netbsd32_voidp data, netbsd32_size_t nbytes); } 596368 STD { int netbsd32_extattr_get_link(const netbsd32_charp path, \ 597 int attrnamespace, const netbsd32_charp attrname, \ 598 netbsd32_voidp data, netbsd32_size_t nbytes); } 599369 STD { int netbsd32_extattr_delete_link(const netbsd32_charp path, \ 600 int attrnamespace, const netbsd32_charp attrname); } 601370 STD { int netbsd32_extattr_list_fd(int fd, \ 602 int attrnamespace, netbsd32_voidp data, \ 603 netbsd32_size_t nbytes); } 604371 STD { int netbsd32_extattr_list_file(const netbsd32_charp path, \ 605 int attrnamespace, netbsd32_voidp data, \ 606 netbsd32_size_t nbytes); } 607372 STD { int netbsd32_extattr_list_link(const netbsd32_charp path, \ 608 int attrnamespace, netbsd32_voidp data, \ 609 netbsd32_size_t nbytes); } 610373 STD { int netbsd32_pselect(int nd, netbsd32_fd_setp_t in, \ 611 netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \ 612 const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); } 613374 STD { int netbsd32_pollts(netbsd32_pollfdp_t fds, u_int nfds, \ 614 const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); } 615375 STD { int netbsd32_setxattr(const netbsd32_charp path, \ 616 const netbsd32_charp name, netbsd32_voidp value, \ 617 netbsd32_size_t size, int flags); } 618376 STD { int netbsd32_lsetxattr(const netbsd32_charp path, \ 619 const netbsd32_charp name, netbsd32_voidp value, \ 620 netbsd32_size_t size, int flags); } 621377 STD { int netbsd32_fsetxattr(int fd, \ 622 const netbsd32_charp name, netbsd32_voidp value, \ 623 netbsd32_size_t size, int flags); } 624378 STD { int netbsd32_getxattr(const netbsd32_charp path, \ 625 const netbsd32_charp name, netbsd32_voidp value, \ 626 netbsd32_size_t size); } 627379 STD { int netbsd32_lgetxattr(const netbsd32_charp path, \ 628 const netbsd32_charp name, netbsd32_voidp value, \ 629 netbsd32_size_t size); } 630380 STD { int netbsd32_fgetxattr(int fd, \ 631 const netbsd32_charp name, netbsd32_voidp value, \ 632 netbsd32_size_t size); } 633381 STD { int netbsd32_listxattr(const netbsd32_charp path, \ 634 netbsd32_charp list, netbsd32_size_t size); } 635382 STD { int netbsd32_llistxattr(const netbsd32_charp path, \ 636 netbsd32_charp list, netbsd32_size_t size); } 637383 STD { int netbsd32_flistxattr(int fd, \ 638 netbsd32_charp list, netbsd32_size_t size); } 639384 STD { int netbsd32_removexattr(const netbsd32_charp path, \ 640 const netbsd32_charp name); } 641385 STD { int netbsd32_lremovexattr(const netbsd32_charp path, \ 642 const netbsd32_charp name); } 643386 STD { int netbsd32_fremovexattr(int fd, \ 644 const netbsd32_charp name); } 645387 STD { int netbsd32_sys___stat30(const netbsd32_charp path, \ 646 netbsd32_statp_t ub); } 647388 STD { int netbsd32_sys___fstat30(int fd, \ 648 netbsd32_statp_t sb); } 649389 STD { int netbsd32_sys___lstat30( \ 650 const netbsd32_charp path, netbsd32_statp_t ub); } 651390 STD { int netbsd32_sys___getdents30(int fd, \ 652 netbsd32_charp buf, netbsd32_size_t count); } 653