syscalls.master revision 1.52
1 $NetBSD: syscalls.master,v 1.52 2006/08/30 13:57:47 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#include "opt_ptrace.h" 47 48#include "fs_lfs.h" 49#include "fs_nfs.h" 50#endif 51 52#include <sys/param.h> 53#include <sys/systm.h> 54#include <sys/signal.h> 55#include <sys/mount.h> 56#include <sys/sa.h> 57#include <sys/syscallargs.h> 58 59#include <compat/netbsd32/netbsd32.h> 60#include <compat/netbsd32/netbsd32_syscallargs.h> 61 62%% 63 64; Reserved/unimplemented system calls in the range 0-150 inclusive 65; are reserved for use in future Berkeley releases. 66; Additional system calls implemented in vendor and other 67; redistributions should be placed in the reserved range at the end 68; of the current calls. 69 700 INDIR { int sys_syscall(int number, ...); } 711 STD { void netbsd32_exit(int rval); } 722 NOARGS { int sys_fork(void); } 733 STD { netbsd32_ssize_t netbsd32_read(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte); } 744 STD { netbsd32_ssize_t netbsd32_write(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte); } 755 STD { int netbsd32_open(const netbsd32_charp path, int flags, ... mode_t mode); } 766 STD { int netbsd32_close(int fd); } 777 STD { int netbsd32_wait4(int pid, netbsd32_intp status, int options, netbsd32_rusagep_t rusage); } 788 COMPAT_43 { int netbsd32_ocreat(const netbsd32_charp path, mode_t mode); } 799 STD { int netbsd32_link(const netbsd32_charp path, const netbsd32_charp link); } 8010 STD { int netbsd32_unlink(const netbsd32_charp path); } 8111 OBSOL execv 8212 STD { int netbsd32_chdir(const netbsd32_charp path); } 8313 STD { int netbsd32_fchdir(int fd); } 8414 STD { int netbsd32_mknod(const netbsd32_charp path, mode_t mode, dev_t dev); } 8515 STD { int netbsd32_chmod(const netbsd32_charp path, mode_t mode); } 8616 STD { int netbsd32_chown(const netbsd32_charp path, uid_t uid, gid_t gid); } 8717 STD { int netbsd32_break(netbsd32_charp nsize); } 8818 COMPAT_20 { int netbsd32_getfsstat(netbsd32_statfsp_t buf, netbsd32_long bufsize, int flags); } 8919 COMPAT_43 { netbsd32_long netbsd32_olseek(int fd, netbsd32_long offset, int whence); } 9020 NOARGS MPSAFE { pid_t sys_getpid(void); } 9121 STD { int netbsd32_mount(const netbsd32_charp type, const netbsd32_charp path, int flags, netbsd32_voidp data); } 9222 STD { int netbsd32_unmount(const netbsd32_charp path, int flags); } 9323 STD { int netbsd32_setuid(uid_t uid); } 9424 NOARGS { uid_t sys_getuid(void); } 9525 NOARGS { uid_t sys_geteuid(void); } 96#if defined(PTRACE) || !defined(_KERNEL) 9726 STD { int netbsd32_ptrace(int req, pid_t pid, netbsd32_caddr_t addr, int data); } 98#else 9926 EXCL netbsd32_ptrace 100#endif 10127 STD { netbsd32_ssize_t netbsd32_recvmsg(int s, netbsd32_msghdrp_t msg, int flags); } 10228 STD { netbsd32_ssize_t netbsd32_sendmsg(int s, const netbsd32_msghdrp_t msg, int flags); } 10329 STD { netbsd32_ssize_t netbsd32_recvfrom(int s, netbsd32_voidp buf, netbsd32_size_t len, int flags, netbsd32_sockaddrp_t from, netbsd32_intp fromlenaddr); } 10430 STD { int netbsd32_accept(int s, netbsd32_sockaddrp_t name, netbsd32_intp anamelen); } 10531 STD { int netbsd32_getpeername(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); } 10632 STD { int netbsd32_getsockname(int fdes, netbsd32_sockaddrp_t asa, netbsd32_intp alen); } 10733 STD { int netbsd32_access(const netbsd32_charp path, int flags); } 10834 STD { int netbsd32_chflags(const netbsd32_charp path, netbsd32_u_long flags); } 10935 STD { int netbsd32_fchflags(int fd, netbsd32_u_long flags); } 11036 NOARGS { void sys_sync(void); } 11137 STD { int netbsd32_kill(int pid, int signum); } 11238 COMPAT_43 { int netbsd32_stat43(const netbsd32_charp path, netbsd32_stat43p_t ub); } 11339 NOARGS { pid_t sys_getppid(void); } 11440 COMPAT_43 { int netbsd32_lstat43(const netbsd32_charp path, netbsd32_stat43p_t ub); } 11541 STD { int netbsd32_dup(int fd); } 11642 NOARGS { int sys_pipe(void); } 11743 NOARGS { gid_t sys_getegid(void); } 11844 STD { int netbsd32_profil(netbsd32_caddr_t samples, netbsd32_size_t size, netbsd32_u_long offset, u_int scale); } 119#if defined(KTRACE) || !defined(_KERNEL) 12045 STD { int netbsd32_ktrace(const netbsd32_charp fname, int ops, int facs, int pid); } 121#else 12245 EXCL netbsd32_ktrace 123#endif 12446 STD { int netbsd32_sigaction(int signum, const netbsd32_sigactionp_t nsa, netbsd32_sigactionp_t osa); } 12547 NOARGS { gid_t sys_getgid(void); } 12648 COMPAT_13 { int netbsd32_sigprocmask(int how, \ 127 int mask); } sigprocmask13 12849 STD { int netbsd32___getlogin(netbsd32_charp namebuf, u_int namelen); } 12950 STD { int netbsd32_setlogin(const netbsd32_charp namebuf); } 13051 STD { int netbsd32_acct(const netbsd32_charp path); } 13152 COMPAT_13 { int sys_sigpending(void); } sigpending13 13253 COMPAT_13 { int netbsd32_sigaltstack13(const netbsd32_sigaltstack13p_t nss, netbsd32_sigaltstack13p_t oss); } 13354 STD { int netbsd32_ioctl(int fd, netbsd32_u_long com, ... netbsd32_voidp data); } 13455 COMPAT_12 { int netbsd32_reboot(int opt); } 13556 STD { int netbsd32_revoke(const netbsd32_charp path); } 13657 STD { int netbsd32_symlink(const netbsd32_charp path, const netbsd32_charp link); } 13758 STD { int netbsd32_readlink(const netbsd32_charp path, netbsd32_charp buf, netbsd32_size_t count); } 13859 STD { int netbsd32_execve(const netbsd32_charp path, netbsd32_charpp argp, netbsd32_charpp envp); } 13960 STD { mode_t netbsd32_umask(mode_t newmask); } 14061 STD { int netbsd32_chroot(const netbsd32_charp path); } 14162 COMPAT_43 { int netbsd32_fstat43(int fd, netbsd32_stat43p_t sb); } 14263 COMPAT_43 { int netbsd32_ogetkerninfo(int op, netbsd32_charp where, netbsd32_intp size, int arg); } 14364 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 14465 COMPAT_12 { int netbsd32_msync(netbsd32_caddr_t addr, netbsd32_size_t len); } 145; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 14666 NOARGS { int sys_vfork(void); } 14767 OBSOL vread 14868 OBSOL vwrite 14969 STD { int netbsd32_sbrk(netbsd32_intptr_t incr); } 15070 STD { int netbsd32_sstk(int incr); } 15171 COMPAT_43 { int netbsd32_ommap(netbsd32_caddr_t addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pos); } 15272 STD { int netbsd32_ovadvise(int anom); } vadvise 15373 STD { int netbsd32_munmap(netbsd32_voidp addr, netbsd32_size_t len); } 15474 STD { int netbsd32_mprotect(netbsd32_voidp addr, netbsd32_size_t len, int prot); } 15575 STD { int netbsd32_madvise(netbsd32_voidp addr, netbsd32_size_t len, int behav); } 15676 OBSOL vhangup 15777 OBSOL vlimit 15878 STD { int netbsd32_mincore(netbsd32_caddr_t addr, netbsd32_size_t len, netbsd32_charp vec); } 15979 STD { int netbsd32_getgroups(int gidsetsize, netbsd32_gid_tp gidset); } 16080 STD { int netbsd32_setgroups(int gidsetsize, const netbsd32_gid_tp gidset); } 16181 NOARGS { int sys_getpgrp(void); } 16282 STD { int netbsd32_setpgid(int pid, int pgid); } 16383 STD { int netbsd32_setitimer(int which, const netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); } 16484 COMPAT_43 { int sys_wait(void); } owait 16585 COMPAT_12 { int netbsd32_oswapon(const netbsd32_charp name); } 16686 STD { int netbsd32_getitimer(int which, netbsd32_itimervalp_t itv); } 16787 COMPAT_43 { int netbsd32_ogethostname(netbsd32_charp hostname, u_int len); } 16888 COMPAT_43 { int netbsd32_osethostname(netbsd32_charp hostname, u_int len); } 16989 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 17090 STD { int netbsd32_dup2(int from, int to); } 17191 UNIMPL getdopt 17292 STD { int netbsd32_fcntl(int fd, int cmd, ... netbsd32_voidp arg); } 17393 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); } 17494 UNIMPL setdopt 17595 STD { int netbsd32_fsync(int fd); } 17696 STD { int netbsd32_setpriority(int which, int who, int prio); } 17797 COMPAT_30 { int netbsd32_socket(int domain, int type, int protocol); } 17898 STD { int netbsd32_connect(int s, const netbsd32_sockaddrp_t name, int namelen); } 17999 COMPAT_43 { int netbsd32_oaccept(int s, netbsd32_caddr_t name, netbsd32_intp anamelen); } 180100 STD { int netbsd32_getpriority(int which, int who); } 181101 COMPAT_43 { int netbsd32_osend(int s, netbsd32_caddr_t buf, int len, int flags); } 182102 COMPAT_43 { int netbsd32_orecv(int s, netbsd32_caddr_t buf, int len, int flags); } 183103 COMPAT_13 { int netbsd32_sigreturn(netbsd32_sigcontextp_t sigcntxp); } sigreturn13 184104 STD { int netbsd32_bind(int s, const netbsd32_sockaddrp_t name, int namelen); } 185105 STD { int netbsd32_setsockopt(int s, int level, int name, const netbsd32_voidp val, int valsize); } 186106 STD { int netbsd32_listen(int s, int backlog); } 187107 OBSOL vtimes 188108 COMPAT_43 { int netbsd32_osigvec(int signum, netbsd32_sigvecp_t nsv, netbsd32_sigvecp_t osv); } 189#if defined(COMPAT_43) || defined(COMPAT_SUNOS) 190109 COMPAT_43 { int netbsd32_sigblock(int mask); } 191110 COMPAT_43 { int netbsd32_sigsetmask(int mask); } 192#else 193109 OBSOL sigblock 194110 OBSOL sigsetmask 195#endif 196111 COMPAT_13 { int netbsd32_sigsuspend(int mask); } sigsuspend13 197112 COMPAT_43 { int netbsd32_osigstack(netbsd32_sigstackp_t nss, netbsd32_sigstackp_t oss); } 198113 COMPAT_43 { int netbsd32_orecvmsg(int s, netbsd32_omsghdrp_t msg, int flags); } 199114 COMPAT_43 { int netbsd32_osendmsg(int s, netbsd32_caddr_t msg, int flags); } 200115 OBSOL vtrace 201116 STD { int netbsd32_gettimeofday(netbsd32_timevalp_t tp, netbsd32_timezonep_t tzp); } 202117 STD { int netbsd32_getrusage(int who, netbsd32_rusagep_t rusage); } 203118 STD { int netbsd32_getsockopt(int s, int level, int name, netbsd32_voidp val, netbsd32_intp avalsize); } 204119 OBSOL resuba 205120 STD { netbsd32_ssize_t netbsd32_readv(int fd, const netbsd32_iovecp_t iovp, int iovcnt); } 206121 STD { netbsd32_ssize_t netbsd32_writev(int fd, const netbsd32_iovecp_t iovp, int iovcnt); } 207122 STD { int netbsd32_settimeofday(const netbsd32_timevalp_t tv, const netbsd32_timezonep_t tzp); } 208123 STD { int netbsd32_fchown(int fd, uid_t uid, gid_t gid); } 209124 STD { int netbsd32_fchmod(int fd, mode_t mode); } 210125 COMPAT_43 { int netbsd32_orecvfrom(int s, netbsd32_caddr_t buf, netbsd32_size_t len, int flags, netbsd32_caddr_t from, netbsd32_intp fromlenaddr); } 211126 STD { int netbsd32_setreuid(uid_t ruid, uid_t euid); } 212127 STD { int netbsd32_setregid(gid_t rgid, gid_t egid); } 213128 STD { int netbsd32_rename(const netbsd32_charp from, const netbsd32_charp to); } 214129 COMPAT_43 { int netbsd32_otruncate(const netbsd32_charp path, netbsd32_long length); } 215130 COMPAT_43 { int netbsd32_oftruncate(int fd, netbsd32_long length); } 216131 STD { int netbsd32_flock(int fd, int how); } 217132 STD { int netbsd32_mkfifo(const netbsd32_charp path, mode_t mode); } 218133 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); } 219134 STD { int netbsd32_shutdown(int s, int how); } 220135 STD { int netbsd32_socketpair(int domain, int type, int protocol, netbsd32_intp rsv); } 221136 STD { int netbsd32_mkdir(const netbsd32_charp path, mode_t mode); } 222137 STD { int netbsd32_rmdir(const netbsd32_charp path); } 223138 STD { int netbsd32_utimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); } 224139 OBSOL 4.2 sigreturn 225140 STD { int netbsd32_adjtime(const netbsd32_timevalp_t delta, netbsd32_timevalp_t olddelta); } 226141 COMPAT_43 { int netbsd32_ogetpeername(int fdes, netbsd32_caddr_t asa, netbsd32_intp alen); } 227142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 228#if defined(COMPAT_43) || defined(COMPAT_SUNOS) 229143 COMPAT_43 { int netbsd32_sethostid(int32_t hostid); } 230#else 231143 OBSOL sethostid 232#endif 233144 COMPAT_43 { int netbsd32_ogetrlimit(int which, netbsd32_orlimitp_t rlp); } 234145 COMPAT_43 { int netbsd32_osetrlimit(int which, const netbsd32_orlimitp_t rlp); } 235#if defined(COMPAT_43) || defined(COMPAT_SUNOS) 236146 COMPAT_43 { int netbsd32_killpg(int pgid, int signum); } 237#else 238146 OBSOL killpg 239#endif 240147 NOARGS { int sys_setsid(void); } 241148 STD { int netbsd32_quotactl(const netbsd32_charp path, int cmd, int uid, netbsd32_caddr_t arg); } 242149 COMPAT_43 { int sys_quota(void); } oquota 243150 COMPAT_43 { int netbsd32_ogetsockname(int fdec, netbsd32_caddr_t asa, netbsd32_intp alen); } 244 245; Syscalls 151-180 inclusive are reserved for vendor-specific 246; system calls. (This includes various calls added for compatibity 247; with other Unix variants.) 248; Some of these calls are now supported by BSD... 249151 UNIMPL 250152 UNIMPL 251153 UNIMPL 252154 UNIMPL 253#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 254155 STD { int netbsd32_nfssvc(int flag, netbsd32_voidp argp); } 255#else 256155 EXCL netbsd32_nfssvc 257#endif 258156 COMPAT_43 { int netbsd32_ogetdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); } 259157 COMPAT_20 { int netbsd32_statfs(const netbsd32_charp path, netbsd32_statfsp_t buf); } 260158 COMPAT_20 { int netbsd32_fstatfs(int fd, netbsd32_statfsp_t buf); } 261159 UNIMPL 262160 UNIMPL 263161 COMPAT_30 { int netbsd32_getfh(const netbsd32_charp fname, netbsd32_compat_30_fhandlep_t fhp); } 264162 COMPAT_09 { int netbsd32_ogetdomainname(netbsd32_charp domainname, int len); } 265163 COMPAT_09 { int netbsd32_osetdomainname(netbsd32_charp domainname, int len); } 266164 COMPAT_09 { int netbsd32_uname(netbsd32_outsnamep_t name); } 267165 STD { int netbsd32_sysarch(int op, netbsd32_voidp parms); } 268166 UNIMPL 269167 UNIMPL 270168 UNIMPL 271#if defined(SYSVSEM) || !defined(_KERNEL) 272169 COMPAT_10 { int netbsd32_sys_semsys(int which, int a2, int a3, int a4, int a5); } osemsys 273#else 274169 EXCL netbsd32_sys_semsys 275#endif 276#if defined(SYSVMSG) || !defined(_KERNEL) 277170 COMPAT_10 { int netbsd32_sys_msgsys(int which, int a2, int a3, int a4, int a5, int a6); } omsgsys 278#else 279170 EXCL netbsd32_sys_msgsys 280#endif 281#if defined(SYSVSHM) || !defined(_KERNEL) 282171 COMPAT_10 { int netbsd32_sys_shmsys(int which, int a2, int a3, int a4); } oshmsys 283#else 284171 EXCL netbsd32_sys_shmsys 285#endif 286172 UNIMPL 287173 STD { netbsd32_ssize_t netbsd32_pread(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); } 288174 STD { netbsd32_ssize_t netbsd32_pwrite(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); } 289175 COMPAT_30 { int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); } 290176 STD { int netbsd32_ntp_adjtime(netbsd32_timexp_t tp); } 291177 UNIMPL 292178 UNIMPL 293179 UNIMPL 294180 UNIMPL 295 296; Syscalls 180-199 are used by/reserved for BSD 297181 STD { int netbsd32_setgid(gid_t gid); } 298182 STD { int netbsd32_setegid(gid_t egid); } 299183 STD { int netbsd32_seteuid(uid_t euid); } 300#if defined(LFS) || !defined(_KERNEL) 301184 STD { int netbsd32_sys_lfs_bmapv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); } 302185 STD { int netbsd32_sys_lfs_markv(netbsd32_fsid_tp_t fsidp, netbsd32_block_infop_t blkiov, int blkcnt); } 303186 STD { int netbsd32_sys_lfs_segclean(netbsd32_fsid_tp_t fsidp, netbsd32_u_long segment); } 304187 STD { int netbsd32_sys_lfs_segwait(netbsd32_fsid_tp_t fsidp, netbsd32_timevalp_t tv); } 305#else 306184 EXCL netbsd32_sys_lfs_bmapv 307185 EXCL netbsd32_sys_lfs_markv 308186 EXCL netbsd32_sys_lfs_segclean 309187 EXCL netbsd32_sys_lfs_segwait 310#endif 311188 COMPAT_12 { int netbsd32_stat12(const netbsd32_charp path, netbsd32_stat12p_t ub); } 312189 COMPAT_12 { int netbsd32_fstat12(int fd, netbsd32_stat12p_t sb); } 313190 COMPAT_12 { int netbsd32_lstat12(const netbsd32_charp path, netbsd32_stat12p_t ub); } 314191 STD { netbsd32_long netbsd32_pathconf(const netbsd32_charp path, int name); } 315192 STD { netbsd32_long netbsd32_fpathconf(int fd, int name); } 316193 UNIMPL 317194 STD { int netbsd32_getrlimit(int which, netbsd32_rlimitp_t rlp); } 318195 STD { int netbsd32_setrlimit(int which, const netbsd32_rlimitp_t rlp); } 319196 COMPAT_12 { int netbsd32_getdirentries(int fd, netbsd32_charp buf, u_int count, netbsd32_longp basep); } 320197 STD { netbsd32_voidp netbsd32_mmap(netbsd32_voidp addr, netbsd32_size_t len, int prot, int flags, int fd, netbsd32_long pad, off_t pos); } 321198 INDIR { quad_t sys___syscall(quad_t num, ...); } 322199 STD { off_t netbsd32_lseek(int fd, int pad, off_t offset, int whence); } 323200 STD { int netbsd32_truncate(const netbsd32_charp path, int pad, off_t length); } 324201 STD { int netbsd32_ftruncate(int fd, int pad, off_t length); } 325202 STD { int netbsd32___sysctl(netbsd32_intp name, u_int namelen, netbsd32_voidp old, netbsd32_size_tp oldlenp, netbsd32_voidp new, netbsd32_size_t newlen); } 326203 STD { int netbsd32_mlock(const netbsd32_voidp addr, netbsd32_size_t len); } 327204 STD { int netbsd32_munlock(const netbsd32_voidp addr, netbsd32_size_t len); } 328205 STD { int netbsd32_undelete(const netbsd32_charp path); } 329206 STD { int netbsd32_futimes(int fd, const netbsd32_timevalp_t tptr); } 330207 STD { int netbsd32_getpgid(pid_t pid); } 331208 STD { int netbsd32_reboot(int opt, netbsd32_charp bootstr); } 332209 STD { int netbsd32_poll(netbsd32_pollfdp_t fds, u_int nfds, int timeout); } 333; 334; Syscalls 210-219 are reserved for dynamically loaded syscalls 335; 336#if defined(LKM) || !defined(_KERNEL) 337210 NODEF { int sys_lkmnosys(void); } 338211 NODEF { int sys_lkmnosys(void); } 339212 NODEF { int sys_lkmnosys(void); } 340213 NODEF { int sys_lkmnosys(void); } 341214 NODEF { int sys_lkmnosys(void); } 342215 NODEF { int sys_lkmnosys(void); } 343216 NODEF { int sys_lkmnosys(void); } 344217 NODEF { int sys_lkmnosys(void); } 345218 NODEF { int sys_lkmnosys(void); } 346219 NODEF { int sys_lkmnosys(void); } 347#else /* !LKM || !_KERNEL */ 348210 EXCL lkmnosys 349211 EXCL lkmnosys 350212 EXCL lkmnosys 351213 EXCL lkmnosys 352214 EXCL lkmnosys 353215 EXCL lkmnosys 354216 EXCL lkmnosys 355217 EXCL lkmnosys 356218 EXCL lkmnosys 357219 EXCL lkmnosys 358#endif /* !LKM || !_KERNEL */ 359; System calls 220-300 are reserved for use by NetBSD 360#if defined(SYSVSEM) || !defined(_KERNEL) 361220 COMPAT_14 { int netbsd32___semctl(int semid, int semnum, int cmd, netbsd32_semunu_t arg); } 362221 STD { int netbsd32_semget(netbsd32_key_t key, int nsems, int semflg); } 363222 STD { int netbsd32_semop(int semid, netbsd32_sembufp_t sops, netbsd32_size_t nsops); } 364223 STD { int netbsd32_semconfig(int flag); } 365#else 366220 EXCL compat_14_netbsd32_semctl 367221 EXCL netbsd32_semget 368222 EXCL netbsd32_semop 369223 EXCL netbsd32_semconfig 370#endif 371#if defined(SYSVMSG) || !defined(_KERNEL) 372224 COMPAT_14 { int netbsd32_msgctl(int msqid, int cmd, netbsd32_msqid_dsp_t buf); } 373225 STD { int netbsd32_msgget(netbsd32_key_t key, int msgflg); } 374226 STD { int netbsd32_msgsnd(int msqid, const netbsd32_voidp msgp, netbsd32_size_t msgsz, int msgflg); } 375227 STD { netbsd32_ssize_t netbsd32_msgrcv(int msqid, netbsd32_voidp msgp, netbsd32_size_t msgsz, netbsd32_long msgtyp, int msgflg); } 376#else 377224 EXCL compat_14_netbsd32_msgctl 378225 EXCL netbsd32_msgget 379226 EXCL netbsd32_msgsnd 380227 EXCL netbsd32_msgrcv 381#endif 382#if defined(SYSVSHM) || !defined(_KERNEL) 383228 STD { netbsd32_voidp netbsd32_shmat(int shmid, const netbsd32_voidp shmaddr, int shmflg); } 384229 COMPAT_14 { int netbsd32_shmctl(int shmid, int cmd, netbsd32_shmid_dsp_t buf); } 385230 STD { int netbsd32_shmdt(const netbsd32_voidp shmaddr); } 386231 STD { int netbsd32_shmget(netbsd32_key_t key, netbsd32_size_t size, int shmflg); } 387#else 388228 EXCL netbsd32_shmat 389229 EXCL compat_14_netbsd32_shmctl 390230 EXCL netbsd32_shmdt 391231 EXCL netbsd32_shmget 392#endif 393232 STD { int netbsd32_clock_gettime(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); } 394233 STD { int netbsd32_clock_settime(netbsd32_clockid_t clock_id, const netbsd32_timespecp_t tp); } 395234 STD { int netbsd32_clock_getres(netbsd32_clockid_t clock_id, netbsd32_timespecp_t tp); } 396235 STD { int netbsd32_timer_create(netbsd32_clockid_t clock_id, netbsd32_sigeventp_t evp, \ 397 netbsd32_timerp_t timerid); } 398236 STD { int netbsd32_timer_delete(netbsd32_timer_t timerid); } 399237 STD { int netbsd32_timer_settime(netbsd32_timer_t timerid, int flags, \ 400 const netbsd32_itimerspecp_t value, \ 401 netbsd32_itimerspecp_t ovalue); } 402238 STD { int netbsd32_timer_gettime(netbsd32_timer_t timerid, netbsd32_itimerspecp_t value); } 403239 STD { int netbsd32_timer_getoverrun(netbsd32_timer_t timerid); } 404; 405; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 406; 407240 STD { int netbsd32_nanosleep(const netbsd32_timespecp_t rqtp, netbsd32_timespecp_t rmtp); } 408241 STD { int netbsd32_fdatasync(int fd); } 409242 STD { int netbsd32_mlockall(int flags); } 410243 NOARGS { int sys_munlockall(void); } 411244 STD { int netbsd32___sigtimedwait(const netbsd32_sigsetp_t set, \ 412 netbsd32_siginfop_t info, \ 413 netbsd32_timespecp_t timeout); } 414245 UNIMPL 415246 UNIMPL 416#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC)) 417247 STD { int netbsd32__ksem_init(unsigned int value, netbsd32_semidp_t idp); } 418248 STD { int netbsd32__ksem_open(const netbsd32_charp name, int oflag, \ 419 mode_t mode, unsigned int value, netbsd32_semidp_t idp); } 420249 STD { int netbsd32__ksem_unlink(const netbsd32_charp name); } 421250 STD { int netbsd32__ksem_close(netbsd32_semid_t id); } 422251 STD { int netbsd32__ksem_post(netbsd32_semid_t id); } 423252 STD { int netbsd32__ksem_wait(netbsd32_semid_t id); } 424253 STD { int netbsd32__ksem_trywait(netbsd32_semid_t id); } 425254 STD { int netbsd32__ksem_getvalue(netbsd32_semid_t id, \ 426 netbsd32_intp value); } 427255 STD { int netbsd32__ksem_destroy(netbsd32_semid_t id); } 428256 UNIMPL sys__ksem_timedwait 429#else 430247 EXCL sys__ksem_init 431248 EXCL sys__ksem_open 432249 EXCL sys__ksem_unlink 433250 EXCL sys__ksem_close 434251 EXCL sys__ksem_post 435252 EXCL sys__ksem_wait 436253 EXCL sys__ksem_trywait 437254 EXCL sys__ksem_getvalue 438255 EXCL sys__ksem_destroy 439256 UNIMPL sys__ksem_timedwait 440#endif 441257 UNIMPL 442258 UNIMPL 443259 UNIMPL 444260 UNIMPL 445261 UNIMPL 446262 UNIMPL 447263 UNIMPL 448264 UNIMPL 449265 UNIMPL 450266 UNIMPL 451267 UNIMPL 452268 UNIMPL 453269 UNIMPL 454270 STD { int netbsd32___posix_rename(const netbsd32_charp from, const netbsd32_charp to); } 455271 STD { int netbsd32_swapctl(int cmd, netbsd32_voidp arg, int misc); } 456272 STD { int netbsd32_getdents(int fd, netbsd32_charp buf, netbsd32_size_t count); } 457273 STD { int netbsd32_minherit(netbsd32_voidp addr, netbsd32_size_t len, int inherit); } 458274 STD { int netbsd32_lchmod(const netbsd32_charp path, mode_t mode); } 459275 STD { int netbsd32_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); } 460276 STD { int netbsd32_lutimes(const netbsd32_charp path, const netbsd32_timevalp_t tptr); } 461277 STD { int netbsd32___msync13(netbsd32_voidp addr, netbsd32_size_t len, int flags); } 462278 STD { int netbsd32___stat13(const netbsd32_charp path, netbsd32_stat13p_t ub); } 463279 STD { int netbsd32___fstat13(int fd, netbsd32_stat13p_t sb); } 464280 STD { int netbsd32___lstat13(const netbsd32_charp path, netbsd32_stat13p_t ub); } 465281 STD { int netbsd32___sigaltstack14(const netbsd32_sigaltstackp_t nss, netbsd32_sigaltstackp_t oss); } 466282 NOARGS { int sys___vfork14(void); } 467283 STD { int netbsd32___posix_chown(const netbsd32_charp path, uid_t uid, gid_t gid); } 468284 STD { int netbsd32___posix_fchown(int fd, uid_t uid, gid_t gid); } 469285 STD { int netbsd32___posix_lchown(const netbsd32_charp path, uid_t uid, gid_t gid); } 470286 STD { pid_t netbsd32_getsid(pid_t pid); } 471287 STD { int netbsd32___clone(int flags, netbsd32_voidp stack); } 472#if defined(KTRACE) || !defined(_KERNEL) 473288 STD { int netbsd32_fktrace(const int fd, int ops, int facs, int pid); } 474#else 475288 EXCL netbsd32_fktrace 476#endif 477289 STD { netbsd32_ssize_t netbsd32_preadv(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); } 478290 STD { netbsd32_ssize_t netbsd32_pwritev(int fd, const netbsd32_iovecp_t iovp, int iovcnt, int pad, off_t offset); } 479291 STD { int netbsd32___sigaction14(int signum, \ 480 const netbsd32_sigactionp_t nsa, \ 481 netbsd32_sigactionp_t osa); } 482292 STD { int netbsd32___sigpending14(netbsd32_sigsetp_t set); } 483293 STD { int netbsd32___sigprocmask14(int how, \ 484 const netbsd32_sigsetp_t set, \ 485 netbsd32_sigsetp_t oset); } 486294 STD { int netbsd32___sigsuspend14(const netbsd32_sigsetp_t set); } 487295 COMPAT_16 { int netbsd32___sigreturn14(netbsd32_sigcontextp_t sigcntxp); } 488296 STD { int netbsd32___getcwd(netbsd32_charp bufp, netbsd32_size_t length); } 489297 STD { int netbsd32_fchroot(int fd); } 490298 COMPAT_30 { int netbsd32_fhopen(const netbsd32_fhandlep_t fhp, \ 491 int flags); } 492299 COMPAT_30 { int netbsd32_fhstat(const netbsd32_fhandlep_t fhp, \ 493 netbsd32_stat13p_t sb); } 494300 COMPAT_20 { int netbsd32_fhstatfs(netbsd32_fhandlep_t fhp, \ 495 netbsd32_statp_t buf); } 496#if defined(SYSVSEM) || !defined(_KERNEL) 497301 STD { int netbsd32___semctl14(int semid, int semnum, int cmd, \ 498 ... netbsd32_semunp_t arg); } 499#else 500301 EXCL __semctl14 501#endif 502#if defined(SYSVMSG) || !defined(_KERNEL) 503302 STD { int netbsd32___msgctl13(int msqid, int cmd, \ 504 netbsd32_msqid_dsp_t buf); } 505#else 506302 EXCL __msgctl13 507#endif 508#if defined(SYSVSHM) || !defined(_KERNEL) 509303 STD { int netbsd32___shmctl13(int shmid, int cmd, \ 510 netbsd32_shmid_dsp_t buf); } 511#else 512303 EXCL __shmctl13 513#endif 514304 STD { int netbsd32_lchflags(const netbsd32_charp path, netbsd32_u_long flags); } 515305 STD { int sys_issetugid(void); } 516306 STD { int netbsd32_utrace(const netbsd32_charp label, netbsd32_voidp addr, \ 517 netbsd32_size_t len); } 518; 519; Syscalls 307 and 308 are reserved for getcontext and setcontext 520; 521307 STD { int netbsd32_getcontext(netbsd32_ucontextp ucp); } 522308 STD { int netbsd32_setcontext(netbsd32_ucontextp ucp, \ 523 uint32_t flags, netbsd32_lwpidp new_lwp); } 524; 525; Syscalls 309-339 are reserved for LWP and scheduler activation syscalls. 526; 527309 STD { int netbsd32__lwp_create(const netbsd32_ucontextp ucp, \ 528 netbsd32_u_long flags, netbsd32_lwpidp new_lwp); } 529310 NOARGS { int sys__lwp_exit(void); } 530311 NOARGS { lwpid_t sys__lwp_self(void); } 531312 STD { int netbsd32__lwp_wait(lwpid_t wait_for, \ 532 netbsd32_lwpidp departed); } 533313 STD { int netbsd32__lwp_suspend(lwpid_t target); } 534314 STD { int netbsd32__lwp_continue(lwpid_t target); } 535315 STD { int netbsd32__lwp_wakeup(lwpid_t target); } 536316 NOARGS { void *sys__lwp_getprivate(void); } 537317 STD { void netbsd32__lwp_setprivate(netbsd32_voidp ptr); } 538318 UNIMPL 539319 UNIMPL 540320 UNIMPL 541321 UNIMPL 542322 UNIMPL 543323 UNIMPL 544324 UNIMPL 545325 UNIMPL 546326 UNIMPL 547327 UNIMPL 548328 UNIMPL 549329 UNIMPL 550330 STD { int netbsd32_sa_register(netbsd32_sa_upcall_t new, \ 551 netbsd32_sa_upcallp_t old, int flags, \ 552 netbsd32_ssize_t stackinfo_offset); } 553331 STD { int netbsd32_sa_stacks(int num, netbsd32_stackp_t stacks); } 554332 NOARGS { int sys_sa_enable(void); } 555333 STD { int netbsd32_sa_setconcurrency(int concurrency); } 556334 NOARGS { int sys_sa_yield(void); } 557335 STD { int netbsd32_sa_preempt(int sa_id); } 558336 OBSOL sys_sa_unblockyield 559337 UNIMPL 560338 UNIMPL 561339 UNIMPL 562340 STD { int netbsd32___sigaction_sigtramp(int signum, \ 563 const netbsd32_sigactionp_t nsa, \ 564 netbsd32_sigactionp_t osa, \ 565 netbsd32_voidp tramp, int vers); } 566341 UNIMPL 567342 UNIMPL 568343 STD { int netbsd32_rasctl(netbsd32_caddr_t addr, netbsd32_size_t len, \ 569 int op); } 570344 NOARGS { int sys_kqueue(void); } 571345 STD { int netbsd32_kevent(int fd, \ 572 netbsd32_keventp_t changelist, netbsd32_size_t nchanges, \ 573 netbsd32_keventp_t eventlist, netbsd32_size_t nevents, \ 574 netbsd32_timespecp_t timeout); } 575346 UNIMPL 576347 UNIMPL 577348 UNIMPL 578349 UNIMPL 579350 UNIMPL 580351 UNIMPL 581352 UNIMPL 582353 UNIMPL 583354 STD { int netbsd32_fsync_range(int fd, int flags, off_t start, \ 584 off_t length); } 585355 STD { int netbsd32_uuidgen(netbsd32_uuidp_t store, int count); } 586356 STD { int netbsd32_getvfsstat(netbsd32_statvfsp_t buf, \ 587 netbsd32_size_t bufsize, int flags); } 588357 STD { int netbsd32_statvfs1(const netbsd32_charp path, \ 589 netbsd32_statvfsp_t buf, int flags); } 590358 STD { int netbsd32_fstatvfs1(int fd, netbsd32_statvfsp_t buf, \ 591 int flags); } 592359 COMPAT_30 { int netbsd32_fhstatvfs1(const netbsd32_fhandlep_t fhp, \ 593 netbsd32_statvfsp_t buf, int flags); } 594360 STD { int netbsd32_extattrctl(const netbsd32_charp path, \ 595 int cmd, const netbsd32_charp filename, int attrnamespace, \ 596 const netbsd32_charp attrname); } 597361 STD { int netbsd32_extattr_set_file(const netbsd32_charp path, \ 598 int attrnamespace, const netbsd32_charp attrname, \ 599 const netbsd32_voidp data, netbsd32_size_t nbytes); } 600362 STD { int netbsd32_extattr_get_file(const netbsd32_charp path, \ 601 int attrnamespace, const netbsd32_charp attrname, \ 602 netbsd32_voidp data, netbsd32_size_t nbytes); } 603363 STD { int netbsd32_extattr_delete_file(const netbsd32_charp path, \ 604 int attrnamespace, const netbsd32_charp attrname); } 605364 STD { int netbsd32_extattr_set_fd(int fd, \ 606 int attrnamespace, const netbsd32_charp attrname, \ 607 const netbsd32_voidp data, netbsd32_size_t nbytes); } 608365 STD { int netbsd32_extattr_get_fd(int fd, \ 609 int attrnamespace, const netbsd32_charp attrname, \ 610 netbsd32_voidp data, netbsd32_size_t nbytes); } 611366 STD { int netbsd32_extattr_delete_fd(int fd, \ 612 int attrnamespace, const netbsd32_charp attrname); } 613367 STD { int netbsd32_extattr_set_link(const netbsd32_charp path, \ 614 int attrnamespace, const netbsd32_charp attrname, \ 615 const netbsd32_voidp data, netbsd32_size_t nbytes); } 616368 STD { int netbsd32_extattr_get_link(const netbsd32_charp path, \ 617 int attrnamespace, const netbsd32_charp attrname, \ 618 netbsd32_voidp data, netbsd32_size_t nbytes); } 619369 STD { int netbsd32_extattr_delete_link(const netbsd32_charp path, \ 620 int attrnamespace, const netbsd32_charp attrname); } 621370 STD { int netbsd32_extattr_list_fd(int fd, \ 622 int attrnamespace, netbsd32_voidp data, \ 623 netbsd32_size_t nbytes); } 624371 STD { int netbsd32_extattr_list_file(const netbsd32_charp path, \ 625 int attrnamespace, netbsd32_voidp data, \ 626 netbsd32_size_t nbytes); } 627372 STD { int netbsd32_extattr_list_link(const netbsd32_charp path, \ 628 int attrnamespace, netbsd32_voidp data, \ 629 netbsd32_size_t nbytes); } 630373 STD { int netbsd32_pselect(int nd, netbsd32_fd_setp_t in, \ 631 netbsd32_fd_setp_t ou, netbsd32_fd_setp_t ex, \ 632 const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); } 633374 STD { int netbsd32_pollts(netbsd32_pollfdp_t fds, u_int nfds, \ 634 const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); } 635375 STD { int netbsd32_setxattr(const netbsd32_charp path, \ 636 const netbsd32_charp name, netbsd32_voidp value, \ 637 netbsd32_size_t size, int flags); } 638376 STD { int netbsd32_lsetxattr(const netbsd32_charp path, \ 639 const netbsd32_charp name, netbsd32_voidp value, \ 640 netbsd32_size_t size, int flags); } 641377 STD { int netbsd32_fsetxattr(int fd, \ 642 const netbsd32_charp name, netbsd32_voidp value, \ 643 netbsd32_size_t size, int flags); } 644378 STD { int netbsd32_getxattr(const netbsd32_charp path, \ 645 const netbsd32_charp name, netbsd32_voidp value, \ 646 netbsd32_size_t size); } 647379 STD { int netbsd32_lgetxattr(const netbsd32_charp path, \ 648 const netbsd32_charp name, netbsd32_voidp value, \ 649 netbsd32_size_t size); } 650380 STD { int netbsd32_fgetxattr(int fd, \ 651 const netbsd32_charp name, netbsd32_voidp value, \ 652 netbsd32_size_t size); } 653381 STD { int netbsd32_listxattr(const netbsd32_charp path, \ 654 netbsd32_charp list, netbsd32_size_t size); } 655382 STD { int netbsd32_llistxattr(const netbsd32_charp path, \ 656 netbsd32_charp list, netbsd32_size_t size); } 657383 STD { int netbsd32_flistxattr(int fd, \ 658 netbsd32_charp list, netbsd32_size_t size); } 659384 STD { int netbsd32_removexattr(const netbsd32_charp path, \ 660 const netbsd32_charp name); } 661385 STD { int netbsd32_lremovexattr(const netbsd32_charp path, \ 662 const netbsd32_charp name); } 663386 STD { int netbsd32_fremovexattr(int fd, \ 664 const netbsd32_charp name); } 665387 STD { int netbsd32_sys___stat30(const netbsd32_charp path, \ 666 netbsd32_statp_t ub); } 667388 STD { int netbsd32_sys___fstat30(int fd, \ 668 netbsd32_statp_t sb); } 669389 STD { int netbsd32_sys___lstat30( \ 670 const netbsd32_charp path, netbsd32_statp_t ub); } 671390 STD { int netbsd32_sys___getdents30(int fd, \ 672 netbsd32_charp buf, netbsd32_size_t count); } 673391 NOARGS { int sys_posix_fadvise(int fd, off_t offset, \ 674 off_t len, int advice); } 675392 COMPAT_30 { int netbsd32_sys___fhstat30( \ 676 const netbsd32_fhandlep_t fhp, \ 677 netbsd32_statp_t sb); } 678393 STD { int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); } 679394 STD { int netbsd32_sys___socket30(int domain, int type, int protocol); } 680395 STD { int netbsd32___getfh30(const netbsd32_charp fname, netbsd32_pointer_t fhp, netbsd32_size_tp fh_size); } 681396 STD { int netbsd32___fhopen40(const netbsd32_pointer_t fhp, \ 682 netbsd32_size_t fh_size, int flags); } 683397 STD { int netbsd32___fhstatvfs140( \ 684 netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\ 685 netbsd32_statvfsp_t buf, int flags); } 686398 STD { int netbsd32___fhstat40( \ 687 netbsd32_pointer_t fhp, netbsd32_size_t fh_size,\ 688 netbsd32_statp_t sb); } 689