syscalls.master revision 1.190
1 $NetBSD: syscalls.master,v 1.190 2008/02/24 12:52:54 martin 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, IGNORED, 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; IGNORED syscall is a null op, but always succeeds 20; UNIMPL unimplemented, not included in system 21; EXCL implemented, but not included in system 22; NODEF included, but don't define the syscall number 23; NOARGS included, but don't define the syscall args structure 24; INDIR included, but don't define the syscall args structure, 25; and allow it to be "really" varargs. 26; 27; The compat options are defined in the syscalls.conf file, and the 28; compat option name is prefixed to the syscall name. Other than 29; that, they're like NODEF (for 'compat' options), or STD (for 30; 'libcompat' options). 31; 32; The type-dependent arguments are as follows: 33; For STD, NODEF, NOARGS, and compat syscalls: 34; { pseudo-proto } [alias] 35; For other syscalls: 36; [comment] 37; 38; #ifdef's, etc. may be included, and are copied to the output files. 39; #include's are copied to the syscall names and switch definition files only. 40 41#include "opt_nfsserver.h" 42#include "opt_ntp.h" 43#include "opt_compat_netbsd.h" 44#include "opt_sysv.h" 45#include "opt_compat_43.h" 46#include "opt_posix.h" 47 48#include "fs_lfs.h" 49#include "fs_nfs.h" 50 51#include <sys/param.h> 52#include <sys/systm.h> 53#include <sys/signal.h> 54#include <sys/mount.h> 55#include <sys/syscallargs.h> 56 57%% 58 59; Reserved/unimplemented system calls in the range 0-150 inclusive 60; are reserved for use in future Berkeley releases. 61; Additional system calls implemented in vendor and other 62; redistributions should be placed in the reserved range at the end 63; of the current calls. 64 650 INDIR { int sys_syscall(int code, \ 66 ... register_t args[SYS_MAXSYSARGS]); } 671 STD MPSAFE { void sys_exit(int rval); } 682 STD MPSAFE { int sys_fork(void); } 693 STD MPSAFE { ssize_t sys_read(int fd, void *buf, size_t nbyte); } 704 STD MPSAFE { ssize_t sys_write(int fd, const void *buf, \ 71 size_t nbyte); } 725 STD MPSAFE { int sys_open(const char *path, \ 73 int flags, ... mode_t mode); } 746 STD MPSAFE { int sys_close(int fd); } 757 STD MPSAFE { int sys_wait4(int pid, int *status, int options, \ 76 struct rusage *rusage); } 778 COMPAT_43 MPSAFE { int sys_creat(const char *path, mode_t mode); } ocreat 789 STD MPSAFE { int sys_link(const char *path, const char *link); } 7910 STD MPSAFE { int sys_unlink(const char *path); } 8011 OBSOL execv 8112 STD MPSAFE { int sys_chdir(const char *path); } 8213 STD MPSAFE { int sys_fchdir(int fd); } 8314 STD MPSAFE { int sys_mknod(const char *path, mode_t mode, \ 84 dev_t dev); } 8515 STD MPSAFE { int sys_chmod(const char *path, mode_t mode); } 8616 STD MPSAFE { int sys_chown(const char *path, uid_t uid, \ 87 gid_t gid); } 8817 STD MPSAFE { int sys_obreak(char *nsize); } break 8918 COMPAT_20 MPSAFE { int sys_getfsstat(struct statfs12 *buf, \ 90 long bufsize, int flags); } 9119 COMPAT_43 MPSAFE { long sys_lseek(int fd, long offset, int whence); } \ 92 olseek 93#ifdef COMPAT_43 9420 STD MPSAFE { pid_t sys_getpid_with_ppid(void); } getpid 95#else 9620 STD MPSAFE { pid_t sys_getpid(void); } 97#endif 9821 COMPAT_40 MPSAFE { int sys_mount(const char *type, const char *path, \ 99 int flags, void *data); } 10022 STD MPSAFE { int sys_unmount(const char *path, int flags); } 10123 STD MPSAFE { int sys_setuid(uid_t uid); } 102#ifdef COMPAT_43 10324 STD MPSAFE { uid_t sys_getuid_with_euid(void); } getuid 104#else 10524 STD MPSAFE { uid_t sys_getuid(void); } 106#endif 10725 STD MPSAFE { uid_t sys_geteuid(void); } 10826 STD MPSAFE { int sys_ptrace(int req, pid_t pid, void *addr, \ 109 int data); } 11027 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ 111 int flags); } 11228 STD { ssize_t sys_sendmsg(int s, \ 113 const struct msghdr *msg, int flags); } 11429 STD { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ 115 int flags, struct sockaddr *from, \ 116 unsigned int *fromlenaddr); } 11730 STD { int sys_accept(int s, struct sockaddr *name, \ 118 unsigned int *anamelen); } 11931 STD { int sys_getpeername(int fdes, struct sockaddr *asa, \ 120 unsigned int *alen); } 12132 STD { int sys_getsockname(int fdes, struct sockaddr *asa, \ 122 unsigned int *alen); } 12333 STD MPSAFE { int sys_access(const char *path, int flags); } 12434 STD MPSAFE { int sys_chflags(const char *path, u_long flags); } 12535 STD MPSAFE { int sys_fchflags(int fd, u_long flags); } 12636 STD MPSAFE { void sys_sync(void); } 12737 STD MPSAFE { int sys_kill(int pid, int signum); } 12838 COMPAT_43 MPSAFE { int sys_stat(const char *path, struct stat43 *ub); } \ 129 stat43 13039 STD MPSAFE { pid_t sys_getppid(void); } 13140 COMPAT_43 MPSAFE { int sys_lstat(const char *path, \ 132 struct stat43 *ub); } lstat43 13341 STD MPSAFE { int sys_dup(int fd); } 13442 STD MPSAFE { int sys_pipe(void); } 13543 STD MPSAFE { gid_t sys_getegid(void); } 13644 STD MPSAFE { int sys_profil(char *samples, size_t size, \ 137 u_long offset, u_int scale); } 13845 STD MPSAFE { int sys_ktrace(const char *fname, int ops, \ 139 int facs, int pid); } 14046 COMPAT_13 MPSAFE { int sys_sigaction(int signum, \ 141 const struct sigaction13 *nsa, \ 142 struct sigaction13 *osa); } sigaction13 143#ifdef COMPAT_43 14447 STD MPSAFE { gid_t sys_getgid_with_egid(void); } getgid 145#else 14647 STD MPSAFE { gid_t sys_getgid(void); } 147#endif 14848 COMPAT_13 MPSAFE { int sys_sigprocmask(int how, \ 149 int mask); } sigprocmask13 15049 STD MPSAFE { int sys___getlogin(char *namebuf, size_t namelen); } 15150 STD MPSAFE { int sys___setlogin(const char *namebuf); } 15251 STD MPSAFE { int sys_acct(const char *path); } 15352 COMPAT_13 MPSAFE { int sys_sigpending(void); } sigpending13 15453 COMPAT_13 MPSAFE { int sys_sigaltstack( \ 155 const struct sigaltstack13 *nss, \ 156 struct sigaltstack13 *oss); } sigaltstack13 15754 STD MPSAFE { int sys_ioctl(int fd, \ 158 u_long com, ... void *data); } 15955 COMPAT_12 { int sys_reboot(int opt); } oreboot 16056 STD MPSAFE { int sys_revoke(const char *path); } 16157 STD MPSAFE { int sys_symlink(const char *path, \ 162 const char *link); } 16358 STD MPSAFE { ssize_t sys_readlink(const char *path, char *buf, \ 164 size_t count); } 16559 STD MPSAFE { int sys_execve(const char *path, \ 166 char * const *argp, char * const *envp); } 16760 STD MPSAFE { mode_t sys_umask(mode_t newmask); } 16861 STD MPSAFE { int sys_chroot(const char *path); } 16962 COMPAT_43 MPSAFE { int sys_fstat(int fd, struct stat43 *sb); } fstat43 17063 COMPAT_43 MPSAFE { int sys_getkerninfo(int op, char *where, int *size, \ 171 int arg); } ogetkerninfo 17264 COMPAT_43 MPSAFE { int sys_getpagesize(void); } ogetpagesize 17365 COMPAT_12 MPSAFE { int sys_msync(void *addr, size_t len); } 174; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 17566 STD MPSAFE { int sys_vfork(void); } 17667 OBSOL vread 17768 OBSOL vwrite 17869 STD MPSAFE { int sys_sbrk(intptr_t incr); } 17970 STD MPSAFE { int sys_sstk(int incr); } 18071 COMPAT_43 MPSAFE { int sys_mmap(void *addr, size_t len, int prot, \ 181 int flags, int fd, long pos); } ommap 18272 STD MPSAFE { int sys_ovadvise(int anom); } vadvise 18373 STD MPSAFE { int sys_munmap(void *addr, size_t len); } 18474 STD MPSAFE { int sys_mprotect(void *addr, size_t len, \ 185 int prot); } 18675 STD MPSAFE { int sys_madvise(void *addr, size_t len, \ 187 int behav); } 18876 OBSOL vhangup 18977 OBSOL vlimit 19078 STD MPSAFE { int sys_mincore(void *addr, size_t len, \ 191 char *vec); } 19279 STD MPSAFE { int sys_getgroups(int gidsetsize, \ 193 gid_t *gidset); } 19480 STD MPSAFE { int sys_setgroups(int gidsetsize, \ 195 const gid_t *gidset); } 19681 STD MPSAFE { int sys_getpgrp(void); } 19782 STD MPSAFE { int sys_setpgid(int pid, int pgid); } 19883 STD { int sys_setitimer(int which, \ 199 const struct itimerval *itv, \ 200 struct itimerval *oitv); } 20184 COMPAT_43 MPSAFE { int sys_wait(void); } owait 20285 COMPAT_12 MPSAFE { int sys_swapon(const char *name); } oswapon 20386 STD { int sys_getitimer(int which, \ 204 struct itimerval *itv); } 20587 COMPAT_43 MPSAFE { int sys_gethostname(char *hostname, u_int len); } \ 206 ogethostname 20788 COMPAT_43 MPSAFE { int sys_sethostname(char *hostname, u_int len); } \ 208 osethostname 20989 COMPAT_43 MPSAFE { int sys_getdtablesize(void); } ogetdtablesize 21090 STD MPSAFE { int sys_dup2(int from, int to); } 21191 UNIMPL getdopt 21292 STD MPSAFE { int sys_fcntl(int fd, int cmd, ... void *arg); } 21393 STD MPSAFE { int sys_select(int nd, fd_set *in, fd_set *ou, \ 214 fd_set *ex, struct timeval *tv); } 21594 UNIMPL setdopt 21695 STD MPSAFE { int sys_fsync(int fd); } 21796 STD MPSAFE { int sys_setpriority(int which, id_t who, int prio); } 21897 COMPAT_30 { int sys_socket(int domain, int type, int protocol); } 21998 STD { int sys_connect(int s, const struct sockaddr *name, \ 220 unsigned int namelen); } 22199 COMPAT_43 { int sys_accept(int s, void *name, \ 222 int *anamelen); } oaccept 223100 STD MPSAFE { int sys_getpriority(int which, id_t who); } 224101 COMPAT_43 { int sys_send(int s, void *buf, int len, \ 225 int flags); } osend 226102 COMPAT_43 { int sys_recv(int s, void *buf, int len, \ 227 int flags); } orecv 228103 COMPAT_13 MPSAFE { int sys_sigreturn(struct sigcontext13 *sigcntxp); } \ 229 sigreturn13 230104 STD { int sys_bind(int s, const struct sockaddr *name, \ 231 unsigned int namelen); } 232105 STD { int sys_setsockopt(int s, int level, int name, \ 233 const void *val, unsigned int valsize); } 234106 STD { int sys_listen(int s, int backlog); } 235107 OBSOL vtimes 236108 COMPAT_43 MPSAFE { int sys_sigvec(int signum, struct sigvec *nsv, \ 237 struct sigvec *osv); } osigvec 238109 COMPAT_43 MPSAFE { int sys_sigblock(int mask); } osigblock 239110 COMPAT_43 MPSAFE { int sys_sigsetmask(int mask); } osigsetmask 240111 COMPAT_13 MPSAFE { int sys_sigsuspend(int mask); } sigsuspend13 241112 COMPAT_43 MPSAFE { int sys_sigstack(struct sigstack *nss, \ 242 struct sigstack *oss); } osigstack 243113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 244 int flags); } orecvmsg 245114 COMPAT_43 { int sys_sendmsg(int s, void *msg, int flags); } \ 246 osendmsg 247115 OBSOL vtrace 248116 STD MPSAFE { int sys_gettimeofday(struct timeval *tp, \ 249 void *tzp); } 250117 STD MPSAFE { int sys_getrusage(int who, struct rusage *rusage); } 251118 STD { int sys_getsockopt(int s, int level, int name, \ 252 void *val, unsigned int *avalsize); } 253119 OBSOL resuba 254120 STD MPSAFE { ssize_t sys_readv(int fd, \ 255 const struct iovec *iovp, int iovcnt); } 256121 STD MPSAFE { ssize_t sys_writev(int fd, \ 257 const struct iovec *iovp, int iovcnt); } 258122 STD MPSAFE { int sys_settimeofday(const struct timeval *tv, \ 259 const void *tzp); } 260123 STD MPSAFE { int sys_fchown(int fd, uid_t uid, gid_t gid); } 261124 STD MPSAFE { int sys_fchmod(int fd, mode_t mode); } 262125 COMPAT_43 { int sys_recvfrom(int s, void *buf, size_t len, \ 263 int flags, void *from, int *fromlenaddr); } \ 264 orecvfrom 265126 STD MPSAFE { int sys_setreuid(uid_t ruid, uid_t euid); } 266127 STD MPSAFE { int sys_setregid(gid_t rgid, gid_t egid); } 267128 STD MPSAFE { int sys_rename(const char *from, const char *to); } 268129 COMPAT_43 MPSAFE { int sys_truncate(const char *path, long length); } \ 269 otruncate 270130 COMPAT_43 MPSAFE { int sys_ftruncate(int fd, long length); } oftruncate 271131 STD MPSAFE { int sys_flock(int fd, int how); } 272132 STD MPSAFE { int sys_mkfifo(const char *path, mode_t mode); } 273133 STD { ssize_t sys_sendto(int s, const void *buf, \ 274 size_t len, int flags, const struct sockaddr *to, \ 275 unsigned int tolen); } 276134 STD { int sys_shutdown(int s, int how); } 277135 STD { int sys_socketpair(int domain, int type, \ 278 int protocol, int *rsv); } 279136 STD MPSAFE { int sys_mkdir(const char *path, mode_t mode); } 280137 STD MPSAFE { int sys_rmdir(const char *path); } 281138 STD MPSAFE { int sys_utimes(const char *path, \ 282 const struct timeval *tptr); } 283139 OBSOL 4.2 sigreturn 284140 STD { int sys_adjtime(const struct timeval *delta, \ 285 struct timeval *olddelta); } 286141 COMPAT_43 { int sys_getpeername(int fdes, void *asa, \ 287 int *alen); } ogetpeername 288142 COMPAT_43 MPSAFE { int32_t sys_gethostid(void); } ogethostid 289143 COMPAT_43 MPSAFE { int sys_sethostid(int32_t hostid); } osethostid 290144 COMPAT_43 MPSAFE { int sys_getrlimit(int which, \ 291 struct orlimit *rlp); } ogetrlimit 292145 COMPAT_43 MPSAFE { int sys_setrlimit(int which, \ 293 const struct orlimit *rlp); } osetrlimit 294146 COMPAT_43 MPSAFE { int sys_killpg(int pgid, int signum); } okillpg 295147 STD MPSAFE { int sys_setsid(void); } 296148 STD MPSAFE { int sys_quotactl(const char *path, int cmd, \ 297 int uid, void *arg); } 298149 COMPAT_43 MPSAFE { int sys_quota(void); } oquota 299150 COMPAT_43 { int sys_getsockname(int fdec, void *asa, \ 300 int *alen); } ogetsockname 301 302; Syscalls 151-180 inclusive are reserved for vendor-specific 303; system calls. (This includes various calls added for compatibity 304; with other Unix variants.) 305; Some of these calls are now supported by BSD... 306151 UNIMPL 307152 UNIMPL 308153 UNIMPL 309154 UNIMPL 310#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 311155 STD { int sys_nfssvc(int flag, void *argp); } 312#else 313155 EXCL nfssvc 314#endif 315156 COMPAT_43 MPSAFE { int sys_getdirentries(int fd, char *buf, \ 316 u_int count, long *basep); } ogetdirentries 317157 COMPAT_20 MPSAFE { int sys_statfs(const char *path, \ 318 struct statfs12 *buf); } 319158 COMPAT_20 MPSAFE { int sys_fstatfs(int fd, struct statfs12 *buf); } 320159 UNIMPL 321160 UNIMPL 322161 COMPAT_30 MPSAFE { int sys_getfh(const char *fname, \ 323 struct compat_30_fhandle *fhp); } 324162 COMPAT_09 MPSAFE { int sys_getdomainname(char *domainname, int len); } \ 325 ogetdomainname 326163 COMPAT_09 MPSAFE { int sys_setdomainname(char *domainname, int len); } \ 327 osetdomainname 328164 COMPAT_09 MPSAFE { int sys_uname(struct outsname *name); } ouname 329165 STD { int sys_sysarch(int op, void *parms); } 330166 UNIMPL 331167 UNIMPL 332168 UNIMPL 333; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 334#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64) 335169 COMPAT_10 MPSAFE { int sys_semsys(int which, int a2, int a3, int a4, \ 336 int a5); } osemsys 337#else 338169 EXCL 1.0 semsys 339#endif 340; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 341#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64) 342170 COMPAT_10 MPSAFE { int sys_msgsys(int which, int a2, int a3, int a4, \ 343 int a5, int a6); } omsgsys 344#else 345170 EXCL 1.0 msgsys 346#endif 347; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 348#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64) 349171 COMPAT_10 MPSAFE { int sys_shmsys(int which, int a2, int a3, int a4); } \ 350 oshmsys 351#else 352171 EXCL 1.0 shmsys 353#endif 354172 UNIMPL 355173 STD MPSAFE { ssize_t sys_pread(int fd, void *buf, \ 356 size_t nbyte, int pad, off_t offset); } 357174 STD MPSAFE { ssize_t sys_pwrite(int fd, const void *buf, \ 358 size_t nbyte, int pad, off_t offset); } 359; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded. 360175 COMPAT_30 { int sys_ntp_gettime(struct ntptimeval30 *ntvp); } 361#if defined(NTP) || !defined(_KERNEL) 362176 STD { int sys_ntp_adjtime(struct timex *tp); } 363#else 364176 EXCL ntp_adjtime 365#endif 366177 UNIMPL 367178 UNIMPL 368179 UNIMPL 369180 UNIMPL 370 371; Syscalls 180-199 are used by/reserved for BSD 372181 STD MPSAFE { int sys_setgid(gid_t gid); } 373182 STD MPSAFE { int sys_setegid(gid_t egid); } 374183 STD MPSAFE { int sys_seteuid(uid_t euid); } 375#if defined(LFS) || !defined(_KERNEL) 376184 STD { int sys_lfs_bmapv(fsid_t *fsidp, \ 377 struct block_info *blkiov, int blkcnt); } 378185 STD { int sys_lfs_markv(fsid_t *fsidp, \ 379 struct block_info *blkiov, int blkcnt); } 380186 STD { int sys_lfs_segclean(fsid_t *fsidp, u_long segment); } 381187 STD { int sys_lfs_segwait(fsid_t *fsidp, \ 382 struct timeval *tv); } 383#else 384184 EXCL lfs_bmapv 385185 EXCL lfs_markv 386186 EXCL lfs_segclean 387187 EXCL lfs_segwait 388#endif 389188 COMPAT_12 MPSAFE { int sys_stat(const char *path, struct stat12 *ub); } \ 390 stat12 391189 COMPAT_12 MPSAFE { int sys_fstat(int fd, struct stat12 *sb); } fstat12 392190 COMPAT_12 MPSAFE { int sys_lstat(const char *path, \ 393 struct stat12 *ub); } lstat12 394191 STD MPSAFE { long sys_pathconf(const char *path, int name); } 395192 STD MPSAFE { long sys_fpathconf(int fd, int name); } 396193 UNIMPL 397194 STD MPSAFE { int sys_getrlimit(int which, \ 398 struct rlimit *rlp); } 399195 STD MPSAFE { int sys_setrlimit(int which, \ 400 const struct rlimit *rlp); } 401196 COMPAT_12 MPSAFE { int sys_getdirentries(int fd, char *buf, \ 402 u_int count, long *basep); } 403197 STD MPSAFE { void *sys_mmap(void *addr, size_t len, int prot, \ 404 int flags, int fd, long pad, off_t pos); } 405198 INDIR { quad_t sys___syscall(quad_t code, \ 406 ... register_t args[SYS_MAXSYSARGS]); } 407199 STD MPSAFE { off_t sys_lseek(int fd, int pad, off_t offset, \ 408 int whence); } 409200 STD MPSAFE { int sys_truncate(const char *path, int pad, \ 410 off_t length); } 411201 STD MPSAFE { int sys_ftruncate(int fd, int pad, off_t length); } 412202 STD MPSAFE { int sys___sysctl(const int *name, u_int namelen, \ 413 void *old, size_t *oldlenp, const void *new, \ 414 size_t newlen); } 415203 STD MPSAFE { int sys_mlock(const void *addr, size_t len); } 416204 STD MPSAFE { int sys_munlock(const void *addr, size_t len); } 417205 STD MPSAFE { int sys_undelete(const char *path); } 418206 STD MPSAFE { int sys_futimes(int fd, \ 419 const struct timeval *tptr); } 420207 STD MPSAFE { pid_t sys_getpgid(pid_t pid); } 421208 STD { int sys_reboot(int opt, char *bootstr); } 422209 STD MPSAFE { int sys_poll(struct pollfd *fds, u_int nfds, \ 423 int timeout); } 424; 425; Syscalls 210-219 are reserved for dynamically loaded syscalls 426; 427#if defined(LKM) || !defined(_KERNEL) 428210 NODEF { int sys_lkmnosys(void); } 429211 NODEF { int sys_lkmnosys(void); } 430212 NODEF { int sys_lkmnosys(void); } 431213 NODEF { int sys_lkmnosys(void); } 432214 NODEF { int sys_lkmnosys(void); } 433215 NODEF { int sys_lkmnosys(void); } 434216 NODEF { int sys_lkmnosys(void); } 435217 NODEF { int sys_lkmnosys(void); } 436218 NODEF { int sys_lkmnosys(void); } 437219 NODEF { int sys_lkmnosys(void); } 438#else /* !LKM */ 439210 EXCL lkmnosys 440211 EXCL lkmnosys 441212 EXCL lkmnosys 442213 EXCL lkmnosys 443214 EXCL lkmnosys 444215 EXCL lkmnosys 445216 EXCL lkmnosys 446217 EXCL lkmnosys 447218 EXCL lkmnosys 448219 EXCL lkmnosys 449#endif /* !LKM */ 450; System calls 220-300 are reserved for use by NetBSD 451#if defined(SYSVSEM) || !defined(_KERNEL) 452220 COMPAT_14 MPSAFE { int sys___semctl(int semid, int semnum, int cmd, \ 453 union __semun *arg); } 454221 STD MPSAFE { int sys_semget(key_t key, int nsems, int semflg); } 455222 STD MPSAFE { int sys_semop(int semid, struct sembuf *sops, \ 456 size_t nsops); } 457223 STD MPSAFE { int sys_semconfig(int flag); } 458#else 459220 EXCL compat_14_semctl 460221 EXCL semget 461222 EXCL semop 462223 EXCL semconfig 463#endif 464#if defined(SYSVMSG) || !defined(_KERNEL) 465224 COMPAT_14 MPSAFE { int sys_msgctl(int msqid, int cmd, \ 466 struct msqid_ds14 *buf); } 467225 STD MPSAFE { int sys_msgget(key_t key, int msgflg); } 468226 STD MPSAFE { int sys_msgsnd(int msqid, const void *msgp, \ 469 size_t msgsz, int msgflg); } 470227 STD MPSAFE { ssize_t sys_msgrcv(int msqid, void *msgp, \ 471 size_t msgsz, long msgtyp, int msgflg); } 472#else 473224 EXCL compat_14_msgctl 474225 EXCL msgget 475226 EXCL msgsnd 476227 EXCL msgrcv 477#endif 478#if defined(SYSVSHM) || !defined(_KERNEL) 479228 STD MPSAFE { void *sys_shmat(int shmid, const void *shmaddr, \ 480 int shmflg); } 481229 COMPAT_14 MPSAFE { int sys_shmctl(int shmid, int cmd, \ 482 struct shmid_ds14 *buf); } 483230 STD MPSAFE { int sys_shmdt(const void *shmaddr); } 484231 STD MPSAFE { int sys_shmget(key_t key, size_t size, int shmflg); } 485#else 486228 EXCL shmat 487229 EXCL compat_14_shmctl 488230 EXCL shmdt 489231 EXCL shmget 490#endif 491232 STD MPSAFE { int sys_clock_gettime(clockid_t clock_id, \ 492 struct timespec *tp); } 493233 STD MPSAFE { int sys_clock_settime(clockid_t clock_id, \ 494 const struct timespec *tp); } 495234 STD MPSAFE { int sys_clock_getres(clockid_t clock_id, \ 496 struct timespec *tp); } 497235 STD { int sys_timer_create(clockid_t clock_id, \ 498 struct sigevent *evp, timer_t *timerid); } 499236 STD { int sys_timer_delete(timer_t timerid); } 500237 STD { int sys_timer_settime(timer_t timerid, int flags, \ 501 const struct itimerspec *value, \ 502 struct itimerspec *ovalue); } 503238 STD { int sys_timer_gettime(timer_t timerid, struct \ 504 itimerspec *value); } 505239 STD { int sys_timer_getoverrun(timer_t timerid); } 506; 507; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 508; 509240 STD MPSAFE { int sys_nanosleep(const struct timespec *rqtp, \ 510 struct timespec *rmtp); } 511241 STD MPSAFE { int sys_fdatasync(int fd); } 512242 STD MPSAFE { int sys_mlockall(int flags); } 513243 STD MPSAFE { int sys_munlockall(void); } 514244 STD MPSAFE { int sys___sigtimedwait(const sigset_t *set, \ 515 siginfo_t *info, \ 516 struct timespec *timeout); } 517245 UNIMPL sys_sigqueue 518246 STD MPSAFE { int sys_modctl(int cmd, void *arg); } 519#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC)) 520247 STD MPSAFE { int sys__ksem_init(unsigned int value, semid_t *idp); } 521248 STD MPSAFE { int sys__ksem_open(const char *name, int oflag, \ 522 mode_t mode, unsigned int value, semid_t *idp); } 523249 STD MPSAFE { int sys__ksem_unlink(const char *name); } 524250 STD MPSAFE { int sys__ksem_close(semid_t id); } 525251 STD MPSAFE { int sys__ksem_post(semid_t id); } 526252 STD MPSAFE { int sys__ksem_wait(semid_t id); } 527253 STD MPSAFE { int sys__ksem_trywait(semid_t id); } 528254 STD MPSAFE { int sys__ksem_getvalue(semid_t id, \ 529 unsigned int *value); } 530255 STD MPSAFE { int sys__ksem_destroy(semid_t id); } 531256 UNIMPL sys__ksem_timedwait 532#else 533247 EXCL sys__ksem_init 534248 EXCL sys__ksem_open 535249 EXCL sys__ksem_unlink 536250 EXCL sys__ksem_close 537251 EXCL sys__ksem_post 538252 EXCL sys__ksem_wait 539253 EXCL sys__ksem_trywait 540254 EXCL sys__ksem_getvalue 541255 EXCL sys__ksem_destroy 542256 UNIMPL sys__ksem_timedwait 543#endif 544257 STD MPSAFE { mqd_t sys_mq_open(const char * name, int oflag, \ 545 mode_t mode, struct mq_attr *attr); } 546258 STD MPSAFE { int sys_mq_close(mqd_t mqdes); } 547259 STD MPSAFE { int sys_mq_unlink(const char *name); } 548260 STD MPSAFE { int sys_mq_getattr(mqd_t mqdes, \ 549 struct mq_attr *mqstat); } 550261 STD MPSAFE { int sys_mq_setattr(mqd_t mqdes, \ 551 const struct mq_attr *mqstat, \ 552 struct mq_attr *omqstat); } 553262 STD MPSAFE { int sys_mq_notify(mqd_t mqdes, \ 554 const struct sigevent *notification); } 555263 STD MPSAFE { int sys_mq_send(mqd_t mqdes, const char *msg_ptr, \ 556 size_t msg_len, unsigned msg_prio); } 557264 STD MPSAFE { ssize_t sys_mq_receive(mqd_t mqdes, char *msg_ptr, \ 558 size_t msg_len, unsigned *msg_prio); } 559265 STD MPSAFE { int sys_mq_timedsend(mqd_t mqdes, \ 560 const char *msg_ptr, size_t msg_len, \ 561 unsigned msg_prio, \ 562 const struct timespec *abs_timeout); } 563266 STD MPSAFE { ssize_t sys_mq_timedreceive(mqd_t mqdes, \ 564 char *msg_ptr, size_t msg_len, unsigned *msg_prio, \ 565 const struct timespec *abs_timeout); } 566267 UNIMPL 567268 UNIMPL 568269 UNIMPL 569270 STD MPSAFE { int sys___posix_rename(const char *from, \ 570 const char *to); } 571271 STD MPSAFE { int sys_swapctl(int cmd, void *arg, int misc); } 572272 COMPAT_30 MPSAFE { int sys_getdents(int fd, char *buf, size_t count); } 573273 STD MPSAFE { int sys_minherit(void *addr, size_t len, \ 574 int inherit); } 575274 STD MPSAFE { int sys_lchmod(const char *path, mode_t mode); } 576275 STD MPSAFE { int sys_lchown(const char *path, uid_t uid, \ 577 gid_t gid); } 578276 STD MPSAFE { int sys_lutimes(const char *path, \ 579 const struct timeval *tptr); } 580277 STD MPSAFE { int sys___msync13(void *addr, size_t len, int flags); } 581278 COMPAT_30 MPSAFE { int sys___stat13(const char *path, struct stat13 *ub); } 582279 COMPAT_30 MPSAFE { int sys___fstat13(int fd, struct stat13 *sb); } 583280 COMPAT_30 MPSAFE { int sys___lstat13(const char *path, struct stat13 *ub); } 584281 STD MPSAFE { int sys___sigaltstack14( \ 585 const struct sigaltstack *nss, \ 586 struct sigaltstack *oss); } 587282 STD MPSAFE { int sys___vfork14(void); } 588283 STD MPSAFE { int sys___posix_chown(const char *path, uid_t uid, \ 589 gid_t gid); } 590284 STD MPSAFE { int sys___posix_fchown(int fd, uid_t uid, \ 591 gid_t gid); } 592285 STD MPSAFE { int sys___posix_lchown(const char *path, uid_t uid, \ 593 gid_t gid); } 594286 STD MPSAFE { pid_t sys_getsid(pid_t pid); } 595287 STD MPSAFE { pid_t sys___clone(int flags, void *stack); } 596288 STD MPSAFE { int sys_fktrace(int fd, int ops, \ 597 int facs, int pid); } 598289 STD MPSAFE { ssize_t sys_preadv(int fd, \ 599 const struct iovec *iovp, int iovcnt, \ 600 int pad, off_t offset); } 601290 STD MPSAFE { ssize_t sys_pwritev(int fd, \ 602 const struct iovec *iovp, int iovcnt, \ 603 int pad, off_t offset); } 604291 COMPAT_16 MPSAFE { int sys___sigaction14(int signum, \ 605 const struct sigaction *nsa, \ 606 struct sigaction *osa); } 607292 STD MPSAFE { int sys___sigpending14(sigset_t *set); } 608293 STD MPSAFE { int sys___sigprocmask14(int how, \ 609 const sigset_t *set, \ 610 sigset_t *oset); } 611294 STD MPSAFE { int sys___sigsuspend14(const sigset_t *set); } 612295 COMPAT_16 MPSAFE { int sys___sigreturn14(struct sigcontext *sigcntxp); } 613296 STD MPSAFE { int sys___getcwd(char *bufp, size_t length); } 614297 STD MPSAFE { int sys_fchroot(int fd); } 615298 COMPAT_30 MPSAFE { int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); } 616299 COMPAT_30 MPSAFE { int sys_fhstat(const struct compat_30_fhandle *fhp, \ 617 struct stat13 *sb); } 618300 COMPAT_20 MPSAFE { int sys_fhstatfs(const struct compat_30_fhandle *fhp, \ 619 struct statfs12 *buf); } 620#if defined(SYSVSEM) || !defined(_KERNEL) 621301 STD MPSAFE { int sys_____semctl13(int semid, int semnum, int cmd, \ 622 ... union __semun *arg); } 623#else 624301 EXCL ____semctl13 625#endif 626#if defined(SYSVMSG) || !defined(_KERNEL) 627302 STD MPSAFE { int sys___msgctl13(int msqid, int cmd, \ 628 struct msqid_ds *buf); } 629#else 630302 EXCL __msgctl13 631#endif 632#if defined(SYSVSHM) || !defined(_KERNEL) 633303 STD MPSAFE { int sys___shmctl13(int shmid, int cmd, \ 634 struct shmid_ds *buf); } 635#else 636303 EXCL __shmctl13 637#endif 638304 STD MPSAFE { int sys_lchflags(const char *path, u_long flags); } 639305 STD MPSAFE { int sys_issetugid(void); } 640306 STD MPSAFE { int sys_utrace(const char *label, void *addr, \ 641 size_t len); } 642307 STD MPSAFE { int sys_getcontext(struct __ucontext *ucp); } 643308 STD MPSAFE { int sys_setcontext(const struct __ucontext *ucp); } 644309 STD MPSAFE { int sys__lwp_create(const struct __ucontext *ucp, \ 645 u_long flags, lwpid_t *new_lwp); } 646310 STD MPSAFE { int sys__lwp_exit(void); } 647311 STD MPSAFE { lwpid_t sys__lwp_self(void); } 648312 STD MPSAFE { int sys__lwp_wait(lwpid_t wait_for, \ 649 lwpid_t *departed); } 650313 STD MPSAFE { int sys__lwp_suspend(lwpid_t target); } 651314 STD MPSAFE { int sys__lwp_continue(lwpid_t target); } 652315 STD MPSAFE { int sys__lwp_wakeup(lwpid_t target); } 653316 STD MPSAFE { void *sys__lwp_getprivate(void); } 654317 STD MPSAFE { void sys__lwp_setprivate(void *ptr); } 655318 STD MPSAFE { int sys__lwp_kill(lwpid_t target, int signo); } 656319 STD MPSAFE { int sys__lwp_detach(lwpid_t target); } 657320 STD MPSAFE { int sys__lwp_park(const struct timespec *ts, \ 658 lwpid_t unpark, const void *hint, \ 659 const void *unparkhint); } 660321 STD MPSAFE { int sys__lwp_unpark(lwpid_t target, const void *hint); } 661322 STD MPSAFE { ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \ 662 size_t ntargets, const void *hint); } 663323 STD MPSAFE { int sys__lwp_setname(lwpid_t target, \ 664 const char *name); } 665324 STD MPSAFE { int sys__lwp_getname(lwpid_t target, \ 666 char *name, size_t len); } 667325 STD MPSAFE { int sys__lwp_ctl(int features, \ 668 struct lwpctl **address); } 669; Syscalls 326-339 reserved for LWP syscalls. 670326 UNIMPL 671327 UNIMPL 672328 UNIMPL 673329 UNIMPL 674; Obsolete SA system calls. Must remain until libc's major version is bumped. 675330 STD MPSAFE { int sys_sa_register(void); } 676331 STD MPSAFE { int sys_sa_stacks(void); } 677332 STD MPSAFE { int sys_sa_enable(void); } 678333 STD MPSAFE { int sys_sa_setconcurrency(void); } 679334 STD MPSAFE { int sys_sa_yield(void); } 680335 STD MPSAFE { int sys_sa_preempt(void); } 681336 STD MPSAFE { int sys_sa_unblockyield(void); } 682337 UNIMPL 683338 UNIMPL 684339 UNIMPL 685340 STD MPSAFE { int sys___sigaction_sigtramp(int signum, \ 686 const struct sigaction *nsa, \ 687 struct sigaction *osa, \ 688 const void *tramp, int vers); } 689341 STD { int sys_pmc_get_info(int ctr, int op, void *args); } 690342 STD { int sys_pmc_control(int ctr, int op, void *args); } 691343 STD MPSAFE { int sys_rasctl(void *addr, size_t len, int op); } 692344 STD { int sys_kqueue(void); } 693345 STD { int sys_kevent(int fd, \ 694 const struct kevent *changelist, size_t nchanges, \ 695 struct kevent *eventlist, size_t nevents, \ 696 const struct timespec *timeout); } 697 698; Scheduling system calls. 699346 STD MPSAFE { int sys__sched_setparam(pid_t pid, lwpid_t lid, \ 700 int policy, const struct sched_param *params); } 701347 STD MPSAFE { int sys__sched_getparam(pid_t pid, lwpid_t lid, \ 702 int *policy, struct sched_param *params); } 703348 STD MPSAFE { int sys__sched_setaffinity(pid_t pid, lwpid_t lid, \ 704 size_t size, void *cpuset); } 705349 STD MPSAFE { int sys__sched_getaffinity(pid_t pid, lwpid_t lid, \ 706 size_t size, void *cpuset); } 707350 STD MPSAFE { int sys_sched_yield(void); } 708351 UNIMPL 709352 UNIMPL 710353 UNIMPL 711 712354 STD MPSAFE { int sys_fsync_range(int fd, int flags, off_t start, \ 713 off_t length); } 714355 STD MPSAFE { int sys_uuidgen(struct uuid *store, int count); } 715356 STD MPSAFE { int sys_getvfsstat(struct statvfs *buf, \ 716 size_t bufsize, int flags); } 717357 STD MPSAFE { int sys_statvfs1(const char *path, \ 718 struct statvfs *buf, int flags); } 719358 STD MPSAFE { int sys_fstatvfs1(int fd, struct statvfs *buf, \ 720 int flags); } 721359 COMPAT_30 MPSAFE { int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \ 722 struct statvfs *buf, int flags); } 723360 STD MPSAFE { int sys_extattrctl(const char *path, int cmd, \ 724 const char *filename, int attrnamespace, \ 725 const char *attrname); } 726361 STD MPSAFE { int sys_extattr_set_file(const char *path, \ 727 int attrnamespace, const char *attrname, \ 728 const void *data, size_t nbytes); } 729362 STD MPSAFE { ssize_t sys_extattr_get_file(const char *path, \ 730 int attrnamespace, const char *attrname, \ 731 void *data, size_t nbytes); } 732363 STD MPSAFE { int sys_extattr_delete_file(const char *path, \ 733 int attrnamespace, const char *attrname); } 734364 STD MPSAFE { int sys_extattr_set_fd(int fd, \ 735 int attrnamespace, const char *attrname, \ 736 const void *data, size_t nbytes); } 737365 STD MPSAFE { ssize_t sys_extattr_get_fd(int fd, \ 738 int attrnamespace, const char *attrname, \ 739 void *data, size_t nbytes); } 740366 STD MPSAFE { int sys_extattr_delete_fd(int fd, \ 741 int attrnamespace, const char *attrname); } 742367 STD MPSAFE { int sys_extattr_set_link(const char *path, \ 743 int attrnamespace, const char *attrname, \ 744 const void *data, size_t nbytes); } 745368 STD MPSAFE { ssize_t sys_extattr_get_link(const char *path, \ 746 int attrnamespace, const char *attrname, \ 747 void *data, size_t nbytes); } 748369 STD MPSAFE { int sys_extattr_delete_link(const char *path, \ 749 int attrnamespace, const char *attrname); } 750370 STD MPSAFE { ssize_t sys_extattr_list_fd(int fd, \ 751 int attrnamespace, void *data, size_t nbytes); } 752371 STD MPSAFE { ssize_t sys_extattr_list_file(const char *path, \ 753 int attrnamespace, void *data, size_t nbytes); } 754372 STD MPSAFE { ssize_t sys_extattr_list_link(const char *path, \ 755 int attrnamespace, void *data, size_t nbytes); } 756373 STD MPSAFE { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ 757 fd_set *ex, const struct timespec *ts, \ 758 const sigset_t *mask); } 759374 STD MPSAFE { int sys_pollts(struct pollfd *fds, u_int nfds, \ 760 const struct timespec *ts, const sigset_t *mask); } 761375 STD MPSAFE { int sys_setxattr(const char *path, \ 762 const char *name, void *value, size_t size, \ 763 int flags); } 764376 STD MPSAFE { int sys_lsetxattr(const char *path, \ 765 const char *name, void *value, size_t size, \ 766 int flags); } 767377 STD MPSAFE { int sys_fsetxattr(int fd, \ 768 const char *name, void *value, size_t size, \ 769 int flags); } 770378 STD MPSAFE { int sys_getxattr(const char *path, \ 771 const char *name, void *value, size_t size); } 772379 STD MPSAFE { int sys_lgetxattr(const char *path, \ 773 const char *name, void *value, size_t size); } 774380 STD MPSAFE { int sys_fgetxattr(int fd, \ 775 const char *name, void *value, size_t size); } 776381 STD MPSAFE { int sys_listxattr(const char *path, \ 777 char *list, size_t size); } 778382 STD MPSAFE { int sys_llistxattr(const char *path, \ 779 char *list, size_t size); } 780383 STD MPSAFE { int sys_flistxattr(int fd, \ 781 char *list, size_t size); } 782384 STD MPSAFE { int sys_removexattr(const char *path, \ 783 const char *name); } 784385 STD MPSAFE { int sys_lremovexattr(const char *path, \ 785 const char *name); } 786386 STD MPSAFE { int sys_fremovexattr(int fd, \ 787 const char *name); } 788387 STD MPSAFE { int sys___stat30(const char *path, struct stat *ub); } 789388 STD MPSAFE { int sys___fstat30(int fd, struct stat *sb); } 790389 STD MPSAFE { int sys___lstat30(const char *path, struct stat *ub); } 791390 STD MPSAFE { int sys___getdents30(int fd, char *buf, size_t count); } 792391 IGNORED old posix_fadvise 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 MPSAFE { 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