syscalls.master revision 1.184
1 $NetBSD: syscalls.master,v 1.184 2008/01/15 03:37:11 rmind 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 517; 518; Syscall 246 is free for any use 519; 520246 UNIMPL 521#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC)) 522247 STD MPSAFE { int sys__ksem_init(unsigned int value, semid_t *idp); } 523248 STD MPSAFE { int sys__ksem_open(const char *name, int oflag, \ 524 mode_t mode, unsigned int value, semid_t *idp); } 525249 STD MPSAFE { int sys__ksem_unlink(const char *name); } 526250 STD MPSAFE { int sys__ksem_close(semid_t id); } 527251 STD MPSAFE { int sys__ksem_post(semid_t id); } 528252 STD MPSAFE { int sys__ksem_wait(semid_t id); } 529253 STD MPSAFE { int sys__ksem_trywait(semid_t id); } 530254 STD MPSAFE { int sys__ksem_getvalue(semid_t id, \ 531 unsigned int *value); } 532255 STD MPSAFE { int sys__ksem_destroy(semid_t id); } 533256 UNIMPL sys__ksem_timedwait 534#else 535247 EXCL sys__ksem_init 536248 EXCL sys__ksem_open 537249 EXCL sys__ksem_unlink 538250 EXCL sys__ksem_close 539251 EXCL sys__ksem_post 540252 EXCL sys__ksem_wait 541253 EXCL sys__ksem_trywait 542254 EXCL sys__ksem_getvalue 543255 EXCL sys__ksem_destroy 544256 UNIMPL sys__ksem_timedwait 545#endif 546257 STD MPSAFE { mqd_t sys_mq_open(const char * name, int oflag, \ 547 mode_t mode, struct mq_attr *attr); } 548258 STD MPSAFE { int sys_mq_close(mqd_t mqdes); } 549259 STD MPSAFE { int sys_mq_unlink(const char *name); } 550260 STD MPSAFE { int sys_mq_getattr(mqd_t mqdes, \ 551 struct mq_attr *mqstat); } 552261 STD MPSAFE { int sys_mq_setattr(mqd_t mqdes, \ 553 const struct mq_attr *mqstat, \ 554 struct mq_attr *omqstat); } 555262 STD MPSAFE { int sys_mq_notify(mqd_t mqdes, \ 556 const struct sigevent *notification); } 557263 STD MPSAFE { int sys_mq_send(mqd_t mqdes, const char *msg_ptr, \ 558 size_t msg_len, unsigned msg_prio); } 559264 STD MPSAFE { ssize_t sys_mq_receive(mqd_t mqdes, char *msg_ptr, \ 560 size_t msg_len, unsigned *msg_prio); } 561265 STD MPSAFE { int sys_mq_timedsend(mqd_t mqdes, \ 562 const char *msg_ptr, size_t msg_len, \ 563 unsigned msg_prio, \ 564 const struct timespec *abs_timeout); } 565266 STD MPSAFE { ssize_t sys_mq_timedreceive(mqd_t mqdes, \ 566 char *msg_ptr, size_t msg_len, unsigned *msg_prio, \ 567 const struct timespec *abs_timeout); } 568267 UNIMPL 569268 UNIMPL 570269 UNIMPL 571270 STD MPSAFE { int sys___posix_rename(const char *from, \ 572 const char *to); } 573271 STD MPSAFE { int sys_swapctl(int cmd, void *arg, int misc); } 574272 COMPAT_30 MPSAFE { int sys_getdents(int fd, char *buf, size_t count); } 575273 STD MPSAFE { int sys_minherit(void *addr, size_t len, \ 576 int inherit); } 577274 STD MPSAFE { int sys_lchmod(const char *path, mode_t mode); } 578275 STD MPSAFE { int sys_lchown(const char *path, uid_t uid, \ 579 gid_t gid); } 580276 STD MPSAFE { int sys_lutimes(const char *path, \ 581 const struct timeval *tptr); } 582277 STD MPSAFE { int sys___msync13(void *addr, size_t len, int flags); } 583278 COMPAT_30 MPSAFE { int sys___stat13(const char *path, struct stat13 *ub); } 584279 COMPAT_30 MPSAFE { int sys___fstat13(int fd, struct stat13 *sb); } 585280 COMPAT_30 MPSAFE { int sys___lstat13(const char *path, struct stat13 *ub); } 586281 STD MPSAFE { int sys___sigaltstack14( \ 587 const struct sigaltstack *nss, \ 588 struct sigaltstack *oss); } 589282 STD MPSAFE { int sys___vfork14(void); } 590283 STD MPSAFE { int sys___posix_chown(const char *path, uid_t uid, \ 591 gid_t gid); } 592284 STD MPSAFE { int sys___posix_fchown(int fd, uid_t uid, \ 593 gid_t gid); } 594285 STD MPSAFE { int sys___posix_lchown(const char *path, uid_t uid, \ 595 gid_t gid); } 596286 STD MPSAFE { pid_t sys_getsid(pid_t pid); } 597287 STD MPSAFE { pid_t sys___clone(int flags, void *stack); } 598288 STD MPSAFE { int sys_fktrace(int fd, int ops, \ 599 int facs, int pid); } 600289 STD MPSAFE { ssize_t sys_preadv(int fd, \ 601 const struct iovec *iovp, int iovcnt, \ 602 int pad, off_t offset); } 603290 STD MPSAFE { ssize_t sys_pwritev(int fd, \ 604 const struct iovec *iovp, int iovcnt, \ 605 int pad, off_t offset); } 606291 COMPAT_16 MPSAFE { int sys___sigaction14(int signum, \ 607 const struct sigaction *nsa, \ 608 struct sigaction *osa); } 609292 STD MPSAFE { int sys___sigpending14(sigset_t *set); } 610293 STD MPSAFE { int sys___sigprocmask14(int how, \ 611 const sigset_t *set, \ 612 sigset_t *oset); } 613294 STD MPSAFE { int sys___sigsuspend14(const sigset_t *set); } 614295 COMPAT_16 MPSAFE { int sys___sigreturn14(struct sigcontext *sigcntxp); } 615296 STD MPSAFE { int sys___getcwd(char *bufp, size_t length); } 616297 STD MPSAFE { int sys_fchroot(int fd); } 617298 COMPAT_30 MPSAFE { int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); } 618299 COMPAT_30 MPSAFE { int sys_fhstat(const struct compat_30_fhandle *fhp, \ 619 struct stat13 *sb); } 620300 COMPAT_20 MPSAFE { int sys_fhstatfs(const struct compat_30_fhandle *fhp, \ 621 struct statfs12 *buf); } 622#if defined(SYSVSEM) || !defined(_KERNEL) 623301 STD MPSAFE { int sys_____semctl13(int semid, int semnum, int cmd, \ 624 ... union __semun *arg); } 625#else 626301 EXCL ____semctl13 627#endif 628#if defined(SYSVMSG) || !defined(_KERNEL) 629302 STD MPSAFE { int sys___msgctl13(int msqid, int cmd, \ 630 struct msqid_ds *buf); } 631#else 632302 EXCL __msgctl13 633#endif 634#if defined(SYSVSHM) || !defined(_KERNEL) 635303 STD MPSAFE { int sys___shmctl13(int shmid, int cmd, \ 636 struct shmid_ds *buf); } 637#else 638303 EXCL __shmctl13 639#endif 640304 STD MPSAFE { int sys_lchflags(const char *path, u_long flags); } 641305 STD MPSAFE { int sys_issetugid(void); } 642306 STD MPSAFE { int sys_utrace(const char *label, void *addr, \ 643 size_t len); } 644307 STD MPSAFE { int sys_getcontext(struct __ucontext *ucp); } 645308 STD MPSAFE { int sys_setcontext(const struct __ucontext *ucp); } 646309 STD MPSAFE { int sys__lwp_create(const struct __ucontext *ucp, \ 647 u_long flags, lwpid_t *new_lwp); } 648310 STD MPSAFE { int sys__lwp_exit(void); } 649311 STD MPSAFE { lwpid_t sys__lwp_self(void); } 650312 STD MPSAFE { int sys__lwp_wait(lwpid_t wait_for, \ 651 lwpid_t *departed); } 652313 STD MPSAFE { int sys__lwp_suspend(lwpid_t target); } 653314 STD MPSAFE { int sys__lwp_continue(lwpid_t target); } 654315 STD MPSAFE { int sys__lwp_wakeup(lwpid_t target); } 655316 STD MPSAFE { void *sys__lwp_getprivate(void); } 656317 STD MPSAFE { void sys__lwp_setprivate(void *ptr); } 657318 STD MPSAFE { int sys__lwp_kill(lwpid_t target, int signo); } 658319 STD MPSAFE { int sys__lwp_detach(lwpid_t target); } 659320 STD MPSAFE { int sys__lwp_park(const struct timespec *ts, \ 660 lwpid_t unpark, const void *hint, \ 661 const void *unparkhint); } 662321 STD MPSAFE { int sys__lwp_unpark(lwpid_t target, const void *hint); } 663322 STD MPSAFE { ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \ 664 size_t ntargets, const void *hint); } 665323 STD MPSAFE { int sys__lwp_setname(lwpid_t target, \ 666 const char *name); } 667324 STD MPSAFE { int sys__lwp_getname(lwpid_t target, \ 668 char *name, size_t len); } 669325 STD MPSAFE { int sys__lwp_ctl(int features, \ 670 struct lwpctl **address); } 671; Syscalls 326-339 reserved for LWP syscalls. 672326 UNIMPL 673327 UNIMPL 674328 UNIMPL 675329 UNIMPL 676; Obsolete SA system calls. Must remain until libc's major version is bumped. 677330 STD MPSAFE { int sys_sa_register(void); } 678331 STD MPSAFE { int sys_sa_stacks(void); } 679332 STD MPSAFE { int sys_sa_enable(void); } 680333 STD MPSAFE { int sys_sa_setconcurrency(void); } 681334 STD MPSAFE { int sys_sa_yield(void); } 682335 STD MPSAFE { int sys_sa_preempt(void); } 683336 STD MPSAFE { int sys_sa_unblockyield(void); } 684337 UNIMPL 685338 UNIMPL 686339 UNIMPL 687340 STD MPSAFE { int sys___sigaction_sigtramp(int signum, \ 688 const struct sigaction *nsa, \ 689 struct sigaction *osa, \ 690 const void *tramp, int vers); } 691341 STD { int sys_pmc_get_info(int ctr, int op, void *args); } 692342 STD { int sys_pmc_control(int ctr, int op, void *args); } 693343 STD MPSAFE { int sys_rasctl(void *addr, size_t len, int op); } 694344 STD { int sys_kqueue(void); } 695345 STD { int sys_kevent(int fd, \ 696 const struct kevent *changelist, size_t nchanges, \ 697 struct kevent *eventlist, size_t nevents, \ 698 const struct timespec *timeout); } 699 700; Scheduling system calls. 701346 STD MPSAFE { int sys__sched_setparam(pid_t pid, lwpid_t lid, \ 702 const struct sched_param *params); } 703347 STD MPSAFE { int sys__sched_getparam(pid_t pid, lwpid_t lid, \ 704 struct sched_param *params); } 705348 STD MPSAFE { int sys__sched_setaffinity(pid_t pid, lwpid_t lid, \ 706 size_t size, void *cpuset); } 707349 STD MPSAFE { int sys__sched_getaffinity(pid_t pid, lwpid_t lid, \ 708 size_t size, void *cpuset); } 709350 STD MPSAFE { int sys_sched_yield(void); } 710351 UNIMPL 711352 UNIMPL 712353 UNIMPL 713 714354 STD MPSAFE { int sys_fsync_range(int fd, int flags, off_t start, \ 715 off_t length); } 716355 STD MPSAFE { int sys_uuidgen(struct uuid *store, int count); } 717356 STD MPSAFE { int sys_getvfsstat(struct statvfs *buf, \ 718 size_t bufsize, int flags); } 719357 STD MPSAFE { int sys_statvfs1(const char *path, \ 720 struct statvfs *buf, int flags); } 721358 STD MPSAFE { int sys_fstatvfs1(int fd, struct statvfs *buf, \ 722 int flags); } 723359 COMPAT_30 MPSAFE { int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \ 724 struct statvfs *buf, int flags); } 725360 STD { int sys_extattrctl(const char *path, int cmd, \ 726 const char *filename, int attrnamespace, \ 727 const char *attrname); } 728361 STD { int sys_extattr_set_file(const char *path, \ 729 int attrnamespace, const char *attrname, \ 730 const void *data, size_t nbytes); } 731362 STD { ssize_t sys_extattr_get_file(const char *path, \ 732 int attrnamespace, const char *attrname, \ 733 void *data, size_t nbytes); } 734363 STD { int sys_extattr_delete_file(const char *path, \ 735 int attrnamespace, const char *attrname); } 736364 STD { int sys_extattr_set_fd(int fd, \ 737 int attrnamespace, const char *attrname, \ 738 const void *data, size_t nbytes); } 739365 STD { ssize_t sys_extattr_get_fd(int fd, \ 740 int attrnamespace, const char *attrname, \ 741 void *data, size_t nbytes); } 742366 STD { int sys_extattr_delete_fd(int fd, \ 743 int attrnamespace, const char *attrname); } 744367 STD { int sys_extattr_set_link(const char *path, \ 745 int attrnamespace, const char *attrname, \ 746 const void *data, size_t nbytes); } 747368 STD { ssize_t sys_extattr_get_link(const char *path, \ 748 int attrnamespace, const char *attrname, \ 749 void *data, size_t nbytes); } 750369 STD { int sys_extattr_delete_link(const char *path, \ 751 int attrnamespace, const char *attrname); } 752370 STD { ssize_t sys_extattr_list_fd(int fd, \ 753 int attrnamespace, void *data, size_t nbytes); } 754371 STD { ssize_t sys_extattr_list_file(const char *path, \ 755 int attrnamespace, void *data, size_t nbytes); } 756372 STD { ssize_t sys_extattr_list_link(const char *path, \ 757 int attrnamespace, void *data, size_t nbytes); } 758373 STD MPSAFE { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ 759 fd_set *ex, const struct timespec *ts, \ 760 const sigset_t *mask); } 761374 STD MPSAFE { int sys_pollts(struct pollfd *fds, u_int nfds, \ 762 const struct timespec *ts, const sigset_t *mask); } 763375 STD { int sys_setxattr(const char *path, \ 764 const char *name, void *value, size_t size, \ 765 int flags); } 766376 STD { int sys_lsetxattr(const char *path, \ 767 const char *name, void *value, size_t size, \ 768 int flags); } 769377 STD { int sys_fsetxattr(int fd, \ 770 const char *name, void *value, size_t size, \ 771 int flags); } 772378 STD { int sys_getxattr(const char *path, \ 773 const char *name, void *value, size_t size); } 774379 STD { int sys_lgetxattr(const char *path, \ 775 const char *name, void *value, size_t size); } 776380 STD { int sys_fgetxattr(int fd, \ 777 const char *name, void *value, size_t size); } 778381 STD { int sys_listxattr(const char *path, \ 779 char *list, size_t size); } 780382 STD { int sys_llistxattr(const char *path, \ 781 char *list, size_t size); } 782383 STD { int sys_flistxattr(int fd, \ 783 char *list, size_t size); } 784384 STD { int sys_removexattr(const char *path, \ 785 const char *name); } 786385 STD { int sys_lremovexattr(const char *path, \ 787 const char *name); } 788386 STD { int sys_fremovexattr(int fd, \ 789 const char *name); } 790387 STD MPSAFE { int sys___stat30(const char *path, struct stat *ub); } 791388 STD MPSAFE { int sys___fstat30(int fd, struct stat *sb); } 792389 STD MPSAFE { int sys___lstat30(const char *path, struct stat *ub); } 793390 STD MPSAFE { int sys___getdents30(int fd, char *buf, size_t count); } 794391 STD MPSAFE { int sys_posix_fadvise(int fd, off_t offset, \ 795 off_t len, int advice); } 796392 COMPAT_30 MPSAFE { int sys___fhstat30(const struct compat_30_fhandle \ 797 *fhp, struct stat *sb); } 798393 STD { int sys___ntp_gettime30(struct ntptimeval *ntvp); } 799394 STD { int sys___socket30(int domain, int type, int protocol); } 800395 STD MPSAFE { int sys___getfh30(const char *fname, void *fhp, \ 801 size_t *fh_size); } 802396 STD MPSAFE { int sys___fhopen40(const void *fhp, size_t fh_size,\ 803 int flags); } 804397 STD MPSAFE { int sys___fhstatvfs140(const void *fhp, \ 805 size_t fh_size, struct statvfs *buf, int flags); } 806398 STD MPSAFE { int sys___fhstat40(const void *fhp, \ 807 size_t fh_size, struct stat *sb); } 808 809; Asynchronous I/O system calls 810399 STD MPSAFE { int sys_aio_cancel(int fildes, struct aiocb *aiocbp); } 811400 STD MPSAFE { int sys_aio_error(const struct aiocb *aiocbp); } 812401 STD MPSAFE { int sys_aio_fsync(int op, struct aiocb *aiocbp); } 813402 STD MPSAFE { int sys_aio_read(struct aiocb *aiocbp); } 814403 STD MPSAFE { int sys_aio_return(struct aiocb *aiocbp); } 815404 STD MPSAFE { int sys_aio_suspend(const struct aiocb *const *list, \ 816 int nent, const struct timespec *timeout); } 817405 STD MPSAFE { int sys_aio_write(struct aiocb *aiocbp); } 818406 STD MPSAFE { int sys_lio_listio(int mode, struct aiocb *const *list, \ 819 int nent, struct sigevent *sig); } 820 821407 UNIMPL 822408 UNIMPL 823409 UNIMPL 824 825410 STD { int sys___mount50(const char *type, \ 826 const char *path, int flags, void *data, \ 827 size_t data_len); } 828411 STD MPSAFE { void *sys_mremap(void *old_address, size_t old_size, \ 829 void *new_address, size_t new_size, int flags); } 830 831; Processor-sets system calls 832412 STD MPSAFE { int sys_pset_create(psetid_t *psid); } 833413 STD MPSAFE { int sys_pset_destroy(psetid_t psid); } 834414 STD MPSAFE { int sys_pset_assign(psetid_t psid, cpuid_t cpuid, \ 835 psetid_t *opsid); } 836415 STD MPSAFE { int sys__pset_bind(idtype_t idtype, id_t first_id, \ 837 id_t second_id, psetid_t psid, psetid_t *opsid); } 838