syscalls.master revision 1.54
1 $NetBSD: syscalls.master,v 1.54 2006/11/09 14:09:37 cube 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#include "opt_posix.h" 46 47#include "fs_lfs.h" 48#include "fs_nfs.h" 49#endif 50 51#include <sys/param.h> 52#include <sys/systm.h> 53#include <sys/signal.h> 54#include <sys/mount.h> 55#include <sys/sa.h> 56#include <sys/syscallargs.h> 57 58#include <compat/netbsd32/netbsd32.h> 59#include <compat/netbsd32/netbsd32_syscallargs.h> 60 61%% 62 63; Reserved/unimplemented system calls in the range 0-150 inclusive 64; are reserved for use in future Berkeley releases. 65; Additional system calls implemented in vendor and other 66; redistributions should be placed in the reserved range at the end 67; of the current calls. 68 690 INDIR { int sys_syscall(int number, ...); } 701 STD { void netbsd32_exit(int rval); } 712 NOARGS { int sys_fork(void); } 723 STD { netbsd32_ssize_t netbsd32_read(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte); } 734 STD { netbsd32_ssize_t netbsd32_write(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte); } 745 STD { int netbsd32_open(const netbsd32_charp path, int flags, ... mode_t mode); } 756 STD { int netbsd32_close(int fd); } 767 STD { int netbsd32_wait4(int pid, netbsd32_intp status, int options, netbsd32_rusagep_t rusage); } 778 COMPAT_43 { int netbsd32_ocreat(const netbsd32_charp path, mode_t mode); } 789 STD { int netbsd32_link(const netbsd32_charp path, const netbsd32_charp link); } 7910 STD { int netbsd32_unlink(const netbsd32_charp path); } 8011 OBSOL execv 8112 STD { int netbsd32_chdir(const netbsd32_charp path); } 8213 STD { int netbsd32_fchdir(int fd); } 8314 STD { int netbsd32_mknod(const netbsd32_charp path, mode_t mode, dev_t dev); } 8415 STD { int netbsd32_chmod(const netbsd32_charp path, mode_t mode); } 8516 STD { int netbsd32_chown(const netbsd32_charp path, uid_t uid, gid_t gid); } 8617 STD { int netbsd32_break(netbsd32_charp nsize); } 8718 COMPAT_20 { int netbsd32_getfsstat(netbsd32_statfsp_t buf, netbsd32_long bufsize, int flags); } 8819 COMPAT_43 { netbsd32_long netbsd32_olseek(int fd, netbsd32_long offset, int whence); } 8920 NOARGS MPSAFE { pid_t sys_getpid(void); } 9021 STD { int netbsd32_mount(const netbsd32_charp type, const netbsd32_charp path, int flags, netbsd32_voidp data); } 9122 STD { int netbsd32_unmount(const netbsd32_charp path, int flags); } 9223 STD { int netbsd32_setuid(uid_t uid); } 9324 NOARGS { uid_t sys_getuid(void); } 9425 NOARGS { uid_t sys_geteuid(void); } 9526 STD { int netbsd32_ptrace(int req, pid_t pid, netbsd32_caddr_t addr, int data); } 9627 STD { netbsd32_ssize_t netbsd32_recvmsg(int s, netbsd32_msghdrp_t msg, int flags); } 9728 STD { netbsd32_ssize_t netbsd32_sendmsg(int s, const netbsd32_msghdrp_t msg, int flags); } 9829 STD { netbsd32_ssize_t netbsd32_recvfrom(int s, netbsd32_voidp buf, netbsd32_size_t len, int flags, netbsd32_sockaddrp_t from, netbsd32_intp fromlenaddr); } 9930 STD { int netbsd32_accept(int s, netbsd32_sockaddrp_t name, netbsd32_intp anamelen); } 10031 STD { int netbsd32_getpeername(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); } 10132 STD { int netbsd32_getsockname(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); } 10233 STD { int netbsd32_access(const netbsd32_charp path, int flags); } 10334 STD { int netbsd32_chflags(const netbsd32_charp path, netbsd32_u_long flags); } 10435 STD { int netbsd32_fchflags(int fd, netbsd32_u_long flags); } 10536 NOARGS { void sys_sync(void); } 10637 STD { int netbsd32_kill(int pid, int signum); } 10738 COMPAT_43 { int netbsd32_stat43(const netbsd32_charp path, netbsd32_stat43p_t ub); } 10839 NOARGS { pid_t sys_getppid(void); } 10940 COMPAT_43 { int netbsd32_lstat43(const netbsd32_charp path, netbsd32_stat43p_t ub); } 11041 STD { int netbsd32_dup(int fd); } 11142 NOARGS { int sys_pipe(void); } 11243 NOARGS { gid_t sys_getegid(void); } 11344 STD { int netbsd32_profil(netbsd32_caddr_t samples, netbsd32_size_t size, netbsd32_u_long offset, u_int scale); } 114#if defined(KTRACE) || !defined(_KERNEL) 11545 STD { int netbsd32_ktrace(const netbsd32_charp fname, int ops, int facs, int pid); } 116#else 11745 EXCL netbsd32_ktrace 118#endif 11946 STD { int netbsd32_sigaction(int signum, const netbsd32_sigactionp_t nsa, netbsd32_sigactionp_t osa); } 12047 NOARGS { gid_t sys_getgid(void); } 12148 COMPAT_13 { int netbsd32_sigprocmask(int how, \ 122 int mask); } sigprocmask13 12349 STD { int netbsd32___getlogin(netbsd32_charp namebuf, u_int namelen); } 12450 STD { int netbsd32_setlogin(const netbsd32_charp namebuf); } 12551 STD { int netbsd32_acct(const netbsd32_charp path); } 12652 COMPAT_13 { int sys_sigpending(void); } sigpending13 12753 COMPAT_13 { int netbsd32_sigaltstack13(const netbsd32_sigaltstack13p_t nss, netbsd32_sigaltstack13p_t oss); } 12854 STD { int netbsd32_ioctl(int fd, netbsd32_u_long com, ... netbsd32_voidp data); } 12955 COMPAT_12 { int netbsd32_reboot(int opt); } 13056 STD { int netbsd32_revoke(const netbsd32_charp path); } 13157 STD { int netbsd32_symlink(const netbsd32_charp path, const netbsd32_charp link); } 13258 STD { int netbsd32_readlink(const netbsd32_charp path, netbsd32_charp buf, netbsd32_size_t count); } 13359 STD { int netbsd32_execve(const netbsd32_charp path, netbsd32_charpp argp, netbsd32_charpp envp); } 13460 STD { mode_t netbsd32_umask(mode_t newmask); } 13561 STD { int netbsd32_chroot(const netbsd32_charp path); } 13662 COMPAT_43 { int netbsd32_fstat43(int fd, netbsd32_stat43p_t sb); } 13763 COMPAT_43 { int netbsd32_ogetkerninfo(int op, netbsd32_charp where, netbsd32_intp size, int arg); } 13864 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 13965 COMPAT_12 { int netbsd32_msync(netbsd32_caddr_t addr, netbsd32_size_t len); } 140; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 14166 NOARGS { int sys_vfork(void); } 14267 OBSOL vread 14368 OBSOL vwrite 14469 STD { int netbsd32_sbrk(netbsd32_intptr_t incr); } 14570 STD { int netbsd32_sstk(int incr); } 14671 COMPAT_43 { int netbsd32_ommap(netbsd32_caddr_t addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pos); } 14772 STD { int netbsd32_ovadvise(int anom); } vadvise 14873 STD { int netbsd32_munmap(netbsd32_voidp addr, netbsd32_size_t len); } 14974 STD { int netbsd32_mprotect(netbsd32_voidp addr, netbsd32_size_t len, int prot); } 15075 STD { int netbsd32_madvise(netbsd32_voidp addr, netbsd32_size_t len, int behav); } 15176 OBSOL vhangup 15277 OBSOL vlimit 15378 STD { int netbsd32_mincore(netbsd32_caddr_t addr, netbsd32_size_t len, netbsd32_charp vec); } 15479 STD { int netbsd32_getgroups(int gidsetsize, netbsd32_gid_tp gidset); } 15580 STD { int netbsd32_setgroups(int gidsetsize, const netbsd32_gid_tp gidset); } 15681 NOARGS { int sys_getpgrp(void); } 15782 STD { int netbsd32_setpgid(int pid, int pgid); } 15883 STD { int netbsd32_setitimer(int which, const netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); } 15984 COMPAT_43 { int sys_wait(void); } owait 16085 COMPAT_12 { int netbsd32_oswapon(const netbsd32_charp name); } 16186 STD { int netbsd32_getitimer(int which, netbsd32_itimervalp_t itv); } 16287 COMPAT_43 { int netbsd32_ogethostname(netbsd32_charp hostname, u_int len); } 16388 COMPAT_43 { int netbsd32_osethostname(netbsd32_charp hostname, u_int len); } 16489 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 16590 STD { int netbsd32_dup2(int from, int to); } 16691 UNIMPL getdopt 16792 STD { int netbsd32_fcntl(int fd, int cmd, ... netbsd32_voidp arg); } 16893 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); } 16994 UNIMPL setdopt 17095 STD { int netbsd32_fsync(int fd); } 17196 STD { int netbsd32_setpriority(int which, int who, int prio); } 17297 COMPAT_30 { int netbsd32_socket(int domain, int type, int protocol); } 17398 STD { int netbsd32_connect(int s, const netbsd32_sockaddrp_t name, int namelen); } 17499 COMPAT_43 { int netbsd32_oaccept(int s, netbsd32_caddr_t name, netbsd32_intp anamelen); } 175100 STD { int netbsd32_getpriority(int which, int who); } 176101 COMPAT_43 { int netbsd32_osend(int s, netbsd32_caddr_t buf, int len, int flags); } 177102 COMPAT_43 { int netbsd32_orecv(int s, netbsd32_caddr_t buf, int len, int flags); } 178103 COMPAT_13 { int netbsd32_sigreturn(netbsd32_sigcontextp_t sigcntxp); } sigreturn13 179104 STD { int netbsd32_bind(int s, const netbsd32_sockaddrp_t name, int namelen); } 180105 STD { int netbsd32_setsockopt(int s, int level, int name, const netbsd32_voidp val, int valsize); } 181106 STD { int netbsd32_listen(int s, int backlog); } 182107 OBSOL vtimes 183108 COMPAT_43 { int netbsd32_osigvec(int signum, netbsd32_sigvecp_t nsv, netbsd32_sigvecp_t osv); } 184109 COMPAT_43 { int netbsd32_sigblock(int mask); } 185110 COMPAT_43 { int netbsd32_sigsetmask(int mask); } 186111 COMPAT_13 { int netbsd32_sigsuspend(int mask); } sigsuspend13 187112 COMPAT_43 { int netbsd32_osigstack(netbsd32_sigstackp_t nss, netbsd32_sigstackp_t oss); } 188113 COMPAT_43 { int netbsd32_orecvmsg(int s, netbsd32_omsghdrp_t msg, int flags); } 189114 COMPAT_43 { int netbsd32_osendmsg(int s, netbsd32_caddr_t msg, int flags); } 190115 OBSOL vtrace 191116 STD { int netbsd32_gettimeofday(netbsd32_timevalp_t tp, netbsd32_timezonep_t tzp); } 192117 STD { int netbsd32_getrusage(int who, netbsd32_rusagep_t rusage); } 193118 STD { int netbsd32_getsockopt(int s, int level, int name, netbsd32_voidp val, netbsd32_intp avalsize); } 194119 OBSOL resuba 195120 STD { netbsd32_ssize_t netbsd32_readv(int fd, const netbsd32_iovecp_t iovp, int iovcnt); } 196121 STD { netbsd32_ssize_t netbsd32_writev(int fd, const netbsd32_iovecp_t iovp, int iovcnt); } 197122 STD { int netbsd32_settimeofday(const netbsd32_timevalp_t tv, const netbsd32_timezonep_t tzp); } 198123 STD { int netbsd32_fchown(int fd, uid_t uid, gid_t gid); } 199124 STD { int netbsd32_fchmod(int fd, mode_t mode); } 200125 COMPAT_43 { int netbsd32_orecvfrom(int s, netbsd32_caddr_t buf, netbsd32_size_t len, int flags, netbsd32_caddr_t from, netbsd32_intp fromlenaddr); } 201126 STD { int netbsd32_setreuid(uid_t ruid, uid_t euid); } 202127 STD { int netbsd32_setregid(gid_t rgid, gid_t egid); } 203128 STD { int netbsd32_rename(const netbsd32_charp from, const netbsd32_charp to); } 204129 COMPAT_43 { int netbsd32_otruncate(const netbsd32_charp path, netbsd32_long length); } 205130 COMPAT_43 { int netbsd32_oftruncate(int fd, netbsd32_long length); } 206131 STD { int netbsd32_flock(int fd, int how); } 207132 STD { int netbsd32_mkfifo(const netbsd32_charp path, mode_t mode); } 208133 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); } 209134 STD { int netbsd32_shutdown(int s, int how); } 210135 STD { int netbsd32_socketpair(int domain, int type, int protocol, netbsd32_intp rsv); } 211136 STD { int netbsd32_mkdir(const netbsd32_charp path, mode_t mode); } 212137 STD { int netbsd32_rmdir(const netbsd32_charp path); } 213138 STD { int netbsd32_utimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); } 214139 OBSOL 4.2 sigreturn 215140 STD { int netbsd32_adjtime(const netbsd32_timevalp_t delta, netbsd32_timevalp_t olddelta); } 216141 COMPAT_43 { int netbsd32_ogetpeername(int fdes, netbsd32_caddr_t asa, netbsd32_intp alen); } 217142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 218143 COMPAT_43 { int netbsd32_sethostid(int32_t hostid); } 219144 COMPAT_43 { int netbsd32_ogetrlimit(int which, netbsd32_orlimitp_t rlp); } 220145 COMPAT_43 { int netbsd32_osetrlimit(int which, const netbsd32_orlimitp_t rlp); } 221146 COMPAT_43 { int netbsd32_killpg(int pgid, int signum); } 222147 NOARGS { int sys_setsid(void); } 223148 STD { int netbsd32_quotactl(const netbsd32_charp path, int cmd, int uid, netbsd32_caddr_t arg); } 224149 COMPAT_43 { int sys_quota(void); } oquota 225150 COMPAT_43 { int netbsd32_ogetsockname(int fdec, netbsd32_caddr_t asa, netbsd32_intp alen); } 226 227; Syscalls 151-180 inclusive are reserved for vendor-specific 228; system calls. (This includes various calls added for compatibity 229; with other Unix variants.) 230; Some of these calls are now supported by BSD... 231151 UNIMPL 232152 UNIMPL 233153 UNIMPL 234154 UNIMPL 235#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 236155 STD { int netbsd32_nfssvc(int flag, netbsd32_voidp argp); } 237#else 238155 EXCL netbsd32_nfssvc 239#endif 240156 COMPAT_43 { int netbsd32_ogetdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); } 241157 COMPAT_20 { int netbsd32_statfs(const netbsd32_charp path, netbsd32_statfsp_t buf); } 242158 COMPAT_20 { int netbsd32_fstatfs(int fd, netbsd32_statfsp_t buf); } 243159 UNIMPL 244160 UNIMPL 245161 COMPAT_30 { int netbsd32_getfh(const netbsd32_charp fname, netbsd32_compat_30_fhandlep_t fhp); } 246162 COMPAT_09 { int netbsd32_ogetdomainname(netbsd32_charp domainname, int len); } 247163 COMPAT_09 { int netbsd32_osetdomainname(netbsd32_charp domainname, int len); } 248164 COMPAT_09 { int netbsd32_uname(netbsd32_outsnamep_t name); } 249165 STD { int netbsd32_sysarch(int op, netbsd32_voidp parms); } 250166 UNIMPL 251167 UNIMPL 252168 UNIMPL 253#if defined(SYSVSEM) || !defined(_KERNEL) 254169 COMPAT_10 { int netbsd32_sys_semsys(int which, int a2, int a3, int a4, int a5); } osemsys 255#else 256169 EXCL netbsd32_sys_semsys 257#endif 258#if defined(SYSVMSG) || !defined(_KERNEL) 259170 COMPAT_10 { int netbsd32_sys_msgsys(int which, int a2, int a3, int a4, int a5, int a6); } omsgsys 260#else 261170 EXCL netbsd32_sys_msgsys 262#endif 263#if defined(SYSVSHM) || !defined(_KERNEL) 264171 COMPAT_10 { int netbsd32_sys_shmsys(int which, int a2, int a3, int a4); } oshmsys 265#else 266171 EXCL netbsd32_sys_shmsys 267#endif 268172 UNIMPL 269173 STD { netbsd32_ssize_t netbsd32_pread(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); } 270174 STD { netbsd32_ssize_t netbsd32_pwrite(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); } 271175 COMPAT_30 { int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); } 272176 STD { int netbsd32_ntp_adjtime(netbsd32_timexp_t tp); } 273177 UNIMPL 274178 UNIMPL 275179 UNIMPL 276180 UNIMPL 277 278; Syscalls 180-199 are used by/reserved for BSD 279181 STD { int netbsd32_setgid(gid_t gid); } 280182 STD { int netbsd32_setegid(gid_t egid); } 281183 STD { int netbsd32_seteuid(uid_t euid); } 282#if defined(LFS) || !defined(_KERNEL) 283184 STD { int netbsd32_sys_lfs_bmapv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); } 284185 STD { int netbsd32_sys_lfs_markv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); } 285186 STD { int netbsd32_sys_lfs_segclean(netbsd32_fsid_tp_t fsidp, netbsd32_u_long segment); } 286187 STD { int netbsd32_sys_lfs_segwait(netbsd32_fsid_tp_t fsidp, netbsd32_timevalp_t tv); } 287#else 288184 EXCL netbsd32_sys_lfs_bmapv 289185 EXCL netbsd32_sys_lfs_markv 290186 EXCL netbsd32_sys_lfs_segclean 291187 EXCL netbsd32_sys_lfs_segwait 292#endif 293188 COMPAT_12 { int netbsd32_stat12(const netbsd32_charp path, netbsd32_stat12p_t ub); } 294189 COMPAT_12 { int netbsd32_fstat12(int fd, netbsd32_stat12p_t sb); } 295190 COMPAT_12 { int netbsd32_lstat12(const netbsd32_charp path, netbsd32_stat12p_t ub); } 296191 STD { netbsd32_long netbsd32_pathconf(const netbsd32_charp path, int name); } 297192 STD { netbsd32_long netbsd32_fpathconf(int fd, int name); } 298193 UNIMPL 299194 STD { int netbsd32_getrlimit(int which, netbsd32_rlimitp_t rlp); } 300195 STD { int netbsd32_setrlimit(int which, const netbsd32_rlimitp_t rlp); } 301196 COMPAT_12 { int netbsd32_getdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); } 302197 STD { netbsd32_voidp netbsd32_mmap(netbsd32_voidp addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pad, off_t pos); } 303198 INDIR { quad_t sys___syscall(quad_t num, ...); } 304199 STD { off_t netbsd32_lseek(int fd, int pad, off_t offset, int whence); } 305200 STD { int netbsd32_truncate(const netbsd32_charp path, int pad, off_t length); } 306201 STD { int netbsd32_ftruncate(int fd, int pad, off_t length); } 307202 STD { int netbsd32___sysctl(netbsd32_intp name, u_int namelen, netbsd32_voidp old, netbsd32_size_tp oldlenp, netbsd32_voidp new, netbsd32_size_t newlen); } 308203 STD { int netbsd32_mlock(const netbsd32_voidp addr, netbsd32_size_t len); } 309204 STD { int netbsd32_munlock(const netbsd32_voidp addr, netbsd32_size_t len); } 310205 STD { int netbsd32_undelete(const netbsd32_charp path); } 311206 STD { int netbsd32_futimes(int fd, const netbsd32_timevalp_t tptr); } 312207 STD { int netbsd32_getpgid(pid_t pid); } 313208 STD { int netbsd32_reboot(int opt, netbsd32_charp bootstr); } 314209 STD { int netbsd32_poll(netbsd32_pollfdp_t fds, u_int nfds, int timeout); } 315; 316; Syscalls 210-219 are reserved for dynamically loaded syscalls 317; 318#if defined(LKM) || !defined(_KERNEL) 319210 NODEF { int sys_lkmnosys(void); } 320211 NODEF { int sys_lkmnosys(void); } 321212 NODEF { int sys_lkmnosys(void); } 322213 NODEF { int sys_lkmnosys(void); } 323214 NODEF { int sys_lkmnosys(void); } 324215 NODEF { int sys_lkmnosys(void); } 325216 NODEF { int sys_lkmnosys(void); } 326217 NODEF { int sys_lkmnosys(void); } 327218 NODEF { int sys_lkmnosys(void); } 328219 NODEF { int sys_lkmnosys(void); } 329#else /* !LKM || !_KERNEL */ 330210 EXCL lkmnosys 331211 EXCL lkmnosys 332212 EXCL lkmnosys 333213 EXCL lkmnosys 334214 EXCL lkmnosys 335215 EXCL lkmnosys 336216 EXCL lkmnosys 337217 EXCL lkmnosys 338218 EXCL lkmnosys 339219 EXCL lkmnosys 340#endif /* !LKM || !_KERNEL */ 341; System calls 220-300 are reserved for use by NetBSD 342#if defined(SYSVSEM) || !defined(_KERNEL) 343220 COMPAT_14 { int netbsd32___semctl(int semid, int semnum, int cmd, netbsd32_semunu_t arg); } 344221 STD { int netbsd32_semget(netbsd32_key_t key, int nsems, int semflg); } 345222 STD { int netbsd32_semop(int semid, netbsd32_sembufp_t sops, netbsd32_size_t nsops); } 346223 STD { int netbsd32_semconfig(int flag); } 347#else 348220 EXCL compat_14_netbsd32_semctl 349221 EXCL netbsd32_semget 350222 EXCL netbsd32_semop 351223 EXCL netbsd32_semconfig 352#endif 353#if defined(SYSVMSG) || !defined(_KERNEL) 354224 COMPAT_14 { int netbsd32_msgctl(int msqid, int cmd, netbsd32_msqid_dsp_t buf); } 355225 STD { int netbsd32_msgget(netbsd32_key_t key, int msgflg); } 356226 STD { int netbsd32_msgsnd(int msqid, const netbsd32_voidp msgp, netbsd32_size_t msgsz, int msgflg); } 357227 STD { netbsd32_ssize_t netbsd32_msgrcv(int msqid, netbsd32_voidp msgp, netbsd32_size_t msgsz, netbsd32_long msgtyp, int msgflg); } 358#else 359224 EXCL compat_14_netbsd32_msgctl 360225 EXCL netbsd32_msgget 361226 EXCL netbsd32_msgsnd 362227 EXCL netbsd32_msgrcv 363#endif 364#if defined(SYSVSHM) || !defined(_KERNEL) 365228 STD { netbsd32_voidp netbsd32_shmat(int shmid, const netbsd32_voidp shmaddr, int shmflg); } 366229 COMPAT_14 { int netbsd32_shmctl(int shmid, int cmd, netbsd32_shmid_dsp_t buf); } 367230 STD { int netbsd32_shmdt(const netbsd32_voidp shmaddr); } 368231 STD { int netbsd32_shmget(netbsd32_key_t key, netbsd32_size_t size, int shmflg); } 369#else 370228 EXCL netbsd32_shmat 371229 EXCL compat_14_netbsd32_shmctl 372230 EXCL netbsd32_shmdt 373231 EXCL netbsd32_shmget 374#endif 375232 STD { int netbsd32_clock_gettime(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); } 376233 STD { int netbsd32_clock_settime(netbsd32_clockid_t clock_id, const netbsd32_timespecp_t tp); } 377234 STD { int netbsd32_clock_getres(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); } 378235 STD { int netbsd32_timer_create(netbsd32_clockid_t clock_id, netbsd32_sigeventp_t evp, \ 379 netbsd32_timerp_t timerid); } 380236 STD { int netbsd32_timer_delete(netbsd32_timer_t timerid); } 381237 STD { int netbsd32_timer_settime(netbsd32_timer_t timerid, int flags, \ 382 const netbsd32_itimerspecp_t value, \ 383 netbsd32_itimerspecp_t ovalue); } 384238 STD { int netbsd32_timer_gettime(netbsd32_timer_t timerid, netbsd32_itimerspecp_t value); } 385239 STD { int netbsd32_timer_getoverrun(netbsd32_timer_t timerid); } 386; 387; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 388; 389240 STD { int netbsd32_nanosleep(const netbsd32_timespecp_t rqtp, netbsd32_timespecp_t rmtp); } 390241 STD { int netbsd32_fdatasync(int fd); } 391242 STD { int netbsd32_mlockall(int flags); } 392243 NOARGS { int sys_munlockall(void); } 393244 STD { int netbsd32___sigtimedwait(const netbsd32_sigsetp_t set, \ 394 netbsd32_siginfop_t info, \ 395 netbsd32_timespecp_t timeout); } 396245 UNIMPL 397246 UNIMPL 398#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC)) 399247 STD { int netbsd32__ksem_init(unsigned int value, netbsd32_semidp_t idp); } 400248 STD { int netbsd32__ksem_open(const netbsd32_charp name, int oflag, \ 401 mode_t mode, unsigned int value, netbsd32_semidp_t idp); } 402249 STD { int netbsd32__ksem_unlink(const netbsd32_charp name); } 403250 STD { int netbsd32__ksem_close(netbsd32_semid_t id); } 404251 STD { int netbsd32__ksem_post(netbsd32_semid_t id); } 405252 STD { int netbsd32__ksem_wait(netbsd32_semid_t id); } 406253 STD { int netbsd32__ksem_trywait(netbsd32_semid_t id); } 407254 STD { int netbsd32__ksem_getvalue(netbsd32_semid_t id, \ 408 netbsd32_intp value); } 409255 STD { int netbsd32__ksem_destroy(netbsd32_semid_t id); } 410256 UNIMPL sys__ksem_timedwait 411#else 412247 EXCL sys__ksem_init 413248 EXCL sys__ksem_open 414249 EXCL sys__ksem_unlink 415250 EXCL sys__ksem_close 416251 EXCL sys__ksem_post 417252 EXCL sys__ksem_wait 418253 EXCL sys__ksem_trywait 419254 EXCL sys__ksem_getvalue 420255 EXCL sys__ksem_destroy 421256 UNIMPL sys__ksem_timedwait 422#endif 423257 UNIMPL 424258 UNIMPL 425259 UNIMPL 426260 UNIMPL 427261 UNIMPL 428262 UNIMPL 429263 UNIMPL 430264 UNIMPL 431265 UNIMPL 432266 UNIMPL 433267 UNIMPL 434268 UNIMPL 435269 UNIMPL 436270 STD { int netbsd32___posix_rename(const netbsd32_charp from, const netbsd32_charp to); } 437271 STD { int netbsd32_swapctl(int cmd, netbsd32_voidp arg, int misc); } 438272 COMPAT_30 { int netbsd32_getdents(int fd, netbsd32_charp buf, netbsd32_size_t count); } 439273 STD { int netbsd32_minherit(netbsd32_voidp addr, netbsd32_size_t len, int inherit); } 440274 STD { int netbsd32_lchmod(const netbsd32_charp path, mode_t mode); } 441275 STD { int netbsd32_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); } 442276 STD { int netbsd32_lutimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); } 443277 STD { int netbsd32___msync13(netbsd32_voidp addr, netbsd32_size_t len, int flags); } 444278 COMPAT_30 { int netbsd32___stat13(const netbsd32_charp path, netbsd32_stat13p_t ub); } 445279 COMPAT_30 { int netbsd32___fstat13(int fd, netbsd32_stat13p_t sb); } 446280 COMPAT_30 { int netbsd32___lstat13(const netbsd32_charp path, netbsd32_stat13p_t ub); } 447281 STD { int netbsd32___sigaltstack14(const netbsd32_sigaltstackp_t nss, netbsd32_sigaltstackp_t oss); } 448282 NOARGS { int sys___vfork14(void); } 449283 STD { int netbsd32___posix_chown(const netbsd32_charp path, uid_t uid, gid_t gid); } 450284 STD { int netbsd32___posix_fchown(int fd, uid_t uid, gid_t gid); } 451285 STD { int netbsd32___posix_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); } 452286 STD { pid_t netbsd32_getsid(pid_t pid); } 453287 STD { int netbsd32___clone(int flags, netbsd32_voidp stack); } 454#if defined(KTRACE) || !defined(_KERNEL) 455288 STD { int netbsd32_fktrace(const int fd, int ops, int facs, int pid); } 456#else 457288 EXCL netbsd32_fktrace 458#endif 459289 STD { netbsd32_ssize_t netbsd32_preadv(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); } 460290 STD { netbsd32_ssize_t netbsd32_pwritev(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); } 461291 STD { int netbsd32___sigaction14(int signum, \ 462 const netbsd32_sigactionp_t nsa, \ 463 netbsd32_sigactionp_t osa); } 464292 STD { int netbsd32___sigpending14(netbsd32_sigsetp_t set); } 465293 STD { int netbsd32___sigprocmask14(int how, \ 466 const netbsd32_sigsetp_t set, \ 467 netbsd32_sigsetp_t oset); } 468294 STD { int netbsd32___sigsuspend14(const netbsd32_sigsetp_t set); } 469295 COMPAT_16 { int netbsd32___sigreturn14(netbsd32_sigcontextp_t sigcntxp); } 470296 STD { int netbsd32___getcwd(netbsd32_charp bufp, netbsd32_size_t length); } 471297 STD { int netbsd32_fchroot(int fd); } 472298 COMPAT_30 { int netbsd32_fhopen(const netbsd32_fhandlep_t fhp, \ 473 int flags); } 474299 COMPAT_30 { int netbsd32_fhstat(const netbsd32_fhandlep_t fhp, \ 475 netbsd32_stat13p_t sb); } 476300 COMPAT_20 { int netbsd32_fhstatfs(netbsd32_fhandlep_t fhp, \ 477 netbsd32_statp_t buf); } 478#if defined(SYSVSEM) || !defined(_KERNEL) 479301 STD { int netbsd32___semctl14(int semid, int semnum, int cmd, \ 480 ... netbsd32_semunp_t arg); } 481#else 482301 EXCL __semctl14 483#endif 484#if defined(SYSVMSG) || !defined(_KERNEL) 485302 STD { int netbsd32___msgctl13(int msqid, int cmd, \ 486 netbsd32_msqid_dsp_t buf); } 487#else 488302 EXCL __msgctl13 489#endif 490#if defined(SYSVSHM) || !defined(_KERNEL) 491303 STD { int netbsd32___shmctl13(int shmid, int cmd, \ 492 netbsd32_shmid_dsp_t buf); } 493#else 494303 EXCL __shmctl13 495#endif 496304 STD { int netbsd32_lchflags(const netbsd32_charp path, netbsd32_u_long flags); } 497305 STD { int sys_issetugid(void); } 498306 STD { int netbsd32_utrace(const netbsd32_charp label, netbsd32_voidp addr, \ 499 netbsd32_size_t len); } 500; 501; Syscalls 307 and 308 are reserved for getcontext and setcontext 502; 503307 STD { int netbsd32_getcontext(netbsd32_ucontextp ucp); } 504308 STD { int netbsd32_setcontext(netbsd32_ucontextp ucp, \ 505 uint32_t flags, netbsd32_lwpidp new_lwp); } 506; 507; Syscalls 309-339 are reserved for LWP and scheduler activation syscalls. 508; 509309 STD { int netbsd32__lwp_create(const netbsd32_ucontextp ucp, \ 510 netbsd32_u_long flags, netbsd32_lwpidp new_lwp); } 511310 NOARGS { int sys__lwp_exit(void); } 512311 NOARGS { lwpid_t sys__lwp_self(void); } 513312 STD { int netbsd32__lwp_wait(lwpid_t wait_for, \ 514 netbsd32_lwpidp departed); } 515313 STD { int netbsd32__lwp_suspend(lwpid_t target); } 516314 STD { int netbsd32__lwp_continue(lwpid_t target); } 517315 STD { int netbsd32__lwp_wakeup(lwpid_t target); } 518316 NOARGS { void *sys__lwp_getprivate(void); } 519317 STD { void netbsd32__lwp_setprivate(netbsd32_voidp ptr); } 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 STD { int netbsd32_sa_register(netbsd32_sa_upcall_t new, \ 533 netbsd32_sa_upcallp_t old, int flags, \ 534 netbsd32_ssize_t stackinfo_offset); } 535331 STD { int netbsd32_sa_stacks(int num, netbsd32_stackp_t stacks); } 536332 NOARGS { int sys_sa_enable(void); } 537333 STD { int netbsd32_sa_setconcurrency(int concurrency); } 538334 NOARGS { int sys_sa_yield(void); } 539335 STD { int netbsd32_sa_preempt(int sa_id); } 540336 OBSOL sys_sa_unblockyield 541337 UNIMPL 542338 UNIMPL 543339 UNIMPL 544340 STD { int netbsd32___sigaction_sigtramp(int signum, \ 545 const netbsd32_sigactionp_t nsa, \ 546 netbsd32_sigactionp_t osa, \ 547 netbsd32_voidp tramp, int vers); } 548341 UNIMPL 549342 UNIMPL 550343 STD { int netbsd32_rasctl(netbsd32_caddr_t addr, netbsd32_size_t len, \ 551 int op); } 552344 NOARGS { int sys_kqueue(void); } 553345 STD { int netbsd32_kevent(int fd, \ 554 netbsd32_keventp_t changelist, netbsd32_size_t nchanges, \ 555 netbsd32_keventp_t eventlist, netbsd32_size_t nevents, \ 556 netbsd32_timespecp_t timeout); } 557346 UNIMPL 558347 UNIMPL 559348 UNIMPL 560349 UNIMPL 561350 UNIMPL 562351 UNIMPL 563352 UNIMPL 564353 UNIMPL 565354 STD { int netbsd32_fsync_range(int fd, int flags, off_t start, \ 566 off_t length); } 567355 STD { int netbsd32_uuidgen(netbsd32_uuidp_t store, int count); } 568356 STD { int netbsd32_getvfsstat(netbsd32_statvfsp_t buf, \ 569 netbsd32_size_t bufsize, int flags); } 570357 STD { int netbsd32_statvfs1(const netbsd32_charp path, \ 571 netbsd32_statvfsp_t buf, int flags); } 572358 STD { int netbsd32_fstatvfs1(int fd, netbsd32_statvfsp_t buf, \ 573 int flags); } 574359 COMPAT_30 { int netbsd32_fhstatvfs1(const netbsd32_fhandlep_t fhp, \ 575 netbsd32_statvfsp_t buf, int flags); } 576360 STD { int netbsd32_extattrctl(const netbsd32_charp path, \ 577 int cmd, const netbsd32_charp filename, int attrnamespace, \ 578 const netbsd32_charp attrname); } 579361 STD { int netbsd32_extattr_set_file(const netbsd32_charp path, \ 580 int attrnamespace, const netbsd32_charp attrname, \ 581 const netbsd32_voidp data, netbsd32_size_t nbytes); } 582362 STD { int netbsd32_extattr_get_file(const netbsd32_charp path, \ 583 int attrnamespace, const netbsd32_charp attrname, \ 584 netbsd32_voidp data, netbsd32_size_t nbytes); } 585363 STD { int netbsd32_extattr_delete_file(const netbsd32_charp path, \ 586 int attrnamespace, const netbsd32_charp attrname); } 587364 STD { int netbsd32_extattr_set_fd(int fd, \ 588 int attrnamespace, const netbsd32_charp attrname, \ 589 const netbsd32_voidp data, netbsd32_size_t nbytes); } 590365 STD { int netbsd32_extattr_get_fd(int fd, \ 591 int attrnamespace, const netbsd32_charp attrname, \ 592 netbsd32_voidp data, netbsd32_size_t nbytes); } 593366 STD { int netbsd32_extattr_delete_fd(int fd, \ 594 int attrnamespace, const netbsd32_charp attrname); } 595367 STD { int netbsd32_extattr_set_link(const netbsd32_charp path, \ 596 int attrnamespace, const netbsd32_charp attrname, \ 597 const netbsd32_voidp data, netbsd32_size_t nbytes); } 598368 STD { int netbsd32_extattr_get_link(const netbsd32_charp path, \ 599 int attrnamespace, const netbsd32_charp attrname, \ 600 netbsd32_voidp data, netbsd32_size_t nbytes); } 601369 STD { int netbsd32_extattr_delete_link(const netbsd32_charp path, \ 602 int attrnamespace, const netbsd32_charp attrname); } 603370 STD { int netbsd32_extattr_list_fd(int fd, \ 604 int attrnamespace, netbsd32_voidp data, \ 605 netbsd32_size_t nbytes); } 606371 STD { int netbsd32_extattr_list_file(const netbsd32_charp path, \ 607 int attrnamespace, netbsd32_voidp data, \ 608 netbsd32_size_t nbytes); } 609372 STD { int netbsd32_extattr_list_link(const netbsd32_charp path, \ 610 int attrnamespace, netbsd32_voidp data, \ 611 netbsd32_size_t nbytes); } 612373 STD { int netbsd32_pselect(int nd, netbsd32_fd_setp_t in, \ 613 netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \ 614 const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); } 615374 STD { int netbsd32_pollts(netbsd32_pollfdp_t fds, u_int nfds, \ 616 const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); } 617375 STD { int netbsd32_setxattr(const netbsd32_charp path, \ 618 const netbsd32_charp name, netbsd32_voidp value, \ 619 netbsd32_size_t size, int flags); } 620376 STD { int netbsd32_lsetxattr(const netbsd32_charp path, \ 621 const netbsd32_charp name, netbsd32_voidp value, \ 622 netbsd32_size_t size, int flags); } 623377 STD { int netbsd32_fsetxattr(int fd, \ 624 const netbsd32_charp name, netbsd32_voidp value, \ 625 netbsd32_size_t size, int flags); } 626378 STD { int netbsd32_getxattr(const netbsd32_charp path, \ 627 const netbsd32_charp name, netbsd32_voidp value, \ 628 netbsd32_size_t size); } 629379 STD { int netbsd32_lgetxattr(const netbsd32_charp path, \ 630 const netbsd32_charp name, netbsd32_voidp value, \ 631 netbsd32_size_t size); } 632380 STD { int netbsd32_fgetxattr(int fd, \ 633 const netbsd32_charp name, netbsd32_voidp value, \ 634 netbsd32_size_t size); } 635381 STD { int netbsd32_listxattr(const netbsd32_charp path, \ 636 netbsd32_charp list, netbsd32_size_t size); } 637382 STD { int netbsd32_llistxattr(const netbsd32_charp path, \ 638 netbsd32_charp list, netbsd32_size_t size); } 639383 STD { int netbsd32_flistxattr(int fd, \ 640 netbsd32_charp list, netbsd32_size_t size); } 641384 STD { int netbsd32_removexattr(const netbsd32_charp path, \ 642 const netbsd32_charp name); } 643385 STD { int netbsd32_lremovexattr(const netbsd32_charp path, \ 644 const netbsd32_charp name); } 645386 STD { int netbsd32_fremovexattr(int fd, \ 646 const netbsd32_charp name); } 647387 STD { int netbsd32_sys___stat30(const netbsd32_charp path, \ 648 netbsd32_statp_t ub); } 649388 STD { int netbsd32_sys___fstat30(int fd, \ 650 netbsd32_statp_t sb); } 651389 STD { int netbsd32_sys___lstat30( \ 652 const netbsd32_charp path, netbsd32_statp_t ub); } 653390 STD { int netbsd32_sys___getdents30(int fd, \ 654 netbsd32_charp buf, netbsd32_size_t count); } 655391 NOARGS { int sys_posix_fadvise(int fd, off_t offset, \ 656 off_t len, int advice); } 657392 COMPAT_30 { int netbsd32_sys___fhstat30( \ 658 const netbsd32_fhandlep_t fhp, \ 659 netbsd32_statp_t sb); } 660393 STD { int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); } 661394 STD { int netbsd32_sys___socket30(int domain, int type, int protocol); } 662395 STD { int netbsd32___getfh30(const netbsd32_charp fname, netbsd32_pointer_t fhp, netbsd32_size_tp fh_size); } 663396 STD { int netbsd32___fhopen40(const netbsd32_pointer_t fhp, \ 664 netbsd32_size_t fh_size, int flags); } 665397 STD { int netbsd32___fhstatvfs140( \ 666 netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\ 667 netbsd32_statvfsp_t buf, int flags); } 668398 STD { int netbsd32___fhstat40( \ 669 netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\ 670 netbsd32_statp_t sb); } 671