1 $NetBSD: syscalls.master,v 1.63 2007/12/07 22:41:05 ad 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_nfsserver.h" 40#include "opt_compat_netbsd.h" 41#include "opt_ntp.h" 42#include "opt_sysv.h" 43#include "opt_compat_43.h" 44#include "opt_posix.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/syscallargs.h> 55 56#include <compat/netbsd32/netbsd32.h> 57#include <compat/netbsd32/netbsd32_syscallargs.h> 58 59%% 60 61; Reserved/unimplemented system calls in the range 0-150 inclusive 62; are reserved for use in future Berkeley releases. 63; Additional system calls implemented in vendor and other 64; redistributions should be placed in the reserved range at the end 65; of the current calls. 66 670 INDIR { int netbsd32_sys_syscall(int code, \ 68 ... register32_t args[NETBSD32_SYS_MAXSYSARGS]); } 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 MPSAFE { uid_t sys_getuid(void); } 9325 NOARGS MPSAFE { 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 MPSAFE { 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 MPSAFE { 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); } 11345 STD { int netbsd32_ktrace(const netbsd32_charp fname, int ops, int facs, int pid); } 11446 STD { int netbsd32_sigaction(int signum, const netbsd32_sigactionp_t nsa, netbsd32_sigactionp_t osa); } 11547 NOARGS MPSAFE { gid_t sys_getgid(void); } 11648 COMPAT_13 { int netbsd32_sigprocmask(int how, \ 117 int mask); } sigprocmask13 11849 STD { int netbsd32___getlogin(netbsd32_charp namebuf, u_int namelen); } 11950 STD { int netbsd32_setlogin(const netbsd32_charp namebuf); } 12051 STD { int netbsd32_acct(const netbsd32_charp path); } 12152 COMPAT_13 MPSAFE { int sys_sigpending(void); } sigpending13 12253 COMPAT_13 { int netbsd32_sigaltstack13(const netbsd32_sigaltstack13p_t nss, netbsd32_sigaltstack13p_t oss); } 12354 STD { int netbsd32_ioctl(int fd, netbsd32_u_long com, ... netbsd32_voidp data); } 12455 COMPAT_12 { int netbsd32_reboot(int opt); } 12556 STD { int netbsd32_revoke(const netbsd32_charp path); } 12657 STD { int netbsd32_symlink(const netbsd32_charp path, const netbsd32_charp link); } 12758 STD { int netbsd32_readlink(const netbsd32_charp path, netbsd32_charp buf, netbsd32_size_t count); } 12859 STD { int netbsd32_execve(const netbsd32_charp path, netbsd32_charpp argp, netbsd32_charpp envp); } 12960 STD { mode_t netbsd32_umask(mode_t newmask); } 13061 STD { int netbsd32_chroot(const netbsd32_charp path); } 13162 COMPAT_43 { int netbsd32_fstat43(int fd, netbsd32_stat43p_t sb); } 13263 COMPAT_43 { int netbsd32_ogetkerninfo(int op, netbsd32_charp where, netbsd32_intp size, int arg); } 13364 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 13465 COMPAT_12 { int netbsd32_msync(netbsd32_caddr_t addr, netbsd32_size_t len); } 135; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 13666 NOARGS { int sys_vfork(void); } 13767 OBSOL vread 13868 OBSOL vwrite 13969 STD { int netbsd32_sbrk(netbsd32_intptr_t incr); } 14070 STD { int netbsd32_sstk(int incr); } 14171 COMPAT_43 { int netbsd32_ommap(netbsd32_caddr_t addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pos); } 14272 STD { int netbsd32_ovadvise(int anom); } vadvise 14373 STD { int netbsd32_munmap(netbsd32_voidp addr, netbsd32_size_t len); } 14474 STD { int netbsd32_mprotect(netbsd32_voidp addr, netbsd32_size_t len, int prot); } 14575 STD { int netbsd32_madvise(netbsd32_voidp addr, netbsd32_size_t len, int behav); } 14676 OBSOL vhangup 14777 OBSOL vlimit 14878 STD { int netbsd32_mincore(netbsd32_caddr_t addr, netbsd32_size_t len, netbsd32_charp vec); } 14979 STD { int netbsd32_getgroups(int gidsetsize, netbsd32_gid_tp gidset); } 15080 STD { int netbsd32_setgroups(int gidsetsize, const netbsd32_gid_tp gidset); } 15181 NOARGS MPSAFE { int sys_getpgrp(void); } 15282 STD { int netbsd32_setpgid(int pid, int pgid); } 15383 STD { int netbsd32_setitimer(int which, const netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); } 15484 COMPAT_43 { int sys_wait(void); } owait 15585 COMPAT_12 { int netbsd32_oswapon(const netbsd32_charp name); } 15686 STD { int netbsd32_getitimer(int which, netbsd32_itimervalp_t itv); } 15787 COMPAT_43 { int netbsd32_ogethostname(netbsd32_charp hostname, u_int len); } 15888 COMPAT_43 { int netbsd32_osethostname(netbsd32_charp hostname, u_int len); } 15989 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 16090 STD { int netbsd32_dup2(int from, int to); } 16191 UNIMPL getdopt 16292 STD { int netbsd32_fcntl(int fd, int cmd, ... netbsd32_voidp arg); } 16393 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); } 16494 UNIMPL setdopt 16595 STD { int netbsd32_fsync(int fd); } 16696 STD { int netbsd32_setpriority(int which, int who, int prio); } 16797 COMPAT_30 { int netbsd32_socket(int domain, int type, int protocol); } 16898 STD { int netbsd32_connect(int s, const netbsd32_sockaddrp_t name, int namelen); } 16999 COMPAT_43 { int netbsd32_oaccept(int s, netbsd32_caddr_t name, netbsd32_intp anamelen); } 170100 STD { int netbsd32_getpriority(int which, int who); } 171101 COMPAT_43 { int netbsd32_osend(int s, netbsd32_caddr_t buf, int len, int flags); } 172102 COMPAT_43 { int netbsd32_orecv(int s, netbsd32_caddr_t buf, int len, int flags); } 173103 COMPAT_13 { int netbsd32_sigreturn(netbsd32_sigcontextp_t sigcntxp); } sigreturn13 174104 STD { int netbsd32_bind(int s, const netbsd32_sockaddrp_t name, int namelen); } 175105 STD { int netbsd32_setsockopt(int s, int level, int name, const netbsd32_voidp val, int valsize); } 176106 STD { int netbsd32_listen(int s, int backlog); } 177107 OBSOL vtimes 178108 COMPAT_43 { int netbsd32_osigvec(int signum, netbsd32_sigvecp_t nsv, netbsd32_sigvecp_t osv); } 179109 COMPAT_43 { int netbsd32_sigblock(int mask); } 180110 COMPAT_43 { int netbsd32_sigsetmask(int mask); } 181111 COMPAT_13 { int netbsd32_sigsuspend(int mask); } sigsuspend13 182112 COMPAT_43 { int netbsd32_osigstack(netbsd32_sigstackp_t nss, netbsd32_sigstackp_t oss); } 183113 COMPAT_43 { int netbsd32_orecvmsg(int s, netbsd32_omsghdrp_t msg, int flags); } 184114 COMPAT_43 { int netbsd32_osendmsg(int s, netbsd32_caddr_t msg, int flags); } 185115 OBSOL vtrace 186116 STD { int netbsd32_gettimeofday(netbsd32_timevalp_t tp, netbsd32_timezonep_t tzp); } 187117 STD { int netbsd32_getrusage(int who, netbsd32_rusagep_t rusage); } 188118 STD { int netbsd32_getsockopt(int s, int level, int name, netbsd32_voidp val, netbsd32_intp avalsize); } 189119 OBSOL resuba 190120 STD { netbsd32_ssize_t netbsd32_readv(int fd, const netbsd32_iovecp_t iovp, int iovcnt); } 191121 STD { netbsd32_ssize_t netbsd32_writev(int fd, const netbsd32_iovecp_t iovp, int iovcnt); } 192122 STD { int netbsd32_settimeofday(const netbsd32_timevalp_t tv, const netbsd32_timezonep_t tzp); } 193123 STD { int netbsd32_fchown(int fd, uid_t uid, gid_t gid); } 194124 STD { int netbsd32_fchmod(int fd, mode_t mode); } 195125 COMPAT_43 { int netbsd32_orecvfrom(int s, netbsd32_caddr_t buf, netbsd32_size_t len, int flags, netbsd32_caddr_t from, netbsd32_intp fromlenaddr); } 196126 STD { int netbsd32_setreuid(uid_t ruid, uid_t euid); } 197127 STD { int netbsd32_setregid(gid_t rgid, gid_t egid); } 198128 STD { int netbsd32_rename(const netbsd32_charp from, const netbsd32_charp to); } 199129 COMPAT_43 { int netbsd32_otruncate(const netbsd32_charp path, netbsd32_long length); } 200130 COMPAT_43 { int netbsd32_oftruncate(int fd, netbsd32_long length); } 201131 STD { int netbsd32_flock(int fd, int how); } 202132 STD { int netbsd32_mkfifo(const netbsd32_charp path, mode_t mode); } 203133 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); } 204134 STD { int netbsd32_shutdown(int s, int how); } 205135 STD { int netbsd32_socketpair(int domain, int type, int protocol, netbsd32_intp rsv); } 206136 STD { int netbsd32_mkdir(const netbsd32_charp path, mode_t mode); } 207137 STD { int netbsd32_rmdir(const netbsd32_charp path); } 208138 STD { int netbsd32_utimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); } 209139 OBSOL 4.2 sigreturn 210140 STD { int netbsd32_adjtime(const netbsd32_timevalp_t delta, netbsd32_timevalp_t olddelta); } 211141 COMPAT_43 { int netbsd32_ogetpeername(int fdes, netbsd32_caddr_t asa, netbsd32_intp alen); } 212142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 213143 COMPAT_43 { int netbsd32_sethostid(int32_t hostid); } 214144 COMPAT_43 { int netbsd32_ogetrlimit(int which, netbsd32_orlimitp_t rlp); } 215145 COMPAT_43 { int netbsd32_osetrlimit(int which, const netbsd32_orlimitp_t rlp); } 216146 COMPAT_43 { int netbsd32_killpg(int pgid, int signum); } 217147 NOARGS { int sys_setsid(void); } 218148 STD { int netbsd32_quotactl(const netbsd32_charp path, int cmd, int uid, netbsd32_caddr_t arg); } 219149 COMPAT_43 { int sys_quota(void); } oquota 220150 COMPAT_43 { int netbsd32_ogetsockname(int fdec, netbsd32_caddr_t asa, netbsd32_intp alen); } 221 222; Syscalls 151-180 inclusive are reserved for vendor-specific 223; system calls. (This includes various calls added for compatibity 224; with other Unix variants.) 225; Some of these calls are now supported by BSD... 226151 UNIMPL 227152 UNIMPL 228153 UNIMPL 229154 UNIMPL 230#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 231155 STD { int netbsd32_nfssvc(int flag, netbsd32_voidp argp); } 232#else 233155 EXCL netbsd32_nfssvc 234#endif 235156 COMPAT_43 { int netbsd32_ogetdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); } 236157 COMPAT_20 { int netbsd32_statfs(const netbsd32_charp path, netbsd32_statfsp_t buf); } 237158 COMPAT_20 { int netbsd32_fstatfs(int fd, netbsd32_statfsp_t buf); } 238159 UNIMPL 239160 UNIMPL 240161 COMPAT_30 { int netbsd32_getfh(const netbsd32_charp fname, netbsd32_compat_30_fhandlep_t fhp); } 241162 COMPAT_09 { int netbsd32_ogetdomainname(netbsd32_charp domainname, int len); } 242163 COMPAT_09 { int netbsd32_osetdomainname(netbsd32_charp domainname, int len); } 243164 COMPAT_09 { int netbsd32_uname(netbsd32_outsnamep_t name); } 244165 STD { int netbsd32_sysarch(int op, netbsd32_voidp parms); } 245166 UNIMPL 246167 UNIMPL 247168 UNIMPL 248#if defined(SYSVSEM) || !defined(_KERNEL) 249169 COMPAT_10 { int netbsd32_sys_semsys(int which, int a2, int a3, int a4, int a5); } osemsys 250#else 251169 EXCL netbsd32_sys_semsys 252#endif 253#if defined(SYSVMSG) || !defined(_KERNEL) 254170 COMPAT_10 { int netbsd32_sys_msgsys(int which, int a2, int a3, int a4, int a5, int a6); } omsgsys 255#else 256170 EXCL netbsd32_sys_msgsys 257#endif 258#if defined(SYSVSHM) || !defined(_KERNEL) 259171 COMPAT_10 { int netbsd32_sys_shmsys(int which, int a2, int a3, int a4); } oshmsys 260#else 261171 EXCL netbsd32_sys_shmsys 262#endif 263172 UNIMPL 264173 STD { netbsd32_ssize_t netbsd32_pread(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); } 265174 STD { netbsd32_ssize_t netbsd32_pwrite(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); } 266175 COMPAT_30 { int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); } 267176 STD { int netbsd32_ntp_adjtime(netbsd32_timexp_t tp); } 268177 UNIMPL 269178 UNIMPL 270179 UNIMPL 271180 UNIMPL 272 273; Syscalls 180-199 are used by/reserved for BSD 274181 STD { int netbsd32_setgid(gid_t gid); } 275182 STD { int netbsd32_setegid(gid_t egid); } 276183 STD { int netbsd32_seteuid(uid_t euid); } 277#if defined(LFS) || !defined(_KERNEL) 278184 STD { int netbsd32_sys_lfs_bmapv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); } 279185 STD { int netbsd32_sys_lfs_markv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); } 280186 STD { int netbsd32_sys_lfs_segclean(netbsd32_fsid_tp_t fsidp, netbsd32_u_long segment); } 281187 STD { int netbsd32_sys_lfs_segwait(netbsd32_fsid_tp_t fsidp, netbsd32_timevalp_t tv); } 282#else 283184 EXCL netbsd32_sys_lfs_bmapv 284185 EXCL netbsd32_sys_lfs_markv 285186 EXCL netbsd32_sys_lfs_segclean 286187 EXCL netbsd32_sys_lfs_segwait 287#endif 288188 COMPAT_12 { int netbsd32_stat12(const netbsd32_charp path, netbsd32_stat12p_t ub); } 289189 COMPAT_12 { int netbsd32_fstat12(int fd, netbsd32_stat12p_t sb); } 290190 COMPAT_12 { int netbsd32_lstat12(const netbsd32_charp path, netbsd32_stat12p_t ub); } 291191 STD { netbsd32_long netbsd32_pathconf(const netbsd32_charp path, int name); } 292192 STD { netbsd32_long netbsd32_fpathconf(int fd, int name); } 293193 UNIMPL 294194 STD { int netbsd32_getrlimit(int which, netbsd32_rlimitp_t rlp); } 295195 STD { int netbsd32_setrlimit(int which, const netbsd32_rlimitp_t rlp); } 296196 COMPAT_12 { int netbsd32_getdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); } 297197 STD { netbsd32_voidp netbsd32_mmap(netbsd32_voidp addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pad, off_t pos); } 298198 INDIR { quad_t netbsd32_sys___syscall(quad_t code, \ 299 ... register32_t args[NETBSD32_SYS_MAXSYSARGS]); } 300199 STD { off_t netbsd32_lseek(int fd, int pad, off_t offset, int whence); } 301200 STD { int netbsd32_truncate(const netbsd32_charp path, int pad, off_t length); } 302201 STD { int netbsd32_ftruncate(int fd, int pad, off_t length); } 303202 STD { int netbsd32___sysctl(netbsd32_intp name, u_int namelen, netbsd32_voidp old, netbsd32_size_tp oldlenp, netbsd32_voidp new, netbsd32_size_t newlen); } 304203 STD { int netbsd32_mlock(const netbsd32_voidp addr, netbsd32_size_t len); } 305204 STD { int netbsd32_munlock(const netbsd32_voidp addr, netbsd32_size_t len); } 306205 STD { int netbsd32_undelete(const netbsd32_charp path); } 307206 STD { int netbsd32_futimes(int fd, const netbsd32_timevalp_t tptr); } 308207 STD { int netbsd32_getpgid(pid_t pid); } 309208 STD { int netbsd32_reboot(int opt, netbsd32_charp bootstr); } 310209 STD { int netbsd32_poll(netbsd32_pollfdp_t fds, u_int nfds, int timeout); } 311; 312; Syscalls 210-219 are reserved for dynamically loaded syscalls 313; 314#if defined(LKM) || !defined(_KERNEL) 315210 NODEF { int sys_lkmnosys(void); } 316211 NODEF { int sys_lkmnosys(void); } 317212 NODEF { int sys_lkmnosys(void); } 318213 NODEF { int sys_lkmnosys(void); } 319214 NODEF { int sys_lkmnosys(void); } 320215 NODEF { int sys_lkmnosys(void); } 321216 NODEF { int sys_lkmnosys(void); } 322217 NODEF { int sys_lkmnosys(void); } 323218 NODEF { int sys_lkmnosys(void); } 324219 NODEF { int sys_lkmnosys(void); } 325#else /* !LKM || !_KERNEL */ 326210 EXCL lkmnosys 327211 EXCL lkmnosys 328212 EXCL lkmnosys 329213 EXCL lkmnosys 330214 EXCL lkmnosys 331215 EXCL lkmnosys 332216 EXCL lkmnosys 333217 EXCL lkmnosys 334218 EXCL lkmnosys 335219 EXCL lkmnosys 336#endif /* !LKM || !_KERNEL */ 337; System calls 220-300 are reserved for use by NetBSD 338#if defined(SYSVSEM) || !defined(_KERNEL) 339220 COMPAT_14 { int netbsd32___semctl(int semid, int semnum, int cmd, netbsd32_semunu_t arg); } 340221 STD { int netbsd32_semget(netbsd32_key_t key, int nsems, int semflg); } 341222 STD { int netbsd32_semop(int semid, netbsd32_sembufp_t sops, netbsd32_size_t nsops); } 342223 STD { int netbsd32_semconfig(int flag); } 343#else 344220 EXCL compat_14_netbsd32_semctl 345221 EXCL netbsd32_semget 346222 EXCL netbsd32_semop 347223 EXCL netbsd32_semconfig 348#endif 349#if defined(SYSVMSG) || !defined(_KERNEL) 350224 COMPAT_14 { int netbsd32_msgctl(int msqid, int cmd, netbsd32_msqid_dsp_t buf); } 351225 STD { int netbsd32_msgget(netbsd32_key_t key, int msgflg); } 352226 STD { int netbsd32_msgsnd(int msqid, const netbsd32_voidp msgp, netbsd32_size_t msgsz, int msgflg); } 353227 STD { netbsd32_ssize_t netbsd32_msgrcv(int msqid, netbsd32_voidp msgp, netbsd32_size_t msgsz, netbsd32_long msgtyp, int msgflg); } 354#else 355224 EXCL compat_14_netbsd32_msgctl 356225 EXCL netbsd32_msgget 357226 EXCL netbsd32_msgsnd 358227 EXCL netbsd32_msgrcv 359#endif 360#if defined(SYSVSHM) || !defined(_KERNEL) 361228 STD { netbsd32_voidp netbsd32_shmat(int shmid, const netbsd32_voidp shmaddr, int shmflg); } 362229 COMPAT_14 { int netbsd32_shmctl(int shmid, int cmd, netbsd32_shmid_dsp_t buf); } 363230 STD { int netbsd32_shmdt(const netbsd32_voidp shmaddr); } 364231 STD { int netbsd32_shmget(netbsd32_key_t key, netbsd32_size_t size, int shmflg); } 365#else 366228 EXCL netbsd32_shmat 367229 EXCL compat_14_netbsd32_shmctl 368230 EXCL netbsd32_shmdt 369231 EXCL netbsd32_shmget 370#endif 371232 STD { int netbsd32_clock_gettime(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); } 372233 STD { int netbsd32_clock_settime(netbsd32_clockid_t clock_id, const netbsd32_timespecp_t tp); } 373234 STD { int netbsd32_clock_getres(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); } 374235 STD { int netbsd32_timer_create(netbsd32_clockid_t clock_id, netbsd32_sigeventp_t evp, \ 375 netbsd32_timerp_t timerid); } 376236 STD { int netbsd32_timer_delete(netbsd32_timer_t timerid); } 377237 STD { int netbsd32_timer_settime(netbsd32_timer_t timerid, int flags, \ 378 const netbsd32_itimerspecp_t value, \ 379 netbsd32_itimerspecp_t ovalue); } 380238 STD { int netbsd32_timer_gettime(netbsd32_timer_t timerid, netbsd32_itimerspecp_t value); } 381239 STD { int netbsd32_timer_getoverrun(netbsd32_timer_t timerid); } 382; 383; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 384; 385240 STD { int netbsd32_nanosleep(const netbsd32_timespecp_t rqtp, netbsd32_timespecp_t rmtp); } 386241 STD { int netbsd32_fdatasync(int fd); } 387242 STD { int netbsd32_mlockall(int flags); } 388243 NOARGS { int sys_munlockall(void); } 389244 STD { int netbsd32___sigtimedwait(const netbsd32_sigsetp_t set, \ 390 netbsd32_siginfop_t info, \ 391 netbsd32_timespecp_t timeout); } 392245 UNIMPL 393246 UNIMPL 394#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC)) 395247 STD { int netbsd32__ksem_init(unsigned int value, netbsd32_semidp_t idp); } 396248 STD { int netbsd32__ksem_open(const netbsd32_charp name, int oflag, \ 397 mode_t mode, unsigned int value, netbsd32_semidp_t idp); } 398249 STD { int netbsd32__ksem_unlink(const netbsd32_charp name); } 399250 STD { int netbsd32__ksem_close(netbsd32_semid_t id); } 400251 STD { int netbsd32__ksem_post(netbsd32_semid_t id); } 401252 STD { int netbsd32__ksem_wait(netbsd32_semid_t id); } 402253 STD { int netbsd32__ksem_trywait(netbsd32_semid_t id); } 403254 STD { int netbsd32__ksem_getvalue(netbsd32_semid_t id, \ 404 netbsd32_intp value); } 405255 STD { int netbsd32__ksem_destroy(netbsd32_semid_t id); } 406256 UNIMPL sys__ksem_timedwait 407#else 408247 EXCL sys__ksem_init 409248 EXCL sys__ksem_open 410249 EXCL sys__ksem_unlink 411250 EXCL sys__ksem_close 412251 EXCL sys__ksem_post 413252 EXCL sys__ksem_wait 414253 EXCL sys__ksem_trywait 415254 EXCL sys__ksem_getvalue 416255 EXCL sys__ksem_destroy 417256 UNIMPL sys__ksem_timedwait 418#endif 419257 UNIMPL 420258 UNIMPL 421259 UNIMPL 422260 UNIMPL 423261 UNIMPL 424262 UNIMPL 425263 UNIMPL 426264 UNIMPL 427265 UNIMPL 428266 UNIMPL 429267 UNIMPL 430268 UNIMPL 431269 UNIMPL 432270 STD { int netbsd32___posix_rename(const netbsd32_charp from, const netbsd32_charp to); } 433271 STD { int netbsd32_swapctl(int cmd, netbsd32_voidp arg, int misc); } 434272 COMPAT_30 { int netbsd32_getdents(int fd, netbsd32_charp buf, netbsd32_size_t count); } 435273 STD { int netbsd32_minherit(netbsd32_voidp addr, netbsd32_size_t len, int inherit); } 436274 STD { int netbsd32_lchmod(const netbsd32_charp path, mode_t mode); } 437275 STD { int netbsd32_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); } 438276 STD { int netbsd32_lutimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); } 439277 STD { int netbsd32___msync13(netbsd32_voidp addr, netbsd32_size_t len, int flags); } 440278 COMPAT_30 { int netbsd32___stat13(const netbsd32_charp path, netbsd32_stat13p_t ub); } 441279 COMPAT_30 { int netbsd32___fstat13(int fd, netbsd32_stat13p_t sb); } 442280 COMPAT_30 { int netbsd32___lstat13(const netbsd32_charp path, netbsd32_stat13p_t ub); } 443281 STD { int netbsd32___sigaltstack14(const netbsd32_sigaltstackp_t nss, netbsd32_sigaltstackp_t oss); } 444282 NOARGS { int sys___vfork14(void); } 445283 STD { int netbsd32___posix_chown(const netbsd32_charp path, uid_t uid, gid_t gid); } 446284 STD { int netbsd32___posix_fchown(int fd, uid_t uid, gid_t gid); } 447285 STD { int netbsd32___posix_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); } 448286 STD { pid_t netbsd32_getsid(pid_t pid); } 449287 STD { int netbsd32___clone(int flags, netbsd32_voidp stack); } 450288 STD { int netbsd32_fktrace(const int fd, int ops, int facs, int pid); } 451289 STD { netbsd32_ssize_t netbsd32_preadv(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); } 452290 STD { netbsd32_ssize_t netbsd32_pwritev(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); } 453291 STD { int netbsd32___sigaction14(int signum, \ 454 const netbsd32_sigactionp_t nsa, \ 455 netbsd32_sigactionp_t osa); } 456292 STD { int netbsd32___sigpending14(netbsd32_sigsetp_t set); } 457293 STD { int netbsd32___sigprocmask14(int how, \ 458 const netbsd32_sigsetp_t set, \ 459 netbsd32_sigsetp_t oset); } 460294 STD { int netbsd32___sigsuspend14(const netbsd32_sigsetp_t set); } 461295 COMPAT_16 { int netbsd32___sigreturn14(netbsd32_sigcontextp_t sigcntxp); } 462296 STD { int netbsd32___getcwd(netbsd32_charp bufp, netbsd32_size_t length); } 463297 STD { int netbsd32_fchroot(int fd); } 464298 COMPAT_30 { int netbsd32_fhopen(const netbsd32_fhandlep_t fhp, \ 465 int flags); } 466299 COMPAT_30 { int netbsd32_fhstat(const netbsd32_fhandlep_t fhp, \ 467 netbsd32_stat13p_t sb); } 468300 COMPAT_20 { int netbsd32_fhstatfs(netbsd32_fhandlep_t fhp, \ 469 netbsd32_statp_t buf); } 470#if defined(SYSVSEM) || !defined(_KERNEL) 471301 STD { int netbsd32___semctl14(int semid, int semnum, int cmd, \ 472 ... netbsd32_semunp_t arg); } 473#else 474301 EXCL __semctl14 475#endif 476#if defined(SYSVMSG) || !defined(_KERNEL) 477302 STD { int netbsd32___msgctl13(int msqid, int cmd, \ 478 netbsd32_msqid_dsp_t buf); } 479#else 480302 EXCL __msgctl13 481#endif 482#if defined(SYSVSHM) || !defined(_KERNEL) 483303 STD { int netbsd32___shmctl13(int shmid, int cmd, \ 484 netbsd32_shmid_dsp_t buf); } 485#else 486303 EXCL __shmctl13 487#endif 488304 STD { int netbsd32_lchflags(const netbsd32_charp path, netbsd32_u_long flags); } 489305 NOARGS MPSAFE { int sys_issetugid(void); } 490306 STD { int netbsd32_utrace(const netbsd32_charp label, netbsd32_voidp addr, \ 491 netbsd32_size_t len); } 492307 STD { int netbsd32_getcontext(netbsd32_ucontextp ucp); } 493308 STD { int netbsd32_setcontext(netbsd32_ucontextp ucp, \ 494 uint32_t flags, netbsd32_lwpidp new_lwp); } 495309 STD { int netbsd32__lwp_create(const netbsd32_ucontextp ucp, \ 496 netbsd32_u_long flags, netbsd32_lwpidp new_lwp); } 497310 NOARGS { int sys__lwp_exit(void); } 498311 NOARGS MPSAFE { lwpid_t sys__lwp_self(void); } 499312 STD MPSAFE { int netbsd32__lwp_wait(lwpid_t wait_for, \ 500 netbsd32_lwpidp departed); } 501313 STD MPSAFE { int netbsd32__lwp_suspend(lwpid_t target); } 502314 STD MPSAFE { int netbsd32__lwp_continue(lwpid_t target); } 503315 STD MPSAFE { int netbsd32__lwp_wakeup(lwpid_t target); } 504316 NOARGS MPSAFE { void *sys__lwp_getprivate(void); } 505317 STD MPSAFE { void netbsd32__lwp_setprivate(netbsd32_voidp ptr); } 506318 STD { int netbsd32__lwp_kill(lwpid_t target, int signo); } 507319 STD MPSAFE { int netbsd32__lwp_detach(lwpid_t target); } 508320 STD MPSAFE { int netbsd32__lwp_park(const netbsd32_timespecp_t ts, \ 509 lwpid_t unpark, const netbsd32_voidp hint, \ 510 const netbsd32_voidp unparkhint); } 511321 STD MPSAFE { int netbsd32__lwp_unpark(lwpid_t target, const netbsd32_voidp hint); } 512322 STD MPSAFE { netbsd32_size_t netbsd32__lwp_unpark_all(const netbsd32_lwpidp targets, \ 513 netbsd32_size_t ntargets, const netbsd32_voidp hint); } 514323 STD { int netbsd32__lwp_setname(lwpid_t target, \ 515 const netbsd32_charp name); } 516324 STD { int netbsd32__lwp_getname(lwpid_t target, \ 517 netbsd32_charp name, netbsd32_size_t len); } 518325 STD { int netbsd32__lwp_ctl(int features, \ 519 netbsd32_pointer_t address); } 520326 UNIMPL 521327 UNIMPL 522328 UNIMPL 523329 UNIMPL 524330 OBSOL netbsd32_sa_register 525331 OBSOL netbsd32_sa_stacks 526332 OBSOL sys_sa_enable 527333 OBSOL netbsd32_sa_setconcurrency 528334 OBSOL sys_sa_yield 529335 OBSOL netbsd32_sa_preempt 530336 OBSOL sys_sa_unblockyield 531337 UNIMPL 532338 UNIMPL 533339 UNIMPL 534340 STD { int netbsd32___sigaction_sigtramp(int signum, \ 535 const netbsd32_sigactionp_t nsa, \ 536 netbsd32_sigactionp_t osa, \ 537 netbsd32_voidp tramp, int vers); } 538341 UNIMPL 539342 UNIMPL 540343 STD { int netbsd32_rasctl(netbsd32_caddr_t addr, netbsd32_size_t len, \ 541 int op); } 542344 NOARGS { int sys_kqueue(void); } 543345 STD { int netbsd32_kevent(int fd, \ 544 netbsd32_keventp_t changelist, netbsd32_size_t nchanges, \ 545 netbsd32_keventp_t eventlist, netbsd32_size_t nevents, \ 546 netbsd32_timespecp_t timeout); } 547346 UNIMPL 548347 UNIMPL 549348 UNIMPL 550349 UNIMPL 551350 NOARGS MPSAFE { int sys_sched_yield(void); } 552351 UNIMPL 553352 UNIMPL 554353 UNIMPL 555354 STD { int netbsd32_fsync_range(int fd, int flags, off_t start, \ 556 off_t length); } 557355 STD { int netbsd32_uuidgen(netbsd32_uuidp_t store, int count); } 558356 STD { int netbsd32_getvfsstat(netbsd32_statvfsp_t buf, \ 559 netbsd32_size_t bufsize, int flags); } 560357 STD { int netbsd32_statvfs1(const netbsd32_charp path, \ 561 netbsd32_statvfsp_t buf, int flags); } 562358 STD { int netbsd32_fstatvfs1(int fd, netbsd32_statvfsp_t buf, \ 563 int flags); } 564359 COMPAT_30 { int netbsd32_fhstatvfs1(const netbsd32_fhandlep_t fhp, \ 565 netbsd32_statvfsp_t buf, int flags); } 566360 STD { int netbsd32_extattrctl(const netbsd32_charp path, \ 567 int cmd, const netbsd32_charp filename, int attrnamespace, \ 568 const netbsd32_charp attrname); } 569361 STD { int netbsd32_extattr_set_file(const netbsd32_charp path, \ 570 int attrnamespace, const netbsd32_charp attrname, \ 571 const netbsd32_voidp data, netbsd32_size_t nbytes); } 572362 STD { int netbsd32_extattr_get_file(const netbsd32_charp path, \ 573 int attrnamespace, const netbsd32_charp attrname, \ 574 netbsd32_voidp data, netbsd32_size_t nbytes); } 575363 STD { int netbsd32_extattr_delete_file(const netbsd32_charp path, \ 576 int attrnamespace, const netbsd32_charp attrname); } 577364 STD { int netbsd32_extattr_set_fd(int fd, \ 578 int attrnamespace, const netbsd32_charp attrname, \ 579 const netbsd32_voidp data, netbsd32_size_t nbytes); } 580365 STD { int netbsd32_extattr_get_fd(int fd, \ 581 int attrnamespace, const netbsd32_charp attrname, \ 582 netbsd32_voidp data, netbsd32_size_t nbytes); } 583366 STD { int netbsd32_extattr_delete_fd(int fd, \ 584 int attrnamespace, const netbsd32_charp attrname); } 585367 STD { int netbsd32_extattr_set_link(const netbsd32_charp path, \ 586 int attrnamespace, const netbsd32_charp attrname, \ 587 const netbsd32_voidp data, netbsd32_size_t nbytes); } 588368 STD { int netbsd32_extattr_get_link(const netbsd32_charp path, \ 589 int attrnamespace, const netbsd32_charp attrname, \ 590 netbsd32_voidp data, netbsd32_size_t nbytes); } 591369 STD { int netbsd32_extattr_delete_link(const netbsd32_charp path, \ 592 int attrnamespace, const netbsd32_charp attrname); } 593370 STD { int netbsd32_extattr_list_fd(int fd, \ 594 int attrnamespace, netbsd32_voidp data, \ 595 netbsd32_size_t nbytes); } 596371 STD { int netbsd32_extattr_list_file(const netbsd32_charp path, \ 597 int attrnamespace, netbsd32_voidp data, \ 598 netbsd32_size_t nbytes); } 599372 STD { int netbsd32_extattr_list_link(const netbsd32_charp path, \ 600 int attrnamespace, netbsd32_voidp data, \ 601 netbsd32_size_t nbytes); } 602373 STD { int netbsd32_pselect(int nd, netbsd32_fd_setp_t in, \ 603 netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \ 604 const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); } 605374 STD { int netbsd32_pollts(netbsd32_pollfdp_t fds, u_int nfds, \ 606 const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); } 607375 STD { int netbsd32_setxattr(const netbsd32_charp path, \ 608 const netbsd32_charp name, netbsd32_voidp value, \ 609 netbsd32_size_t size, int flags); } 610376 STD { int netbsd32_lsetxattr(const netbsd32_charp path, \ 611 const netbsd32_charp name, netbsd32_voidp value, \ 612 netbsd32_size_t size, int flags); } 613377 STD { int netbsd32_fsetxattr(int fd, \ 614 const netbsd32_charp name, netbsd32_voidp value, \ 615 netbsd32_size_t size, int flags); } 616378 STD { int netbsd32_getxattr(const netbsd32_charp path, \ 617 const netbsd32_charp name, netbsd32_voidp value, \ 618 netbsd32_size_t size); } 619379 STD { int netbsd32_lgetxattr(const netbsd32_charp path, \ 620 const netbsd32_charp name, netbsd32_voidp value, \ 621 netbsd32_size_t size); } 622380 STD { int netbsd32_fgetxattr(int fd, \ 623 const netbsd32_charp name, netbsd32_voidp value, \ 624 netbsd32_size_t size); } 625381 STD { int netbsd32_listxattr(const netbsd32_charp path, \ 626 netbsd32_charp list, netbsd32_size_t size); } 627382 STD { int netbsd32_llistxattr(const netbsd32_charp path, \ 628 netbsd32_charp list, netbsd32_size_t size); } 629383 STD { int netbsd32_flistxattr(int fd, \ 630 netbsd32_charp list, netbsd32_size_t size); } 631384 STD { int netbsd32_removexattr(const netbsd32_charp path, \ 632 const netbsd32_charp name); } 633385 STD { int netbsd32_lremovexattr(const netbsd32_charp path, \ 634 const netbsd32_charp name); } 635386 STD { int netbsd32_fremovexattr(int fd, \ 636 const netbsd32_charp name); } 637387 STD { int netbsd32_sys___stat30(const netbsd32_charp path, \ 638 netbsd32_statp_t ub); } 639388 STD { int netbsd32_sys___fstat30(int fd, \ 640 netbsd32_statp_t sb); } 641389 STD { int netbsd32_sys___lstat30( \ 642 const netbsd32_charp path, netbsd32_statp_t ub); } 643390 STD { int netbsd32_sys___getdents30(int fd, \ 644 netbsd32_charp buf, netbsd32_size_t count); } 645391 NOARGS { int sys_posix_fadvise(int fd, off_t offset, \ 646 off_t len, int advice); } 647392 COMPAT_30 { int netbsd32_sys___fhstat30( \ 648 const netbsd32_fhandlep_t fhp, \ 649 netbsd32_statp_t sb); } 650393 STD { int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); } 651394 STD { int netbsd32_sys___socket30(int domain, int type, int protocol); } 652395 STD { int netbsd32___getfh30(const netbsd32_charp fname, netbsd32_pointer_t fhp, netbsd32_size_tp fh_size); } 653396 STD { int netbsd32___fhopen40(const netbsd32_pointer_t fhp, \ 654 netbsd32_size_t fh_size, int flags); } 655397 STD { int netbsd32___fhstatvfs140( \ 656 netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\ 657 netbsd32_statvfsp_t buf, int flags); } 658398 STD { int netbsd32___fhstat40( \ 659 netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\ 660 netbsd32_statp_t sb); } 661