syscalls.master revision 1.188
1 $NetBSD: syscalls.master,v 1.188 2008/02/09 16:58:01 yamt Exp $ 2 3; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 4 5; NetBSD system call name/number "master" file. 6; (See syscalls.conf to see what it is processed into.) 7; 8; Fields: number type [type-dependent ...] 9; number system call number, must be in order 10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 11; the compatibility options defined in syscalls.conf. 12; 13; An optional field, MPSAFE, after the type field, indicates that 14; the system call is MP-safe. 15; 16; types: 17; STD always included 18; OBSOL obsolete, not included in system 19; UNIMPL unimplemented, not included in system 20; EXCL implemented, but not included in system 21; NODEF included, but don't define the syscall number 22; NOARGS included, but don't define the syscall args structure 23; INDIR included, but don't define the syscall args structure, 24; and allow it to be "really" varargs. 25; 26; The compat options are defined in the syscalls.conf file, and the 27; compat option name is prefixed to the syscall name. Other than 28; that, they're like NODEF (for 'compat' options), or STD (for 29; 'libcompat' options). 30; 31; The type-dependent arguments are as follows: 32; For STD, NODEF, NOARGS, and compat syscalls: 33; { pseudo-proto } [alias] 34; For other syscalls: 35; [comment] 36; 37; #ifdef's, etc. may be included, and are copied to the output files. 38; #include's are copied to the syscall names and switch definition files only. 39 40#include "opt_nfsserver.h" 41#include "opt_ntp.h" 42#include "opt_compat_netbsd.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 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%% 57 58; Reserved/unimplemented system calls in the range 0-150 inclusive 59; are reserved for use in future Berkeley releases. 60; Additional system calls implemented in vendor and other 61; redistributions should be placed in the reserved range at the end 62; of the current calls. 63 640 INDIR { int sys_syscall(int code, \ 65 ... register_t args[SYS_MAXSYSARGS]); } 661 STD MPSAFE { void sys_exit(int rval); } 672 STD MPSAFE { int sys_fork(void); } 683 STD MPSAFE { ssize_t sys_read(int fd, void *buf, size_t nbyte); } 694 STD MPSAFE { ssize_t sys_write(int fd, const void *buf, \ 70 size_t nbyte); } 715 STD MPSAFE { int sys_open(const char *path, \ 72 int flags, ... mode_t mode); } 736 STD MPSAFE { int sys_close(int fd); } 747 STD MPSAFE { int sys_wait4(int pid, int *status, int options, \ 75 struct rusage *rusage); } 768 COMPAT_43 MPSAFE { int sys_creat(const char *path, mode_t mode); } ocreat 779 STD MPSAFE { int sys_link(const char *path, const char *link); } 7810 STD MPSAFE { int sys_unlink(const char *path); } 7911 OBSOL execv 8012 STD MPSAFE { int sys_chdir(const char *path); } 8113 STD MPSAFE { int sys_fchdir(int fd); } 8214 STD MPSAFE { int sys_mknod(const char *path, mode_t mode, \ 83 dev_t dev); } 8415 STD MPSAFE { int sys_chmod(const char *path, mode_t mode); } 8516 STD MPSAFE { int sys_chown(const char *path, uid_t uid, \ 86 gid_t gid); } 8717 STD MPSAFE { int sys_obreak(char *nsize); } break 8818 COMPAT_20 MPSAFE { int sys_getfsstat(struct statfs12 *buf, \ 89 long bufsize, int flags); } 9019 COMPAT_43 MPSAFE { long sys_lseek(int fd, long offset, int whence); } \ 91 olseek 92#ifdef COMPAT_43 9320 STD MPSAFE { pid_t sys_getpid_with_ppid(void); } getpid 94#else 9520 STD MPSAFE { pid_t sys_getpid(void); } 96#endif 9721 COMPAT_40 { int sys_mount(const char *type, const char *path, \ 98 int flags, void *data); } 9922 STD { int sys_unmount(const char *path, int flags); } 10023 STD MPSAFE { int sys_setuid(uid_t uid); } 101#ifdef COMPAT_43 10224 STD MPSAFE { uid_t sys_getuid_with_euid(void); } getuid 103#else 10424 STD MPSAFE { uid_t sys_getuid(void); } 105#endif 10625 STD MPSAFE { uid_t sys_geteuid(void); } 10726 STD MPSAFE { int sys_ptrace(int req, pid_t pid, void *addr, \ 108 int data); } 10927 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ 110 int flags); } 11128 STD { ssize_t sys_sendmsg(int s, \ 112 const struct msghdr *msg, int flags); } 11329 STD { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ 114 int flags, struct sockaddr *from, \ 115 unsigned int *fromlenaddr); } 11630 STD { int sys_accept(int s, struct sockaddr *name, \ 117 unsigned int *anamelen); } 11831 STD { int sys_getpeername(int fdes, struct sockaddr *asa, \ 119 unsigned int *alen); } 12032 STD { int sys_getsockname(int fdes, struct sockaddr *asa, \ 121 unsigned int *alen); } 12233 STD MPSAFE { int sys_access(const char *path, int flags); } 12334 STD MPSAFE { int sys_chflags(const char *path, u_long flags); } 12435 STD MPSAFE { int sys_fchflags(int fd, u_long flags); } 12536 STD MPSAFE { void sys_sync(void); } 12637 STD MPSAFE { int sys_kill(int pid, int signum); } 12738 COMPAT_43 MPSAFE { int sys_stat(const char *path, struct stat43 *ub); } \ 128 stat43 12939 STD MPSAFE { pid_t sys_getppid(void); } 13040 COMPAT_43 MPSAFE { int sys_lstat(const char *path, \ 131 struct stat43 *ub); } lstat43 13241 STD MPSAFE { int sys_dup(int fd); } 13342 STD MPSAFE { int sys_pipe(void); } 13443 STD MPSAFE { gid_t sys_getegid(void); } 13544 STD MPSAFE { int sys_profil(char *samples, size_t size, \ 136 u_long offset, u_int scale); } 13745 STD MPSAFE { int sys_ktrace(const char *fname, int ops, \ 138 int facs, int pid); } 13946 COMPAT_13 MPSAFE { int sys_sigaction(int signum, \ 140 const struct sigaction13 *nsa, \ 141 struct sigaction13 *osa); } sigaction13 142#ifdef COMPAT_43 14347 STD MPSAFE { gid_t sys_getgid_with_egid(void); } getgid 144#else 14547 STD MPSAFE { gid_t sys_getgid(void); } 146#endif 14748 COMPAT_13 MPSAFE { int sys_sigprocmask(int how, \ 148 int mask); } sigprocmask13 14949 STD MPSAFE { int sys___getlogin(char *namebuf, size_t namelen); } 15050 STD MPSAFE { int sys___setlogin(const char *namebuf); } 15151 STD MPSAFE { int sys_acct(const char *path); } 15252 COMPAT_13 MPSAFE { int sys_sigpending(void); } sigpending13 15353 COMPAT_13 MPSAFE { int sys_sigaltstack( \ 154 const struct sigaltstack13 *nss, \ 155 struct sigaltstack13 *oss); } sigaltstack13 15654 STD MPSAFE { int sys_ioctl(int fd, \ 157 u_long com, ... void *data); } 15855 COMPAT_12 { int sys_reboot(int opt); } oreboot 15956 STD MPSAFE { int sys_revoke(const char *path); } 16057 STD MPSAFE { int sys_symlink(const char *path, \ 161 const char *link); } 16258 STD MPSAFE { ssize_t sys_readlink(const char *path, char *buf, \ 163 size_t count); } 16459 STD MPSAFE { int sys_execve(const char *path, \ 165 char * const *argp, char * const *envp); } 16660 STD MPSAFE { mode_t sys_umask(mode_t newmask); } 16761 STD MPSAFE { int sys_chroot(const char *path); } 16862 COMPAT_43 MPSAFE { int sys_fstat(int fd, struct stat43 *sb); } fstat43 16963 COMPAT_43 MPSAFE { int sys_getkerninfo(int op, char *where, int *size, \ 170 int arg); } ogetkerninfo 17164 COMPAT_43 MPSAFE { int sys_getpagesize(void); } ogetpagesize 17265 COMPAT_12 MPSAFE { int sys_msync(void *addr, size_t len); } 173; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 17466 STD MPSAFE { int sys_vfork(void); } 17567 OBSOL vread 17668 OBSOL vwrite 17769 STD MPSAFE { int sys_sbrk(intptr_t incr); } 17870 STD MPSAFE { int sys_sstk(int incr); } 17971 COMPAT_43 MPSAFE { int sys_mmap(void *addr, size_t len, int prot, \ 180 int flags, int fd, long pos); } ommap 18172 STD MPSAFE { int sys_ovadvise(int anom); } vadvise 18273 STD MPSAFE { int sys_munmap(void *addr, size_t len); } 18374 STD MPSAFE { int sys_mprotect(void *addr, size_t len, \ 184 int prot); } 18575 STD MPSAFE { int sys_madvise(void *addr, size_t len, \ 186 int behav); } 18776 OBSOL vhangup 18877 OBSOL vlimit 18978 STD MPSAFE { int sys_mincore(void *addr, size_t len, \ 190 char *vec); } 19179 STD MPSAFE { int sys_getgroups(int gidsetsize, \ 192 gid_t *gidset); } 19380 STD MPSAFE { int sys_setgroups(int gidsetsize, \ 194 const gid_t *gidset); } 19581 STD MPSAFE { int sys_getpgrp(void); } 19682 STD MPSAFE { int sys_setpgid(int pid, int pgid); } 19783 STD { int sys_setitimer(int which, \ 198 const struct itimerval *itv, \ 199 struct itimerval *oitv); } 20084 COMPAT_43 MPSAFE { int sys_wait(void); } owait 20185 COMPAT_12 MPSAFE { int sys_swapon(const char *name); } oswapon 20286 STD { int sys_getitimer(int which, \ 203 struct itimerval *itv); } 20487 COMPAT_43 MPSAFE { int sys_gethostname(char *hostname, u_int len); } \ 205 ogethostname 20688 COMPAT_43 MPSAFE { int sys_sethostname(char *hostname, u_int len); } \ 207 osethostname 20889 COMPAT_43 MPSAFE { int sys_getdtablesize(void); } ogetdtablesize 20990 STD MPSAFE { int sys_dup2(int from, int to); } 21091 UNIMPL getdopt 21192 STD MPSAFE { int sys_fcntl(int fd, int cmd, ... void *arg); } 21293 STD MPSAFE { int sys_select(int nd, fd_set *in, fd_set *ou, \ 213 fd_set *ex, struct timeval *tv); } 21494 UNIMPL setdopt 21595 STD MPSAFE { int sys_fsync(int fd); } 21696 STD MPSAFE { int sys_setpriority(int which, id_t who, int prio); } 21797 COMPAT_30 { int sys_socket(int domain, int type, int protocol); } 21898 STD { int sys_connect(int s, const struct sockaddr *name, \ 219 unsigned int namelen); } 22099 COMPAT_43 { int sys_accept(int s, void *name, \ 221 int *anamelen); } oaccept 222100 STD MPSAFE { int sys_getpriority(int which, id_t who); } 223101 COMPAT_43 { int sys_send(int s, void *buf, int len, \ 224 int flags); } osend 225102 COMPAT_43 { int sys_recv(int s, void *buf, int len, \ 226 int flags); } orecv 227103 COMPAT_13 MPSAFE { int sys_sigreturn(struct sigcontext13 *sigcntxp); } \ 228 sigreturn13 229104 STD { int sys_bind(int s, const struct sockaddr *name, \ 230 unsigned int namelen); } 231105 STD { int sys_setsockopt(int s, int level, int name, \ 232 const void *val, unsigned int valsize); } 233106 STD { int sys_listen(int s, int backlog); } 234107 OBSOL vtimes 235108 COMPAT_43 MPSAFE { int sys_sigvec(int signum, struct sigvec *nsv, \ 236 struct sigvec *osv); } osigvec 237109 COMPAT_43 MPSAFE { int sys_sigblock(int mask); } osigblock 238110 COMPAT_43 MPSAFE { int sys_sigsetmask(int mask); } osigsetmask 239111 COMPAT_13 MPSAFE { int sys_sigsuspend(int mask); } sigsuspend13 240112 COMPAT_43 MPSAFE { int sys_sigstack(struct sigstack *nss, \ 241 struct sigstack *oss); } osigstack 242113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 243 int flags); } orecvmsg 244114 COMPAT_43 { int sys_sendmsg(int s, void *msg, int flags); } \ 245 osendmsg 246115 OBSOL vtrace 247116 STD MPSAFE { int sys_gettimeofday(struct timeval *tp, \ 248 void *tzp); } 249117 STD MPSAFE { int sys_getrusage(int who, struct rusage *rusage); } 250118 STD { int sys_getsockopt(int s, int level, int name, \ 251 void *val, unsigned int *avalsize); } 252119 OBSOL resuba 253120 STD MPSAFE { ssize_t sys_readv(int fd, \ 254 const struct iovec *iovp, int iovcnt); } 255121 STD MPSAFE { ssize_t sys_writev(int fd, \ 256 const struct iovec *iovp, int iovcnt); } 257122 STD MPSAFE { int sys_settimeofday(const struct timeval *tv, \ 258 const void *tzp); } 259123 STD MPSAFE { int sys_fchown(int fd, uid_t uid, gid_t gid); } 260124 STD MPSAFE { int sys_fchmod(int fd, mode_t mode); } 261125 COMPAT_43 { int sys_recvfrom(int s, void *buf, size_t len, \ 262 int flags, void *from, int *fromlenaddr); } \ 263 orecvfrom 264126 STD MPSAFE { int sys_setreuid(uid_t ruid, uid_t euid); } 265127 STD MPSAFE { int sys_setregid(gid_t rgid, gid_t egid); } 266128 STD MPSAFE { int sys_rename(const char *from, const char *to); } 267129 COMPAT_43 MPSAFE { int sys_truncate(const char *path, long length); } \ 268 otruncate 269130 COMPAT_43 MPSAFE { int sys_ftruncate(int fd, long length); } oftruncate 270131 STD MPSAFE { int sys_flock(int fd, int how); } 271132 STD MPSAFE { int sys_mkfifo(const char *path, mode_t mode); } 272133 STD { ssize_t sys_sendto(int s, const void *buf, \ 273 size_t len, int flags, const struct sockaddr *to, \ 274 unsigned int tolen); } 275134 STD { int sys_shutdown(int s, int how); } 276135 STD { int sys_socketpair(int domain, int type, \ 277 int protocol, int *rsv); } 278136 STD MPSAFE { int sys_mkdir(const char *path, mode_t mode); } 279137 STD MPSAFE { int sys_rmdir(const char *path); } 280138 STD MPSAFE { int sys_utimes(const char *path, \ 281 const struct timeval *tptr); } 282139 OBSOL 4.2 sigreturn 283140 STD { int sys_adjtime(const struct timeval *delta, \ 284 struct timeval *olddelta); } 285141 COMPAT_43 { int sys_getpeername(int fdes, void *asa, \ 286 int *alen); } ogetpeername 287142 COMPAT_43 MPSAFE { int32_t sys_gethostid(void); } ogethostid 288143 COMPAT_43 MPSAFE { int sys_sethostid(int32_t hostid); } osethostid 289144 COMPAT_43 MPSAFE { int sys_getrlimit(int which, \ 290 struct orlimit *rlp); } ogetrlimit 291145 COMPAT_43 MPSAFE { int sys_setrlimit(int which, \ 292 const struct orlimit *rlp); } osetrlimit 293146 COMPAT_43 MPSAFE { int sys_killpg(int pgid, int signum); } okillpg 294147 STD MPSAFE { int sys_setsid(void); } 295148 STD MPSAFE { int sys_quotactl(const char *path, int cmd, \ 296 int uid, void *arg); } 297149 COMPAT_43 MPSAFE { int sys_quota(void); } oquota 298150 COMPAT_43 { int sys_getsockname(int fdec, void *asa, \ 299 int *alen); } ogetsockname 300 301; Syscalls 151-180 inclusive are reserved for vendor-specific 302; system calls. (This includes various calls added for compatibity 303; with other Unix variants.) 304; Some of these calls are now supported by BSD... 305151 UNIMPL 306152 UNIMPL 307153 UNIMPL 308154 UNIMPL 309#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 310155 STD { int sys_nfssvc(int flag, void *argp); } 311#else 312155 EXCL nfssvc 313#endif 314156 COMPAT_43 MPSAFE { int sys_getdirentries(int fd, char *buf, \ 315 u_int count, long *basep); } ogetdirentries 316157 COMPAT_20 MPSAFE { int sys_statfs(const char *path, \ 317 struct statfs12 *buf); } 318158 COMPAT_20 MPSAFE { int sys_fstatfs(int fd, struct statfs12 *buf); } 319159 UNIMPL 320160 UNIMPL 321161 COMPAT_30 MPSAFE { int sys_getfh(const char *fname, \ 322 struct compat_30_fhandle *fhp); } 323162 COMPAT_09 MPSAFE { int sys_getdomainname(char *domainname, int len); } \ 324 ogetdomainname 325163 COMPAT_09 MPSAFE { int sys_setdomainname(char *domainname, int len); } \ 326 osetdomainname 327164 COMPAT_09 MPSAFE { int sys_uname(struct outsname *name); } ouname 328165 STD { int sys_sysarch(int op, void *parms); } 329166 UNIMPL 330167 UNIMPL 331168 UNIMPL 332; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 333#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64) 334169 COMPAT_10 MPSAFE { int sys_semsys(int which, int a2, int a3, int a4, \ 335 int a5); } osemsys 336#else 337169 EXCL 1.0 semsys 338#endif 339; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 340#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64) 341170 COMPAT_10 MPSAFE { int sys_msgsys(int which, int a2, int a3, int a4, \ 342 int a5, int a6); } omsgsys 343#else 344170 EXCL 1.0 msgsys 345#endif 346; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 347#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64) 348171 COMPAT_10 MPSAFE { int sys_shmsys(int which, int a2, int a3, int a4); } \ 349 oshmsys 350#else 351171 EXCL 1.0 shmsys 352#endif 353172 UNIMPL 354173 STD MPSAFE { ssize_t sys_pread(int fd, void *buf, \ 355 size_t nbyte, int pad, off_t offset); } 356174 STD MPSAFE { ssize_t sys_pwrite(int fd, const void *buf, \ 357 size_t nbyte, int pad, off_t offset); } 358; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded. 359175 COMPAT_30 { int sys_ntp_gettime(struct ntptimeval30 *ntvp); } 360#if defined(NTP) || !defined(_KERNEL) 361176 STD { int sys_ntp_adjtime(struct timex *tp); } 362#else 363176 EXCL ntp_adjtime 364#endif 365177 UNIMPL 366178 UNIMPL 367179 UNIMPL 368180 UNIMPL 369 370; Syscalls 180-199 are used by/reserved for BSD 371181 STD MPSAFE { int sys_setgid(gid_t gid); } 372182 STD MPSAFE { int sys_setegid(gid_t egid); } 373183 STD MPSAFE { int sys_seteuid(uid_t euid); } 374#if defined(LFS) || !defined(_KERNEL) 375184 STD { int sys_lfs_bmapv(fsid_t *fsidp, \ 376 struct block_info *blkiov, int blkcnt); } 377185 STD { int sys_lfs_markv(fsid_t *fsidp, \ 378 struct block_info *blkiov, int blkcnt); } 379186 STD { int sys_lfs_segclean(fsid_t *fsidp, u_long segment); } 380187 STD { int sys_lfs_segwait(fsid_t *fsidp, \ 381 struct timeval *tv); } 382#else 383184 EXCL lfs_bmapv 384185 EXCL lfs_markv 385186 EXCL lfs_segclean 386187 EXCL lfs_segwait 387#endif 388188 COMPAT_12 MPSAFE { int sys_stat(const char *path, struct stat12 *ub); } \ 389 stat12 390189 COMPAT_12 MPSAFE { int sys_fstat(int fd, struct stat12 *sb); } fstat12 391190 COMPAT_12 MPSAFE { int sys_lstat(const char *path, \ 392 struct stat12 *ub); } lstat12 393191 STD MPSAFE { long sys_pathconf(const char *path, int name); } 394192 STD MPSAFE { long sys_fpathconf(int fd, int name); } 395193 UNIMPL 396194 STD MPSAFE { int sys_getrlimit(int which, \ 397 struct rlimit *rlp); } 398195 STD MPSAFE { int sys_setrlimit(int which, \ 399 const struct rlimit *rlp); } 400196 COMPAT_12 MPSAFE { int sys_getdirentries(int fd, char *buf, \ 401 u_int count, long *basep); } 402197 STD MPSAFE { void *sys_mmap(void *addr, size_t len, int prot, \ 403 int flags, int fd, long pad, off_t pos); } 404198 INDIR { quad_t sys___syscall(quad_t code, \ 405 ... register_t args[SYS_MAXSYSARGS]); } 406199 STD MPSAFE { off_t sys_lseek(int fd, int pad, off_t offset, \ 407 int whence); } 408200 STD MPSAFE { int sys_truncate(const char *path, int pad, \ 409 off_t length); } 410201 STD MPSAFE { int sys_ftruncate(int fd, int pad, off_t length); } 411202 STD MPSAFE { int sys___sysctl(const int *name, u_int namelen, \ 412 void *old, size_t *oldlenp, const void *new, \ 413 size_t newlen); } 414203 STD MPSAFE { int sys_mlock(const void *addr, size_t len); } 415204 STD MPSAFE { int sys_munlock(const void *addr, size_t len); } 416205 STD MPSAFE { int sys_undelete(const char *path); } 417206 STD MPSAFE { int sys_futimes(int fd, \ 418 const struct timeval *tptr); } 419207 STD MPSAFE { pid_t sys_getpgid(pid_t pid); } 420208 STD { int sys_reboot(int opt, char *bootstr); } 421209 STD MPSAFE { int sys_poll(struct pollfd *fds, u_int nfds, \ 422 int timeout); } 423; 424; Syscalls 210-219 are reserved for dynamically loaded syscalls 425; 426#if defined(LKM) || !defined(_KERNEL) 427210 NODEF { int sys_lkmnosys(void); } 428211 NODEF { int sys_lkmnosys(void); } 429212 NODEF { int sys_lkmnosys(void); } 430213 NODEF { int sys_lkmnosys(void); } 431214 NODEF { int sys_lkmnosys(void); } 432215 NODEF { int sys_lkmnosys(void); } 433216 NODEF { int sys_lkmnosys(void); } 434217 NODEF { int sys_lkmnosys(void); } 435218 NODEF { int sys_lkmnosys(void); } 436219 NODEF { int sys_lkmnosys(void); } 437#else /* !LKM */ 438210 EXCL lkmnosys 439211 EXCL lkmnosys 440212 EXCL lkmnosys 441213 EXCL lkmnosys 442214 EXCL lkmnosys 443215 EXCL lkmnosys 444216 EXCL lkmnosys 445217 EXCL lkmnosys 446218 EXCL lkmnosys 447219 EXCL lkmnosys 448#endif /* !LKM */ 449; System calls 220-300 are reserved for use by NetBSD 450#if defined(SYSVSEM) || !defined(_KERNEL) 451220 COMPAT_14 MPSAFE { int sys___semctl(int semid, int semnum, int cmd, \ 452 union __semun *arg); } 453221 STD MPSAFE { int sys_semget(key_t key, int nsems, int semflg); } 454222 STD MPSAFE { int sys_semop(int semid, struct sembuf *sops, \ 455 size_t nsops); } 456223 STD MPSAFE { int sys_semconfig(int flag); } 457#else 458220 EXCL compat_14_semctl 459221 EXCL semget 460222 EXCL semop 461223 EXCL semconfig 462#endif 463#if defined(SYSVMSG) || !defined(_KERNEL) 464224 COMPAT_14 MPSAFE { int sys_msgctl(int msqid, int cmd, \ 465 struct msqid_ds14 *buf); } 466225 STD MPSAFE { int sys_msgget(key_t key, int msgflg); } 467226 STD MPSAFE { int sys_msgsnd(int msqid, const void *msgp, \ 468 size_t msgsz, int msgflg); } 469227 STD MPSAFE { ssize_t sys_msgrcv(int msqid, void *msgp, \ 470 size_t msgsz, long msgtyp, int msgflg); } 471#else 472224 EXCL compat_14_msgctl 473225 EXCL msgget 474226 EXCL msgsnd 475227 EXCL msgrcv 476#endif 477#if defined(SYSVSHM) || !defined(_KERNEL) 478228 STD MPSAFE { void *sys_shmat(int shmid, const void *shmaddr, \ 479 int shmflg); } 480229 COMPAT_14 MPSAFE { int sys_shmctl(int shmid, int cmd, \ 481 struct shmid_ds14 *buf); } 482230 STD MPSAFE { int sys_shmdt(const void *shmaddr); } 483231 STD MPSAFE { int sys_shmget(key_t key, size_t size, int shmflg); } 484#else 485228 EXCL shmat 486229 EXCL compat_14_shmctl 487230 EXCL shmdt 488231 EXCL shmget 489#endif 490232 STD MPSAFE { int sys_clock_gettime(clockid_t clock_id, \ 491 struct timespec *tp); } 492233 STD MPSAFE { int sys_clock_settime(clockid_t clock_id, \ 493 const struct timespec *tp); } 494234 STD MPSAFE { int sys_clock_getres(clockid_t clock_id, \ 495 struct timespec *tp); } 496235 STD { int sys_timer_create(clockid_t clock_id, \ 497 struct sigevent *evp, timer_t *timerid); } 498236 STD { int sys_timer_delete(timer_t timerid); } 499237 STD { int sys_timer_settime(timer_t timerid, int flags, \ 500 const struct itimerspec *value, \ 501 struct itimerspec *ovalue); } 502238 STD { int sys_timer_gettime(timer_t timerid, struct \ 503 itimerspec *value); } 504239 STD { int sys_timer_getoverrun(timer_t timerid); } 505; 506; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 507; 508240 STD MPSAFE { int sys_nanosleep(const struct timespec *rqtp, \ 509 struct timespec *rmtp); } 510241 STD MPSAFE { int sys_fdatasync(int fd); } 511242 STD MPSAFE { int sys_mlockall(int flags); } 512243 STD MPSAFE { int sys_munlockall(void); } 513244 STD MPSAFE { int sys___sigtimedwait(const sigset_t *set, \ 514 siginfo_t *info, \ 515 struct timespec *timeout); } 516245 UNIMPL sys_sigqueue 517246 STD MPSAFE { int sys_modctl(int cmd, void *arg); } 518#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC)) 519247 STD MPSAFE { int sys__ksem_init(unsigned int value, semid_t *idp); } 520248 STD MPSAFE { int sys__ksem_open(const char *name, int oflag, \ 521 mode_t mode, unsigned int value, semid_t *idp); } 522249 STD MPSAFE { int sys__ksem_unlink(const char *name); } 523250 STD MPSAFE { int sys__ksem_close(semid_t id); } 524251 STD MPSAFE { int sys__ksem_post(semid_t id); } 525252 STD MPSAFE { int sys__ksem_wait(semid_t id); } 526253 STD MPSAFE { int sys__ksem_trywait(semid_t id); } 527254 STD MPSAFE { int sys__ksem_getvalue(semid_t id, \ 528 unsigned int *value); } 529255 STD MPSAFE { int sys__ksem_destroy(semid_t id); } 530256 UNIMPL sys__ksem_timedwait 531#else 532247 EXCL sys__ksem_init 533248 EXCL sys__ksem_open 534249 EXCL sys__ksem_unlink 535250 EXCL sys__ksem_close 536251 EXCL sys__ksem_post 537252 EXCL sys__ksem_wait 538253 EXCL sys__ksem_trywait 539254 EXCL sys__ksem_getvalue 540255 EXCL sys__ksem_destroy 541256 UNIMPL sys__ksem_timedwait 542#endif 543257 STD MPSAFE { mqd_t sys_mq_open(const char * name, int oflag, \ 544 mode_t mode, struct mq_attr *attr); } 545258 STD MPSAFE { int sys_mq_close(mqd_t mqdes); } 546259 STD MPSAFE { int sys_mq_unlink(const char *name); } 547260 STD MPSAFE { int sys_mq_getattr(mqd_t mqdes, \ 548 struct mq_attr *mqstat); } 549261 STD MPSAFE { int sys_mq_setattr(mqd_t mqdes, \ 550 const struct mq_attr *mqstat, \ 551 struct mq_attr *omqstat); } 552262 STD MPSAFE { int sys_mq_notify(mqd_t mqdes, \ 553 const struct sigevent *notification); } 554263 STD MPSAFE { int sys_mq_send(mqd_t mqdes, const char *msg_ptr, \ 555 size_t msg_len, unsigned msg_prio); } 556264 STD MPSAFE { ssize_t sys_mq_receive(mqd_t mqdes, char *msg_ptr, \ 557 size_t msg_len, unsigned *msg_prio); } 558265 STD MPSAFE { int sys_mq_timedsend(mqd_t mqdes, \ 559 const char *msg_ptr, size_t msg_len, \ 560 unsigned msg_prio, \ 561 const struct timespec *abs_timeout); } 562266 STD MPSAFE { ssize_t sys_mq_timedreceive(mqd_t mqdes, \ 563 char *msg_ptr, size_t msg_len, unsigned *msg_prio, \ 564 const struct timespec *abs_timeout); } 565267 UNIMPL 566268 UNIMPL 567269 UNIMPL 568270 STD MPSAFE { int sys___posix_rename(const char *from, \ 569 const char *to); } 570271 STD MPSAFE { int sys_swapctl(int cmd, void *arg, int misc); } 571272 COMPAT_30 MPSAFE { int sys_getdents(int fd, char *buf, size_t count); } 572273 STD MPSAFE { int sys_minherit(void *addr, size_t len, \ 573 int inherit); } 574274 STD MPSAFE { int sys_lchmod(const char *path, mode_t mode); } 575275 STD MPSAFE { int sys_lchown(const char *path, uid_t uid, \ 576 gid_t gid); } 577276 STD MPSAFE { int sys_lutimes(const char *path, \ 578 const struct timeval *tptr); } 579277 STD MPSAFE { int sys___msync13(void *addr, size_t len, int flags); } 580278 COMPAT_30 MPSAFE { int sys___stat13(const char *path, struct stat13 *ub); } 581279 COMPAT_30 MPSAFE { int sys___fstat13(int fd, struct stat13 *sb); } 582280 COMPAT_30 MPSAFE { int sys___lstat13(const char *path, struct stat13 *ub); } 583281 STD MPSAFE { int sys___sigaltstack14( \ 584 const struct sigaltstack *nss, \ 585 struct sigaltstack *oss); } 586282 STD MPSAFE { int sys___vfork14(void); } 587283 STD MPSAFE { int sys___posix_chown(const char *path, uid_t uid, \ 588 gid_t gid); } 589284 STD MPSAFE { int sys___posix_fchown(int fd, uid_t uid, \ 590 gid_t gid); } 591285 STD MPSAFE { int sys___posix_lchown(const char *path, uid_t uid, \ 592 gid_t gid); } 593286 STD MPSAFE { pid_t sys_getsid(pid_t pid); } 594287 STD MPSAFE { pid_t sys___clone(int flags, void *stack); } 595288 STD MPSAFE { int sys_fktrace(int fd, int ops, \ 596 int facs, int pid); } 597289 STD MPSAFE { ssize_t sys_preadv(int fd, \ 598 const struct iovec *iovp, int iovcnt, \ 599 int pad, off_t offset); } 600290 STD MPSAFE { ssize_t sys_pwritev(int fd, \ 601 const struct iovec *iovp, int iovcnt, \ 602 int pad, off_t offset); } 603291 COMPAT_16 MPSAFE { int sys___sigaction14(int signum, \ 604 const struct sigaction *nsa, \ 605 struct sigaction *osa); } 606292 STD MPSAFE { int sys___sigpending14(sigset_t *set); } 607293 STD MPSAFE { int sys___sigprocmask14(int how, \ 608 const sigset_t *set, \ 609 sigset_t *oset); } 610294 STD MPSAFE { int sys___sigsuspend14(const sigset_t *set); } 611295 COMPAT_16 MPSAFE { int sys___sigreturn14(struct sigcontext *sigcntxp); } 612296 STD MPSAFE { int sys___getcwd(char *bufp, size_t length); } 613297 STD MPSAFE { int sys_fchroot(int fd); } 614298 COMPAT_30 MPSAFE { int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); } 615299 COMPAT_30 MPSAFE { int sys_fhstat(const struct compat_30_fhandle *fhp, \ 616 struct stat13 *sb); } 617300 COMPAT_20 MPSAFE { int sys_fhstatfs(const struct compat_30_fhandle *fhp, \ 618 struct statfs12 *buf); } 619#if defined(SYSVSEM) || !defined(_KERNEL) 620301 STD MPSAFE { int sys_____semctl13(int semid, int semnum, int cmd, \ 621 ... union __semun *arg); } 622#else 623301 EXCL ____semctl13 624#endif 625#if defined(SYSVMSG) || !defined(_KERNEL) 626302 STD MPSAFE { int sys___msgctl13(int msqid, int cmd, \ 627 struct msqid_ds *buf); } 628#else 629302 EXCL __msgctl13 630#endif 631#if defined(SYSVSHM) || !defined(_KERNEL) 632303 STD MPSAFE { int sys___shmctl13(int shmid, int cmd, \ 633 struct shmid_ds *buf); } 634#else 635303 EXCL __shmctl13 636#endif 637304 STD MPSAFE { int sys_lchflags(const char *path, u_long flags); } 638305 STD MPSAFE { int sys_issetugid(void); } 639306 STD MPSAFE { int sys_utrace(const char *label, void *addr, \ 640 size_t len); } 641307 STD MPSAFE { int sys_getcontext(struct __ucontext *ucp); } 642308 STD MPSAFE { int sys_setcontext(const struct __ucontext *ucp); } 643309 STD MPSAFE { int sys__lwp_create(const struct __ucontext *ucp, \ 644 u_long flags, lwpid_t *new_lwp); } 645310 STD MPSAFE { int sys__lwp_exit(void); } 646311 STD MPSAFE { lwpid_t sys__lwp_self(void); } 647312 STD MPSAFE { int sys__lwp_wait(lwpid_t wait_for, \ 648 lwpid_t *departed); } 649313 STD MPSAFE { int sys__lwp_suspend(lwpid_t target); } 650314 STD MPSAFE { int sys__lwp_continue(lwpid_t target); } 651315 STD MPSAFE { int sys__lwp_wakeup(lwpid_t target); } 652316 STD MPSAFE { void *sys__lwp_getprivate(void); } 653317 STD MPSAFE { void sys__lwp_setprivate(void *ptr); } 654318 STD MPSAFE { int sys__lwp_kill(lwpid_t target, int signo); } 655319 STD MPSAFE { int sys__lwp_detach(lwpid_t target); } 656320 STD MPSAFE { int sys__lwp_park(const struct timespec *ts, \ 657 lwpid_t unpark, const void *hint, \ 658 const void *unparkhint); } 659321 STD MPSAFE { int sys__lwp_unpark(lwpid_t target, const void *hint); } 660322 STD MPSAFE { ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \ 661 size_t ntargets, const void *hint); } 662323 STD MPSAFE { int sys__lwp_setname(lwpid_t target, \ 663 const char *name); } 664324 STD MPSAFE { int sys__lwp_getname(lwpid_t target, \ 665 char *name, size_t len); } 666325 STD MPSAFE { int sys__lwp_ctl(int features, \ 667 struct lwpctl **address); } 668; Syscalls 326-339 reserved for LWP syscalls. 669326 UNIMPL 670327 UNIMPL 671328 UNIMPL 672329 UNIMPL 673; Obsolete SA system calls. Must remain until libc's major version is bumped. 674330 STD MPSAFE { int sys_sa_register(void); } 675331 STD MPSAFE { int sys_sa_stacks(void); } 676332 STD MPSAFE { int sys_sa_enable(void); } 677333 STD MPSAFE { int sys_sa_setconcurrency(void); } 678334 STD MPSAFE { int sys_sa_yield(void); } 679335 STD MPSAFE { int sys_sa_preempt(void); } 680336 STD MPSAFE { int sys_sa_unblockyield(void); } 681337 UNIMPL 682338 UNIMPL 683339 UNIMPL 684340 STD MPSAFE { int sys___sigaction_sigtramp(int signum, \ 685 const struct sigaction *nsa, \ 686 struct sigaction *osa, \ 687 const void *tramp, int vers); } 688341 STD { int sys_pmc_get_info(int ctr, int op, void *args); } 689342 STD { int sys_pmc_control(int ctr, int op, void *args); } 690343 STD MPSAFE { int sys_rasctl(void *addr, size_t len, int op); } 691344 STD { int sys_kqueue(void); } 692345 STD { int sys_kevent(int fd, \ 693 const struct kevent *changelist, size_t nchanges, \ 694 struct kevent *eventlist, size_t nevents, \ 695 const struct timespec *timeout); } 696 697; Scheduling system calls. 698346 STD MPSAFE { int sys__sched_setparam(pid_t pid, lwpid_t lid, \ 699 int policy, const struct sched_param *params); } 700347 STD MPSAFE { int sys__sched_getparam(pid_t pid, lwpid_t lid, \ 701 int *policy, struct sched_param *params); } 702348 STD MPSAFE { int sys__sched_setaffinity(pid_t pid, lwpid_t lid, \ 703 size_t size, void *cpuset); } 704349 STD MPSAFE { int sys__sched_getaffinity(pid_t pid, lwpid_t lid, \ 705 size_t size, void *cpuset); } 706350 STD MPSAFE { int sys_sched_yield(void); } 707351 UNIMPL 708352 UNIMPL 709353 UNIMPL 710 711354 STD MPSAFE { int sys_fsync_range(int fd, int flags, off_t start, \ 712 off_t length); } 713355 STD MPSAFE { int sys_uuidgen(struct uuid *store, int count); } 714356 STD MPSAFE { int sys_getvfsstat(struct statvfs *buf, \ 715 size_t bufsize, int flags); } 716357 STD MPSAFE { int sys_statvfs1(const char *path, \ 717 struct statvfs *buf, int flags); } 718358 STD MPSAFE { int sys_fstatvfs1(int fd, struct statvfs *buf, \ 719 int flags); } 720359 COMPAT_30 MPSAFE { int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \ 721 struct statvfs *buf, int flags); } 722360 STD MPSAFE { int sys_extattrctl(const char *path, int cmd, \ 723 const char *filename, int attrnamespace, \ 724 const char *attrname); } 725361 STD MPSAFE { int sys_extattr_set_file(const char *path, \ 726 int attrnamespace, const char *attrname, \ 727 const void *data, size_t nbytes); } 728362 STD MPSAFE { ssize_t sys_extattr_get_file(const char *path, \ 729 int attrnamespace, const char *attrname, \ 730 void *data, size_t nbytes); } 731363 STD MPSAFE { int sys_extattr_delete_file(const char *path, \ 732 int attrnamespace, const char *attrname); } 733364 STD MPSAFE { int sys_extattr_set_fd(int fd, \ 734 int attrnamespace, const char *attrname, \ 735 const void *data, size_t nbytes); } 736365 STD MPSAFE { ssize_t sys_extattr_get_fd(int fd, \ 737 int attrnamespace, const char *attrname, \ 738 void *data, size_t nbytes); } 739366 STD MPSAFE { int sys_extattr_delete_fd(int fd, \ 740 int attrnamespace, const char *attrname); } 741367 STD MPSAFE { int sys_extattr_set_link(const char *path, \ 742 int attrnamespace, const char *attrname, \ 743 const void *data, size_t nbytes); } 744368 STD MPSAFE { ssize_t sys_extattr_get_link(const char *path, \ 745 int attrnamespace, const char *attrname, \ 746 void *data, size_t nbytes); } 747369 STD MPSAFE { int sys_extattr_delete_link(const char *path, \ 748 int attrnamespace, const char *attrname); } 749370 STD MPSAFE { ssize_t sys_extattr_list_fd(int fd, \ 750 int attrnamespace, void *data, size_t nbytes); } 751371 STD MPSAFE { ssize_t sys_extattr_list_file(const char *path, \ 752 int attrnamespace, void *data, size_t nbytes); } 753372 STD MPSAFE { ssize_t sys_extattr_list_link(const char *path, \ 754 int attrnamespace, void *data, size_t nbytes); } 755373 STD MPSAFE { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ 756 fd_set *ex, const struct timespec *ts, \ 757 const sigset_t *mask); } 758374 STD MPSAFE { int sys_pollts(struct pollfd *fds, u_int nfds, \ 759 const struct timespec *ts, const sigset_t *mask); } 760375 STD MPSAFE { int sys_setxattr(const char *path, \ 761 const char *name, void *value, size_t size, \ 762 int flags); } 763376 STD MPSAFE { int sys_lsetxattr(const char *path, \ 764 const char *name, void *value, size_t size, \ 765 int flags); } 766377 STD MPSAFE { int sys_fsetxattr(int fd, \ 767 const char *name, void *value, size_t size, \ 768 int flags); } 769378 STD MPSAFE { int sys_getxattr(const char *path, \ 770 const char *name, void *value, size_t size); } 771379 STD MPSAFE { int sys_lgetxattr(const char *path, \ 772 const char *name, void *value, size_t size); } 773380 STD MPSAFE { int sys_fgetxattr(int fd, \ 774 const char *name, void *value, size_t size); } 775381 STD MPSAFE { int sys_listxattr(const char *path, \ 776 char *list, size_t size); } 777382 STD MPSAFE { int sys_llistxattr(const char *path, \ 778 char *list, size_t size); } 779383 STD MPSAFE { int sys_flistxattr(int fd, \ 780 char *list, size_t size); } 781384 STD MPSAFE { int sys_removexattr(const char *path, \ 782 const char *name); } 783385 STD MPSAFE { int sys_lremovexattr(const char *path, \ 784 const char *name); } 785386 STD MPSAFE { int sys_fremovexattr(int fd, \ 786 const char *name); } 787387 STD MPSAFE { int sys___stat30(const char *path, struct stat *ub); } 788388 STD MPSAFE { int sys___fstat30(int fd, struct stat *sb); } 789389 STD MPSAFE { int sys___lstat30(const char *path, struct stat *ub); } 790390 STD MPSAFE { int sys___getdents30(int fd, char *buf, size_t count); } 791391 COMPAT_40 MPSAFE { int sys_posix_fadvise(int fd, off_t offset, \ 792 off_t len, int advice); } 793392 COMPAT_30 MPSAFE { int sys___fhstat30(const struct compat_30_fhandle \ 794 *fhp, struct stat *sb); } 795393 STD { int sys___ntp_gettime30(struct ntptimeval *ntvp); } 796394 STD { int sys___socket30(int domain, int type, int protocol); } 797395 STD MPSAFE { int sys___getfh30(const char *fname, void *fhp, \ 798 size_t *fh_size); } 799396 STD MPSAFE { int sys___fhopen40(const void *fhp, size_t fh_size,\ 800 int flags); } 801397 STD MPSAFE { int sys___fhstatvfs140(const void *fhp, \ 802 size_t fh_size, struct statvfs *buf, int flags); } 803398 STD MPSAFE { int sys___fhstat40(const void *fhp, \ 804 size_t fh_size, struct stat *sb); } 805 806; Asynchronous I/O system calls 807399 STD MPSAFE { int sys_aio_cancel(int fildes, struct aiocb *aiocbp); } 808400 STD MPSAFE { int sys_aio_error(const struct aiocb *aiocbp); } 809401 STD MPSAFE { int sys_aio_fsync(int op, struct aiocb *aiocbp); } 810402 STD MPSAFE { int sys_aio_read(struct aiocb *aiocbp); } 811403 STD MPSAFE { int sys_aio_return(struct aiocb *aiocbp); } 812404 STD MPSAFE { int sys_aio_suspend(const struct aiocb *const *list, \ 813 int nent, const struct timespec *timeout); } 814405 STD MPSAFE { int sys_aio_write(struct aiocb *aiocbp); } 815406 STD MPSAFE { int sys_lio_listio(int mode, struct aiocb *const *list, \ 816 int nent, struct sigevent *sig); } 817 818407 UNIMPL 819408 UNIMPL 820409 UNIMPL 821 822410 STD { int sys___mount50(const char *type, \ 823 const char *path, int flags, void *data, \ 824 size_t data_len); } 825411 STD MPSAFE { void *sys_mremap(void *old_address, size_t old_size, \ 826 void *new_address, size_t new_size, int flags); } 827 828; Processor-sets system calls 829412 STD MPSAFE { int sys_pset_create(psetid_t *psid); } 830413 STD MPSAFE { int sys_pset_destroy(psetid_t psid); } 831414 STD MPSAFE { int sys_pset_assign(psetid_t psid, cpuid_t cpuid, \ 832 psetid_t *opsid); } 833415 STD MPSAFE { int sys__pset_bind(idtype_t idtype, id_t first_id, \ 834 id_t second_id, psetid_t psid, psetid_t *opsid); } 835416 STD MPSAFE { int sys___posix_fadvise50(int fd, int pad, \ 836 off_t offset, off_t len, int advice); } 837