1 $NetBSD: syscalls.master,v 1.200 2008/04/24 11:51:19 ad 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; Optional fields are specified after the type field 14; (NOTE! they must be specified in this order): 15; RUMP: the system call can be called directly from rumps 16; 17; types: 18; STD always included 19; OBSOL obsolete, not included in system 20; IGNORED syscall is a null op, but always succeeds 21; UNIMPL unimplemented, not included in system 22; EXCL implemented, but not included in system 23; NODEF included, but don't define the syscall number 24; NOARGS included, but don't define the syscall args structure 25; INDIR included, but don't define the syscall args structure, 26; and allow it to be "really" varargs. 27; 28; The compat options are defined in the syscalls.conf file, and the 29; compat option name is prefixed to the syscall name. Other than 30; that, they're like NODEF (for 'compat' options), or STD (for 31; 'libcompat' options). 32; 33; The type-dependent arguments are as follows: 34; For STD, NODEF, NOARGS, and compat syscalls: 35; { pseudo-proto } [alias] 36; For other syscalls: 37; [comment] 38; 39; #ifdef's, etc. may be included, and are copied to the output files. 40; #include's are copied to the syscall names and switch definition files only. 41 42#include "opt_nfsserver.h" 43#include "opt_ntp.h" 44#include "opt_compat_netbsd.h" 45#include "opt_sysv.h" 46#include "opt_compat_43.h" 47#include "opt_posix.h" 48 49#include "fs_lfs.h" 50#include "fs_nfs.h" 51 52#include <sys/param.h> 53#include <sys/systm.h> 54#include <sys/signal.h> 55#include <sys/mount.h> 56#include <sys/syscallargs.h> 57 58%% 59 60; Reserved/unimplemented system calls in the range 0-150 inclusive 61; are reserved for use in future Berkeley releases. 62; Additional system calls implemented in vendor and other 63; redistributions should be placed in the reserved range at the end 64; of the current calls. 65 660 INDIR { int sys_syscall(int code, \ 67 ... register_t args[SYS_MAXSYSARGS]); } 681 STD { void sys_exit(int rval); } 692 STD { int sys_fork(void); } 703 STD RUMP { ssize_t sys_read(int fd, void *buf, size_t nbyte); } 714 STD RUMP { ssize_t sys_write(int fd, const void *buf, \ 72 size_t nbyte); } 735 STD RUMP { int sys_open(const char *path, \ 74 int flags, ... mode_t mode); } 756 STD RUMP { int sys_close(int fd); } 767 STD { int sys_wait4(int pid, int *status, int options, \ 77 struct rusage *rusage); } 788 COMPAT_43 { int sys_creat(const char *path, mode_t mode); } ocreat 799 STD RUMP { int sys_link(const char *path, const char *link); } 8010 STD RUMP { int sys_unlink(const char *path); } 8111 OBSOL execv 8212 STD RUMP { int sys_chdir(const char *path); } 8313 STD RUMP { int sys_fchdir(int fd); } 8414 STD RUMP { int sys_mknod(const char *path, mode_t mode, \ 85 dev_t dev); } 8615 STD RUMP { int sys_chmod(const char *path, mode_t mode); } 8716 STD RUMP { int sys_chown(const char *path, uid_t uid, \ 88 gid_t gid); } 8917 STD { int sys_obreak(char *nsize); } break 9018 COMPAT_20 { int sys_getfsstat(struct statfs12 *buf, \ 91 long bufsize, int flags); } 9219 COMPAT_43 { long sys_lseek(int fd, long offset, int whence); } \ 93 olseek 94#ifdef COMPAT_43 9520 STD { pid_t sys_getpid_with_ppid(void); } getpid 96#else 9720 STD { pid_t sys_getpid(void); } 98#endif 9921 COMPAT_40 { int sys_mount(const char *type, const char *path, \ 100 int flags, void *data); } 10122 STD RUMP { int sys_unmount(const char *path, int flags); } 10223 STD { int sys_setuid(uid_t uid); } 103#ifdef COMPAT_43 10424 STD { uid_t sys_getuid_with_euid(void); } getuid 105#else 10624 STD { uid_t sys_getuid(void); } 107#endif 10825 STD { uid_t sys_geteuid(void); } 10926 STD { int sys_ptrace(int req, pid_t pid, void *addr, \ 110 int data); } 11127 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ 112 int flags); } 11328 STD { ssize_t sys_sendmsg(int s, \ 114 const struct msghdr *msg, int flags); } 11529 STD { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ 116 int flags, struct sockaddr *from, \ 117 unsigned int *fromlenaddr); } 11830 STD { int sys_accept(int s, struct sockaddr *name, \ 119 unsigned int *anamelen); } 12031 STD { int sys_getpeername(int fdes, struct sockaddr *asa, \ 121 unsigned int *alen); } 12232 STD { int sys_getsockname(int fdes, struct sockaddr *asa, \ 123 unsigned int *alen); } 12433 STD RUMP { int sys_access(const char *path, int flags); } 12534 STD RUMP { int sys_chflags(const char *path, u_long flags); } 12635 STD RUMP { int sys_fchflags(int fd, u_long flags); } 12736 STD RUMP { void sys_sync(void); } 12837 STD { int sys_kill(int pid, int signum); } 12938 COMPAT_43 { int sys_stat(const char *path, struct stat43 *ub); } \ 130 stat43 13139 STD { pid_t sys_getppid(void); } 13240 COMPAT_43 { int sys_lstat(const char *path, \ 133 struct stat43 *ub); } lstat43 13441 STD { int sys_dup(int fd); } 13542 STD { int sys_pipe(void); } 13643 STD { gid_t sys_getegid(void); } 13744 STD { int sys_profil(char *samples, size_t size, \ 138 u_long offset, u_int scale); } 13945 STD { int sys_ktrace(const char *fname, int ops, \ 140 int facs, int pid); } 14146 COMPAT_13 { int sys_sigaction(int signum, \ 142 const struct sigaction13 *nsa, \ 143 struct sigaction13 *osa); } sigaction13 144#ifdef COMPAT_43 14547 STD { gid_t sys_getgid_with_egid(void); } getgid 146#else 14747 STD { gid_t sys_getgid(void); } 148#endif 14948 COMPAT_13 { int sys_sigprocmask(int how, \ 150 int mask); } sigprocmask13 15149 STD { int sys___getlogin(char *namebuf, size_t namelen); } 15250 STD { int sys___setlogin(const char *namebuf); } 15351 STD { int sys_acct(const char *path); } 15452 COMPAT_13 { int sys_sigpending(void); } sigpending13 15553 COMPAT_13 { int sys_sigaltstack( \ 156 const struct sigaltstack13 *nss, \ 157 struct sigaltstack13 *oss); } sigaltstack13 15854 STD { int sys_ioctl(int fd, \ 159 u_long com, ... void *data); } 16055 COMPAT_12 { int sys_reboot(int opt); } oreboot 16156 STD { int sys_revoke(const char *path); } 16257 STD RUMP { int sys_symlink(const char *path, \ 163 const char *link); } 16458 STD RUMP { ssize_t sys_readlink(const char *path, char *buf, \ 165 size_t count); } 16659 STD { int sys_execve(const char *path, \ 167 char * const *argp, char * const *envp); } 16860 STD { mode_t sys_umask(mode_t newmask); } 16961 STD { int sys_chroot(const char *path); } 17062 COMPAT_43 { int sys_fstat(int fd, struct stat43 *sb); } fstat43 17163 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ 172 int arg); } ogetkerninfo 17364 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 17465 COMPAT_12 { int sys_msync(void *addr, size_t len); } 175; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 17666 STD { int sys_vfork(void); } 17767 OBSOL vread 17868 OBSOL vwrite 17969 STD { int sys_sbrk(intptr_t incr); } 18070 STD { int sys_sstk(int incr); } 18171 COMPAT_43 { int sys_mmap(void *addr, size_t len, int prot, \ 182 int flags, int fd, long pos); } ommap 18372 STD { int sys_ovadvise(int anom); } vadvise 18473 STD { int sys_munmap(void *addr, size_t len); } 18574 STD { int sys_mprotect(void *addr, size_t len, \ 186 int prot); } 18775 STD { int sys_madvise(void *addr, size_t len, \ 188 int behav); } 18976 OBSOL vhangup 19077 OBSOL vlimit 19178 STD { int sys_mincore(void *addr, size_t len, \ 192 char *vec); } 19379 STD { int sys_getgroups(int gidsetsize, \ 194 gid_t *gidset); } 19580 STD { int sys_setgroups(int gidsetsize, \ 196 const gid_t *gidset); } 19781 STD { int sys_getpgrp(void); } 19882 STD { int sys_setpgid(int pid, int pgid); } 19983 STD { int sys_setitimer(int which, \ 200 const struct itimerval *itv, \ 201 struct itimerval *oitv); } 20284 COMPAT_43 { int sys_wait(void); } owait 20385 COMPAT_12 { int sys_swapon(const char *name); } oswapon 20486 STD { int sys_getitimer(int which, \ 205 struct itimerval *itv); } 20687 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \ 207 ogethostname 20888 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } \ 209 osethostname 21089 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 21190 STD { int sys_dup2(int from, int to); } 21291 UNIMPL getdopt 21392 STD { int sys_fcntl(int fd, int cmd, ... void *arg); } 21493 STD { int sys_select(int nd, fd_set *in, fd_set *ou, \ 215 fd_set *ex, struct timeval *tv); } 21694 UNIMPL setdopt 21795 STD { int sys_fsync(int fd); } 21896 STD { int sys_setpriority(int which, id_t who, int prio); } 21997 COMPAT_30 { int sys_socket(int domain, int type, int protocol); } 22098 STD { int sys_connect(int s, const struct sockaddr *name, \ 221 unsigned int namelen); } 22299 COMPAT_43 { int sys_accept(int s, void *name, \ 223 int *anamelen); } oaccept 224100 STD { int sys_getpriority(int which, id_t who); } 225101 COMPAT_43 { int sys_send(int s, void *buf, int len, \ 226 int flags); } osend 227102 COMPAT_43 { int sys_recv(int s, void *buf, int len, \ 228 int flags); } orecv 229103 COMPAT_13 { int sys_sigreturn(struct sigcontext13 *sigcntxp); } \ 230 sigreturn13 231104 STD { int sys_bind(int s, const struct sockaddr *name, \ 232 unsigned int namelen); } 233105 STD { int sys_setsockopt(int s, int level, int name, \ 234 const void *val, unsigned int valsize); } 235106 STD { int sys_listen(int s, int backlog); } 236107 OBSOL vtimes 237108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \ 238 struct sigvec *osv); } osigvec 239109 COMPAT_43 { int sys_sigblock(int mask); } osigblock 240110 COMPAT_43 { int sys_sigsetmask(int mask); } osigsetmask 241111 COMPAT_13 { int sys_sigsuspend(int mask); } sigsuspend13 242112 COMPAT_43 { int sys_sigstack(struct sigstack *nss, \ 243 struct sigstack *oss); } osigstack 244113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 245 int flags); } orecvmsg 246114 COMPAT_43 { int sys_sendmsg(int s, void *msg, int flags); } \ 247 osendmsg 248115 OBSOL vtrace 249116 STD { int sys_gettimeofday(struct timeval *tp, \ 250 void *tzp); } 251117 STD { int sys_getrusage(int who, struct rusage *rusage); } 252118 STD { int sys_getsockopt(int s, int level, int name, \ 253 void *val, unsigned int *avalsize); } 254119 OBSOL resuba 255120 STD { ssize_t sys_readv(int fd, \ 256 const struct iovec *iovp, int iovcnt); } 257121 STD { ssize_t sys_writev(int fd, \ 258 const struct iovec *iovp, int iovcnt); } 259122 STD { int sys_settimeofday(const struct timeval *tv, \ 260 const void *tzp); } 261123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); } 262124 STD { int sys_fchmod(int fd, mode_t mode); } 263125 COMPAT_43 { int sys_recvfrom(int s, void *buf, size_t len, \ 264 int flags, void *from, int *fromlenaddr); } \ 265 orecvfrom 266126 STD { int sys_setreuid(uid_t ruid, uid_t euid); } 267127 STD { int sys_setregid(gid_t rgid, gid_t egid); } 268128 STD RUMP { int sys_rename(const char *from, const char *to); } 269129 COMPAT_43 { int sys_truncate(const char *path, long length); } \ 270 otruncate 271130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate 272131 STD { int sys_flock(int fd, int how); } 273132 STD { int sys_mkfifo(const char *path, mode_t mode); } 274133 STD { ssize_t sys_sendto(int s, const void *buf, \ 275 size_t len, int flags, const struct sockaddr *to, \ 276 unsigned int tolen); } 277134 STD { int sys_shutdown(int s, int how); } 278135 STD { int sys_socketpair(int domain, int type, \ 279 int protocol, int *rsv); } 280136 STD RUMP { int sys_mkdir(const char *path, mode_t mode); } 281137 STD RUMP { int sys_rmdir(const char *path); } 282138 STD { int sys_utimes(const char *path, \ 283 const struct timeval *tptr); } 284139 OBSOL 4.2 sigreturn 285140 STD { int sys_adjtime(const struct timeval *delta, \ 286 struct timeval *olddelta); } 287141 COMPAT_43 { int sys_getpeername(int fdes, void *asa, \ 288 int *alen); } ogetpeername 289142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 290143 COMPAT_43 { int sys_sethostid(int32_t hostid); } osethostid 291144 COMPAT_43 { int sys_getrlimit(int which, \ 292 struct orlimit *rlp); } ogetrlimit 293145 COMPAT_43 { int sys_setrlimit(int which, \ 294 const struct orlimit *rlp); } osetrlimit 295146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg 296147 STD { int sys_setsid(void); } 297148 STD { int sys_quotactl(const char *path, int cmd, \ 298 int uid, void *arg); } 299149 COMPAT_43 { int sys_quota(void); } oquota 300150 COMPAT_43 { int sys_getsockname(int fdec, void *asa, \ 301 int *alen); } ogetsockname 302 303; Syscalls 151-180 inclusive are reserved for vendor-specific 304; system calls. (This includes various calls added for compatibity 305; with other Unix variants.) 306; Some of these calls are now supported by BSD... 307151 UNIMPL 308152 UNIMPL 309153 UNIMPL 310154 UNIMPL 311#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 312155 STD { int sys_nfssvc(int flag, void *argp); } 313#else 314155 EXCL nfssvc 315#endif 316156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ 317 u_int count, long *basep); } ogetdirentries 318157 COMPAT_20 { int sys_statfs(const char *path, \ 319 struct statfs12 *buf); } 320158 COMPAT_20 { int sys_fstatfs(int fd, struct statfs12 *buf); } 321159 UNIMPL 322160 UNIMPL 323161 COMPAT_30 { int sys_getfh(const char *fname, \ 324 struct compat_30_fhandle *fhp); } 325162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \ 326 ogetdomainname 327163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \ 328 osetdomainname 329164 COMPAT_09 { int sys_uname(struct outsname *name); } ouname 330165 STD { int sys_sysarch(int op, void *parms); } 331166 UNIMPL 332167 UNIMPL 333168 UNIMPL 334; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 335#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64) 336169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \ 337 int a5); } osemsys 338#else 339169 EXCL 1.0 semsys 340#endif 341; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 342#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64) 343170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \ 344 int a5, int a6); } omsgsys 345#else 346170 EXCL 1.0 msgsys 347#endif 348; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 349#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64) 350171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } \ 351 oshmsys 352#else 353171 EXCL 1.0 shmsys 354#endif 355172 UNIMPL 356173 STD { ssize_t sys_pread(int fd, void *buf, \ 357 size_t nbyte, int pad, off_t offset); } 358174 STD { ssize_t sys_pwrite(int fd, const void *buf, \ 359 size_t nbyte, int pad, off_t offset); } 360; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded. 361175 COMPAT_30 { int sys_ntp_gettime(struct ntptimeval30 *ntvp); } 362#if defined(NTP) || !defined(_KERNEL) 363176 STD { int sys_ntp_adjtime(struct timex *tp); } 364#else 365176 EXCL ntp_adjtime 366#endif 367177 UNIMPL 368178 UNIMPL 369179 UNIMPL 370180 UNIMPL 371 372; Syscalls 180-199 are used by/reserved for BSD 373181 STD { int sys_setgid(gid_t gid); } 374182 STD { int sys_setegid(gid_t egid); } 375183 STD { int sys_seteuid(uid_t euid); } 376#if defined(LFS) || !defined(_KERNEL) 377184 STD { int sys_lfs_bmapv(fsid_t *fsidp, \ 378 struct block_info *blkiov, int blkcnt); } 379185 STD { int sys_lfs_markv(fsid_t *fsidp, \ 380 struct block_info *blkiov, int blkcnt); } 381186 STD { int sys_lfs_segclean(fsid_t *fsidp, u_long segment); } 382187 STD { int sys_lfs_segwait(fsid_t *fsidp, \ 383 struct timeval *tv); } 384#else 385184 EXCL lfs_bmapv 386185 EXCL lfs_markv 387186 EXCL lfs_segclean 388187 EXCL lfs_segwait 389#endif 390188 COMPAT_12 { int sys_stat(const char *path, struct stat12 *ub); } \ 391 stat12 392189 COMPAT_12 { int sys_fstat(int fd, struct stat12 *sb); } fstat12 393190 COMPAT_12 { int sys_lstat(const char *path, \ 394 struct stat12 *ub); } lstat12 395191 STD { long sys_pathconf(const char *path, int name); } 396192 STD { long sys_fpathconf(int fd, int name); } 397193 UNIMPL 398194 STD { int sys_getrlimit(int which, \ 399 struct rlimit *rlp); } 400195 STD { int sys_setrlimit(int which, \ 401 const struct rlimit *rlp); } 402196 COMPAT_12 { int sys_getdirentries(int fd, char *buf, \ 403 u_int count, long *basep); } 404197 STD { void *sys_mmap(void *addr, size_t len, int prot, \ 405 int flags, int fd, long pad, off_t pos); } 406198 INDIR { quad_t sys___syscall(quad_t code, \ 407 ... register_t args[SYS_MAXSYSARGS]); } 408199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ 409 int whence); } 410200 STD RUMP { int sys_truncate(const char *path, int pad, \ 411 off_t length); } 412201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 413202 STD { int sys___sysctl(const int *name, u_int namelen, \ 414 void *old, size_t *oldlenp, const void *new, \ 415 size_t newlen); } 416203 STD { int sys_mlock(const void *addr, size_t len); } 417204 STD { int sys_munlock(const void *addr, size_t len); } 418205 STD { int sys_undelete(const char *path); } 419206 STD { int sys_futimes(int fd, \ 420 const struct timeval *tptr); } 421207 STD { pid_t sys_getpgid(pid_t pid); } 422208 STD { int sys_reboot(int opt, char *bootstr); } 423209 STD { int sys_poll(struct pollfd *fds, u_int nfds, \ 424 int timeout); } 425; 426; Syscalls 210-219 are reserved for dynamically loaded syscalls 427; 428#if defined(LKM) || !defined(_KERNEL) 429210 NODEF { int sys_lkmnosys(void); } 430211 NODEF { int sys_lkmnosys(void); } 431212 NODEF { int sys_lkmnosys(void); } 432213 NODEF { int sys_lkmnosys(void); } 433214 NODEF { int sys_lkmnosys(void); } 434215 NODEF { int sys_lkmnosys(void); } 435216 NODEF { int sys_lkmnosys(void); } 436217 NODEF { int sys_lkmnosys(void); } 437218 NODEF { int sys_lkmnosys(void); } 438219 NODEF { int sys_lkmnosys(void); } 439#else /* !LKM */ 440210 EXCL lkmnosys 441211 EXCL lkmnosys 442212 EXCL lkmnosys 443213 EXCL lkmnosys 444214 EXCL lkmnosys 445215 EXCL lkmnosys 446216 EXCL lkmnosys 447217 EXCL lkmnosys 448218 EXCL lkmnosys 449219 EXCL lkmnosys 450#endif /* !LKM */ 451; System calls 220-300 are reserved for use by NetBSD 452#if defined(SYSVSEM) || !defined(_KERNEL) 453220 COMPAT_14 { int sys___semctl(int semid, int semnum, int cmd, \ 454 union __semun *arg); } 455221 STD { int sys_semget(key_t key, int nsems, int semflg); } 456222 STD { int sys_semop(int semid, struct sembuf *sops, \ 457 size_t nsops); } 458223 STD { int sys_semconfig(int flag); } 459#else 460220 EXCL compat_14_semctl 461221 EXCL semget 462222 EXCL semop 463223 EXCL semconfig 464#endif 465#if defined(SYSVMSG) || !defined(_KERNEL) 466224 COMPAT_14 { int sys_msgctl(int msqid, int cmd, \ 467 struct msqid_ds14 *buf); } 468225 STD { int sys_msgget(key_t key, int msgflg); } 469226 STD { int sys_msgsnd(int msqid, const void *msgp, \ 470 size_t msgsz, int msgflg); } 471227 STD { ssize_t sys_msgrcv(int msqid, void *msgp, \ 472 size_t msgsz, long msgtyp, int msgflg); } 473#else 474224 EXCL compat_14_msgctl 475225 EXCL msgget 476226 EXCL msgsnd 477227 EXCL msgrcv 478#endif 479#if defined(SYSVSHM) || !defined(_KERNEL) 480228 STD { void *sys_shmat(int shmid, const void *shmaddr, \ 481 int shmflg); } 482229 COMPAT_14 { int sys_shmctl(int shmid, int cmd, \ 483 struct shmid_ds14 *buf); } 484230 STD { int sys_shmdt(const void *shmaddr); } 485231 STD { int sys_shmget(key_t key, size_t size, int shmflg); } 486#else 487228 EXCL shmat 488229 EXCL compat_14_shmctl 489230 EXCL shmdt 490231 EXCL shmget 491#endif 492232 STD { int sys_clock_gettime(clockid_t clock_id, \ 493 struct timespec *tp); } 494233 STD { int sys_clock_settime(clockid_t clock_id, \ 495 const struct timespec *tp); } 496234 STD { int sys_clock_getres(clockid_t clock_id, \ 497 struct timespec *tp); } 498235 STD { int sys_timer_create(clockid_t clock_id, \ 499 struct sigevent *evp, timer_t *timerid); } 500236 STD { int sys_timer_delete(timer_t timerid); } 501237 STD { int sys_timer_settime(timer_t timerid, int flags, \ 502 const struct itimerspec *value, \ 503 struct itimerspec *ovalue); } 504238 STD { int sys_timer_gettime(timer_t timerid, struct \ 505 itimerspec *value); } 506239 STD { int sys_timer_getoverrun(timer_t timerid); } 507; 508; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 509; 510240 STD { int sys_nanosleep(const struct timespec *rqtp, \ 511 struct timespec *rmtp); } 512241 STD { int sys_fdatasync(int fd); } 513242 STD { int sys_mlockall(int flags); } 514243 STD { int sys_munlockall(void); } 515244 STD { int sys___sigtimedwait(const sigset_t *set, \ 516 siginfo_t *info, \ 517 struct timespec *timeout); } 518245 UNIMPL sys_sigqueue 519246 STD { int sys_modctl(int cmd, void *arg); } 520#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC)) 521247 STD { int sys__ksem_init(unsigned int value, semid_t *idp); } 522248 STD { int sys__ksem_open(const char *name, int oflag, \ 523 mode_t mode, unsigned int value, semid_t *idp); } 524249 STD { int sys__ksem_unlink(const char *name); } 525250 STD { int sys__ksem_close(semid_t id); } 526251 STD { int sys__ksem_post(semid_t id); } 527252 STD { int sys__ksem_wait(semid_t id); } 528253 STD { int sys__ksem_trywait(semid_t id); } 529254 STD { int sys__ksem_getvalue(semid_t id, \ 530 unsigned int *value); } 531255 STD { int sys__ksem_destroy(semid_t id); } 532256 UNIMPL sys__ksem_timedwait 533#else 534247 EXCL sys__ksem_init 535248 EXCL sys__ksem_open 536249 EXCL sys__ksem_unlink 537250 EXCL sys__ksem_close 538251 EXCL sys__ksem_post 539252 EXCL sys__ksem_wait 540253 EXCL sys__ksem_trywait 541254 EXCL sys__ksem_getvalue 542255 EXCL sys__ksem_destroy 543256 UNIMPL sys__ksem_timedwait 544#endif 545257 STD { mqd_t sys_mq_open(const char * name, int oflag, \ 546 mode_t mode, struct mq_attr *attr); } 547258 STD { int sys_mq_close(mqd_t mqdes); } 548259 STD { int sys_mq_unlink(const char *name); } 549260 STD { int sys_mq_getattr(mqd_t mqdes, \ 550 struct mq_attr *mqstat); } 551261 STD { int sys_mq_setattr(mqd_t mqdes, \ 552 const struct mq_attr *mqstat, \ 553 struct mq_attr *omqstat); } 554262 STD { int sys_mq_notify(mqd_t mqdes, \ 555 const struct sigevent *notification); } 556263 STD { int sys_mq_send(mqd_t mqdes, const char *msg_ptr, \ 557 size_t msg_len, unsigned msg_prio); } 558264 STD { ssize_t sys_mq_receive(mqd_t mqdes, char *msg_ptr, \ 559 size_t msg_len, unsigned *msg_prio); } 560265 STD { int sys_mq_timedsend(mqd_t mqdes, \ 561 const char *msg_ptr, size_t msg_len, \ 562 unsigned msg_prio, \ 563 const struct timespec *abs_timeout); } 564266 STD { ssize_t sys_mq_timedreceive(mqd_t mqdes, \ 565 char *msg_ptr, size_t msg_len, unsigned *msg_prio, \ 566 const struct timespec *abs_timeout); } 567267 UNIMPL 568268 UNIMPL 569269 UNIMPL 570270 STD { int sys___posix_rename(const char *from, \ 571 const char *to); } 572271 STD { int sys_swapctl(int cmd, void *arg, int misc); } 573272 COMPAT_30 { int sys_getdents(int fd, char *buf, size_t count); } 574273 STD { int sys_minherit(void *addr, size_t len, \ 575 int inherit); } 576274 STD RUMP { int sys_lchmod(const char *path, mode_t mode); } 577275 STD RUMP { int sys_lchown(const char *path, uid_t uid, \ 578 gid_t gid); } 579276 STD { int sys_lutimes(const char *path, \ 580 const struct timeval *tptr); } 581277 STD { int sys___msync13(void *addr, size_t len, int flags); } 582278 COMPAT_30 { int sys___stat13(const char *path, struct stat13 *ub); } 583279 COMPAT_30 { int sys___fstat13(int fd, struct stat13 *sb); } 584280 COMPAT_30 { int sys___lstat13(const char *path, struct stat13 *ub); } 585281 STD { int sys___sigaltstack14( \ 586 const struct sigaltstack *nss, \ 587 struct sigaltstack *oss); } 588282 STD { int sys___vfork14(void); } 589283 STD { int sys___posix_chown(const char *path, uid_t uid, \ 590 gid_t gid); } 591284 STD { int sys___posix_fchown(int fd, uid_t uid, \ 592 gid_t gid); } 593285 STD { int sys___posix_lchown(const char *path, uid_t uid, \ 594 gid_t gid); } 595286 STD { pid_t sys_getsid(pid_t pid); } 596287 STD { pid_t sys___clone(int flags, void *stack); } 597288 STD { int sys_fktrace(int fd, int ops, \ 598 int facs, int pid); } 599289 STD { ssize_t sys_preadv(int fd, \ 600 const struct iovec *iovp, int iovcnt, \ 601 int pad, off_t offset); } 602290 STD { ssize_t sys_pwritev(int fd, \ 603 const struct iovec *iovp, int iovcnt, \ 604 int pad, off_t offset); } 605291 COMPAT_16 { int sys___sigaction14(int signum, \ 606 const struct sigaction *nsa, \ 607 struct sigaction *osa); } 608292 STD { int sys___sigpending14(sigset_t *set); } 609293 STD { int sys___sigprocmask14(int how, \ 610 const sigset_t *set, \ 611 sigset_t *oset); } 612294 STD { int sys___sigsuspend14(const sigset_t *set); } 613295 COMPAT_16 { int sys___sigreturn14(struct sigcontext *sigcntxp); } 614296 STD { int sys___getcwd(char *bufp, size_t length); } 615297 STD { int sys_fchroot(int fd); } 616298 COMPAT_30 { int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); } 617299 COMPAT_30 { int sys_fhstat(const struct compat_30_fhandle *fhp, \ 618 struct stat13 *sb); } 619300 COMPAT_20 { int sys_fhstatfs(const struct compat_30_fhandle *fhp, \ 620 struct statfs12 *buf); } 621#if defined(SYSVSEM) || !defined(_KERNEL) 622301 STD { int sys_____semctl13(int semid, int semnum, int cmd, \ 623 ... union __semun *arg); } 624#else 625301 EXCL ____semctl13 626#endif 627#if defined(SYSVMSG) || !defined(_KERNEL) 628302 STD { int sys___msgctl13(int msqid, int cmd, \ 629 struct msqid_ds *buf); } 630#else 631302 EXCL __msgctl13 632#endif 633#if defined(SYSVSHM) || !defined(_KERNEL) 634303 STD { int sys___shmctl13(int shmid, int cmd, \ 635 struct shmid_ds *buf); } 636#else 637303 EXCL __shmctl13 638#endif 639304 STD { int sys_lchflags(const char *path, u_long flags); } 640305 STD { int sys_issetugid(void); } 641306 STD { int sys_utrace(const char *label, void *addr, \ 642 size_t len); } 643307 STD { int sys_getcontext(struct __ucontext *ucp); } 644308 STD { int sys_setcontext(const struct __ucontext *ucp); } 645309 STD { int sys__lwp_create(const struct __ucontext *ucp, \ 646 u_long flags, lwpid_t *new_lwp); } 647310 STD { int sys__lwp_exit(void); } 648311 STD { lwpid_t sys__lwp_self(void); } 649312 STD { int sys__lwp_wait(lwpid_t wait_for, \ 650 lwpid_t *departed); } 651313 STD { int sys__lwp_suspend(lwpid_t target); } 652314 STD { int sys__lwp_continue(lwpid_t target); } 653315 STD { int sys__lwp_wakeup(lwpid_t target); } 654316 STD { void *sys__lwp_getprivate(void); } 655317 STD { void sys__lwp_setprivate(void *ptr); } 656318 STD { int sys__lwp_kill(lwpid_t target, int signo); } 657319 STD { int sys__lwp_detach(lwpid_t target); } 658320 STD { int sys__lwp_park(const struct timespec *ts, \ 659 lwpid_t unpark, const void *hint, \ 660 const void *unparkhint); } 661321 STD { int sys__lwp_unpark(lwpid_t target, const void *hint); } 662322 STD { ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \ 663 size_t ntargets, const void *hint); } 664323 STD { int sys__lwp_setname(lwpid_t target, \ 665 const char *name); } 666324 STD { int sys__lwp_getname(lwpid_t target, \ 667 char *name, size_t len); } 668325 STD { int sys__lwp_ctl(int features, \ 669 struct lwpctl **address); } 670; Syscalls 326-339 reserved for LWP syscalls. 671326 UNIMPL 672327 UNIMPL 673328 UNIMPL 674329 UNIMPL 675; Obsolete SA system calls. Must remain until libc's major version is bumped. 676330 STD { int sys_sa_register(void); } 677331 STD { int sys_sa_stacks(void); } 678332 STD { int sys_sa_enable(void); } 679333 STD { int sys_sa_setconcurrency(void); } 680334 STD { int sys_sa_yield(void); } 681335 STD { int sys_sa_preempt(void); } 682336 STD { int sys_sa_unblockyield(void); } 683337 UNIMPL 684338 UNIMPL 685339 UNIMPL 686340 STD { int sys___sigaction_sigtramp(int signum, \ 687 const struct sigaction *nsa, \ 688 struct sigaction *osa, \ 689 const void *tramp, int vers); } 690341 STD { int sys_pmc_get_info(int ctr, int op, void *args); } 691342 STD { int sys_pmc_control(int ctr, int op, void *args); } 692343 STD { int sys_rasctl(void *addr, size_t len, int op); } 693344 STD { int sys_kqueue(void); } 694345 STD { int sys_kevent(int fd, \ 695 const struct kevent *changelist, size_t nchanges, \ 696 struct kevent *eventlist, size_t nevents, \ 697 const struct timespec *timeout); } 698 699; Scheduling system calls. 700346 STD { int sys__sched_setparam(pid_t pid, lwpid_t lid, \ 701 int policy, const struct sched_param *params); } 702347 STD { int sys__sched_getparam(pid_t pid, lwpid_t lid, \ 703 int *policy, struct sched_param *params); } 704348 STD { int sys__sched_setaffinity(pid_t pid, lwpid_t lid, \ 705 size_t size, void *cpuset); } 706349 STD { int sys__sched_getaffinity(pid_t pid, lwpid_t lid, \ 707 size_t size, void *cpuset); } 708350 STD { int sys_sched_yield(void); } 709351 UNIMPL 710352 UNIMPL 711353 UNIMPL 712 713354 STD { int sys_fsync_range(int fd, int flags, off_t start, \ 714 off_t length); } 715355 STD { int sys_uuidgen(struct uuid *store, int count); } 716356 STD { int sys_getvfsstat(struct statvfs *buf, \ 717 size_t bufsize, int flags); } 718357 STD { int sys_statvfs1(const char *path, \ 719 struct statvfs *buf, int flags); } 720358 STD { int sys_fstatvfs1(int fd, struct statvfs *buf, \ 721 int flags); } 722359 COMPAT_30 { int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \ 723 struct statvfs *buf, int flags); } 724360 STD { int sys_extattrctl(const char *path, int cmd, \ 725 const char *filename, int attrnamespace, \ 726 const char *attrname); } 727361 STD { int sys_extattr_set_file(const char *path, \ 728 int attrnamespace, const char *attrname, \ 729 const void *data, size_t nbytes); } 730362 STD { ssize_t sys_extattr_get_file(const char *path, \ 731 int attrnamespace, const char *attrname, \ 732 void *data, size_t nbytes); } 733363 STD { int sys_extattr_delete_file(const char *path, \ 734 int attrnamespace, const char *attrname); } 735364 STD { int sys_extattr_set_fd(int fd, \ 736 int attrnamespace, const char *attrname, \ 737 const void *data, size_t nbytes); } 738365 STD { ssize_t sys_extattr_get_fd(int fd, \ 739 int attrnamespace, const char *attrname, \ 740 void *data, size_t nbytes); } 741366 STD { int sys_extattr_delete_fd(int fd, \ 742 int attrnamespace, const char *attrname); } 743367 STD { int sys_extattr_set_link(const char *path, \ 744 int attrnamespace, const char *attrname, \ 745 const void *data, size_t nbytes); } 746368 STD { ssize_t sys_extattr_get_link(const char *path, \ 747 int attrnamespace, const char *attrname, \ 748 void *data, size_t nbytes); } 749369 STD { int sys_extattr_delete_link(const char *path, \ 750 int attrnamespace, const char *attrname); } 751370 STD { ssize_t sys_extattr_list_fd(int fd, \ 752 int attrnamespace, void *data, size_t nbytes); } 753371 STD { ssize_t sys_extattr_list_file(const char *path, \ 754 int attrnamespace, void *data, size_t nbytes); } 755372 STD { ssize_t sys_extattr_list_link(const char *path, \ 756 int attrnamespace, void *data, size_t nbytes); } 757373 STD { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ 758 fd_set *ex, const struct timespec *ts, \ 759 const sigset_t *mask); } 760374 STD { int sys_pollts(struct pollfd *fds, u_int nfds, \ 761 const struct timespec *ts, const sigset_t *mask); } 762375 STD { int sys_setxattr(const char *path, \ 763 const char *name, void *value, size_t size, \ 764 int flags); } 765376 STD { int sys_lsetxattr(const char *path, \ 766 const char *name, void *value, size_t size, \ 767 int flags); } 768377 STD { int sys_fsetxattr(int fd, \ 769 const char *name, void *value, size_t size, \ 770 int flags); } 771378 STD { int sys_getxattr(const char *path, \ 772 const char *name, void *value, size_t size); } 773379 STD { int sys_lgetxattr(const char *path, \ 774 const char *name, void *value, size_t size); } 775380 STD { int sys_fgetxattr(int fd, \ 776 const char *name, void *value, size_t size); } 777381 STD { int sys_listxattr(const char *path, \ 778 char *list, size_t size); } 779382 STD { int sys_llistxattr(const char *path, \ 780 char *list, size_t size); } 781383 STD { int sys_flistxattr(int fd, \ 782 char *list, size_t size); } 783384 STD { int sys_removexattr(const char *path, \ 784 const char *name); } 785385 STD { int sys_lremovexattr(const char *path, \ 786 const char *name); } 787386 STD { int sys_fremovexattr(int fd, \ 788 const char *name); } 789387 STD { int sys___stat30(const char *path, struct stat *ub); } 790388 STD { int sys___fstat30(int fd, struct stat *sb); } 791389 STD { int sys___lstat30(const char *path, struct stat *ub); } 792390 STD { int sys___getdents30(int fd, char *buf, size_t count); } 793391 IGNORED old posix_fadvise 794392 COMPAT_30 { int sys___fhstat30(const struct compat_30_fhandle \ 795 *fhp, struct stat *sb); } 796393 STD { int sys___ntp_gettime30(struct ntptimeval *ntvp); } 797394 STD { int sys___socket30(int domain, int type, int protocol); } 798395 STD { int sys___getfh30(const char *fname, void *fhp, \ 799 size_t *fh_size); } 800396 STD { int sys___fhopen40(const void *fhp, size_t fh_size,\ 801 int flags); } 802397 STD { int sys___fhstatvfs140(const void *fhp, \ 803 size_t fh_size, struct statvfs *buf, int flags); } 804398 STD { int sys___fhstat40(const void *fhp, \ 805 size_t fh_size, struct stat *sb); } 806 807; Asynchronous I/O system calls 808399 STD { int sys_aio_cancel(int fildes, struct aiocb *aiocbp); } 809400 STD { int sys_aio_error(const struct aiocb *aiocbp); } 810401 STD { int sys_aio_fsync(int op, struct aiocb *aiocbp); } 811402 STD { int sys_aio_read(struct aiocb *aiocbp); } 812403 STD { int sys_aio_return(struct aiocb *aiocbp); } 813404 STD { int sys_aio_suspend(const struct aiocb *const *list, \ 814 int nent, const struct timespec *timeout); } 815405 STD { int sys_aio_write(struct aiocb *aiocbp); } 816406 STD { int sys_lio_listio(int mode, struct aiocb *const *list, \ 817 int nent, struct sigevent *sig); } 818 819407 UNIMPL 820408 UNIMPL 821409 UNIMPL 822 823410 STD { int sys___mount50(const char *type, \ 824 const char *path, int flags, void *data, \ 825 size_t data_len); } 826411 STD { void *sys_mremap(void *old_address, size_t old_size, \ 827 void *new_address, size_t new_size, int flags); } 828 829; Processor-sets system calls 830412 STD { int sys_pset_create(psetid_t *psid); } 831413 STD { int sys_pset_destroy(psetid_t psid); } 832414 STD { int sys_pset_assign(psetid_t psid, cpuid_t cpuid, \ 833 psetid_t *opsid); } 834415 STD { int sys__pset_bind(idtype_t idtype, id_t first_id, \ 835 id_t second_id, psetid_t psid, psetid_t *opsid); } 836416 STD { int sys___posix_fadvise50(int fd, int pad, \ 837 off_t offset, off_t len, int advice); } 838