syscalls.master revision 1.168
1 $NetBSD: syscalls.master,v 1.168 2007/03/06 16:09:21 drochner 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_ktrace.h" 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 number, ...); } 661 STD { void sys_exit(int rval); } 672 STD { int sys_fork(void); } 683 STD { ssize_t sys_read(int fd, void *buf, size_t nbyte); } 694 STD { ssize_t sys_write(int fd, const void *buf, \ 70 size_t nbyte); } 715 STD { int sys_open(const char *path, \ 72 int flags, ... mode_t mode); } 736 STD { int sys_close(int fd); } 747 STD MPSAFE { int sys_wait4(int pid, int *status, int options, \ 75 struct rusage *rusage); } 768 COMPAT_43 { int sys_creat(const char *path, mode_t mode); } ocreat 779 STD { int sys_link(const char *path, const char *link); } 7810 STD { int sys_unlink(const char *path); } 7911 OBSOL execv 8012 STD { int sys_chdir(const char *path); } 8113 STD { int sys_fchdir(int fd); } 8214 STD { int sys_mknod(const char *path, mode_t mode, \ 83 dev_t dev); } 8415 STD { int sys_chmod(const char *path, mode_t mode); } 8516 STD { int sys_chown(const char *path, uid_t uid, \ 86 gid_t gid); } 8717 STD { int sys_obreak(char *nsize); } break 8818 COMPAT_20 { int sys_getfsstat(struct statfs12 *buf, \ 89 long bufsize, int flags); } 9019 COMPAT_43 { 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 STD { 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 { int sys_setuid(uid_t uid); } 101#ifdef COMPAT_43 10224 STD { 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 { 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 { int sys_access(const char *path, int flags); } 12334 STD { int sys_chflags(const char *path, u_long flags); } 12435 STD { int sys_fchflags(int fd, u_long flags); } 12536 STD { void sys_sync(void); } 12637 STD { int sys_kill(int pid, int signum); } 12738 COMPAT_43 { int sys_stat(const char *path, struct stat43 *ub); } \ 128 stat43 12939 STD MPSAFE { pid_t sys_getppid(void); } 13040 COMPAT_43 { int sys_lstat(const char *path, \ 131 struct stat43 *ub); } lstat43 13241 STD { int sys_dup(int fd); } 13342 STD { 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); } 137#if defined(KTRACE) || !defined(_KERNEL) 13845 STD { int sys_ktrace(const char *fname, int ops, \ 139 int facs, int pid); } 140#else 14145 EXCL ktrace 142#endif 14346 COMPAT_13 MPSAFE { int sys_sigaction(int signum, \ 144 const struct sigaction13 *nsa, \ 145 struct sigaction13 *osa); } sigaction13 146#ifdef COMPAT_43 14747 STD MPSAFE { gid_t sys_getgid_with_egid(void); } getgid 148#else 14947 STD MPSAFE { gid_t sys_getgid(void); } 150#endif 15148 COMPAT_13 MPSAFE { int sys_sigprocmask(int how, \ 152 int mask); } sigprocmask13 15349 STD MPSAFE { int sys___getlogin(char *namebuf, size_t namelen); } 15450 STD { int sys___setlogin(const char *namebuf); } 15551 STD { int sys_acct(const char *path); } 15652 COMPAT_13 MPSAFE { int sys_sigpending(void); } sigpending13 15753 COMPAT_13 MPSAFE { int sys_sigaltstack( \ 158 const struct sigaltstack13 *nss, \ 159 struct sigaltstack13 *oss); } sigaltstack13 16054 STD { int sys_ioctl(int fd, \ 161 u_long com, ... void *data); } 16255 COMPAT_12 { int sys_reboot(int opt); } oreboot 16356 STD { int sys_revoke(const char *path); } 16457 STD { int sys_symlink(const char *path, \ 165 const char *link); } 16658 STD { ssize_t sys_readlink(const char *path, char *buf, \ 167 size_t count); } 16859 STD { int sys_execve(const char *path, \ 169 char * const *argp, char * const *envp); } 17060 STD { mode_t sys_umask(mode_t newmask); } 17161 STD { int sys_chroot(const char *path); } 17262 COMPAT_43 { int sys_fstat(int fd, struct stat43 *sb); } fstat43 17363 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ 174 int arg); } ogetkerninfo 17564 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize 17665 COMPAT_12 { int sys_msync(void *addr, size_t len); } 177; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)? 17866 STD { int sys_vfork(void); } 17967 OBSOL vread 18068 OBSOL vwrite 18169 STD { int sys_sbrk(intptr_t incr); } 18270 STD { int sys_sstk(int incr); } 18371 COMPAT_43 { int sys_mmap(void *addr, size_t len, int prot, \ 184 int flags, int fd, long pos); } ommap 18572 STD { int sys_ovadvise(int anom); } vadvise 18673 STD { int sys_munmap(void *addr, size_t len); } 18774 STD { int sys_mprotect(void *addr, size_t len, \ 188 int prot); } 18975 STD { int sys_madvise(void *addr, size_t len, \ 190 int behav); } 19176 OBSOL vhangup 19277 OBSOL vlimit 19378 STD { int sys_mincore(void *addr, size_t len, \ 194 char *vec); } 19579 STD MPSAFE { int sys_getgroups(int gidsetsize, \ 196 gid_t *gidset); } 19780 STD { int sys_setgroups(int gidsetsize, \ 198 const gid_t *gidset); } 19981 STD MPSAFE { int sys_getpgrp(void); } 20082 STD { int sys_setpgid(int pid, int pgid); } 20183 STD { int sys_setitimer(int which, \ 202 const struct itimerval *itv, \ 203 struct itimerval *oitv); } 20484 COMPAT_43 MPSAFE { int sys_wait(void); } owait 20585 COMPAT_12 { int sys_swapon(const char *name); } oswapon 20686 STD { int sys_getitimer(int which, \ 207 struct itimerval *itv); } 20887 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \ 209 ogethostname 21088 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } \ 211 osethostname 21289 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize 21390 STD { int sys_dup2(int from, int to); } 21491 UNIMPL getdopt 21592 STD { int sys_fcntl(int fd, int cmd, ... void *arg); } 21693 STD { int sys_select(int nd, fd_set *in, fd_set *ou, \ 217 fd_set *ex, struct timeval *tv); } 21894 UNIMPL setdopt 21995 STD { int sys_fsync(int fd); } 22096 STD { int sys_setpriority(int which, id_t who, int prio); } 22197 COMPAT_30 { int sys_socket(int domain, int type, int protocol); } 22298 STD { int sys_connect(int s, const struct sockaddr *name, \ 223 unsigned int namelen); } 22499 COMPAT_43 { int sys_accept(int s, void *name, \ 225 int *anamelen); } oaccept 226100 STD MPSAFE { int sys_getpriority(int which, id_t who); } 227101 COMPAT_43 { int sys_send(int s, void *buf, int len, \ 228 int flags); } osend 229102 COMPAT_43 { int sys_recv(int s, void *buf, int len, \ 230 int flags); } orecv 231103 COMPAT_13 MPSAFE { int sys_sigreturn(struct sigcontext13 *sigcntxp); } \ 232 sigreturn13 233104 STD { int sys_bind(int s, const struct sockaddr *name, \ 234 unsigned int namelen); } 235105 STD { int sys_setsockopt(int s, int level, int name, \ 236 const void *val, unsigned int valsize); } 237106 STD { int sys_listen(int s, int backlog); } 238107 OBSOL vtimes 239108 COMPAT_43 MPSAFE { int sys_sigvec(int signum, struct sigvec *nsv, \ 240 struct sigvec *osv); } osigvec 241109 COMPAT_43 MPSAFE { int sys_sigblock(int mask); } osigblock 242110 COMPAT_43 MPSAFE { int sys_sigsetmask(int mask); } osigsetmask 243111 COMPAT_13 MPSAFE { int sys_sigsuspend(int mask); } sigsuspend13 244112 COMPAT_43 MPSAFE { int sys_sigstack(struct sigstack *nss, \ 245 struct sigstack *oss); } osigstack 246113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \ 247 int flags); } orecvmsg 248114 COMPAT_43 { int sys_sendmsg(int s, void *msg, int flags); } \ 249 osendmsg 250115 OBSOL vtrace 251116 STD { int sys_gettimeofday(struct timeval *tp, \ 252 void *tzp); } 253117 STD { int sys_getrusage(int who, struct rusage *rusage); } 254118 STD { int sys_getsockopt(int s, int level, int name, \ 255 void *val, unsigned int *avalsize); } 256119 OBSOL resuba 257120 STD { ssize_t sys_readv(int fd, \ 258 const struct iovec *iovp, int iovcnt); } 259121 STD { ssize_t sys_writev(int fd, \ 260 const struct iovec *iovp, int iovcnt); } 261122 STD { int sys_settimeofday(const struct timeval *tv, \ 262 const void *tzp); } 263123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); } 264124 STD { int sys_fchmod(int fd, mode_t mode); } 265125 COMPAT_43 { int sys_recvfrom(int s, void *buf, size_t len, \ 266 int flags, void *from, int *fromlenaddr); } \ 267 orecvfrom 268126 STD { int sys_setreuid(uid_t ruid, uid_t euid); } 269127 STD { int sys_setregid(gid_t rgid, gid_t egid); } 270128 STD { int sys_rename(const char *from, const char *to); } 271129 COMPAT_43 { int sys_truncate(const char *path, long length); } \ 272 otruncate 273130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate 274131 STD { int sys_flock(int fd, int how); } 275132 STD { int sys_mkfifo(const char *path, mode_t mode); } 276133 STD { ssize_t sys_sendto(int s, const void *buf, \ 277 size_t len, int flags, const struct sockaddr *to, \ 278 unsigned int tolen); } 279134 STD { int sys_shutdown(int s, int how); } 280135 STD { int sys_socketpair(int domain, int type, \ 281 int protocol, int *rsv); } 282136 STD { int sys_mkdir(const char *path, mode_t mode); } 283137 STD { int sys_rmdir(const char *path); } 284138 STD { int sys_utimes(const char *path, \ 285 const struct timeval *tptr); } 286139 OBSOL 4.2 sigreturn 287140 STD { int sys_adjtime(const struct timeval *delta, \ 288 struct timeval *olddelta); } 289141 COMPAT_43 { int sys_getpeername(int fdes, void *asa, \ 290 int *alen); } ogetpeername 291142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid 292143 COMPAT_43 { int sys_sethostid(int32_t hostid); } osethostid 293144 COMPAT_43 { int sys_getrlimit(int which, \ 294 struct orlimit *rlp); } ogetrlimit 295145 COMPAT_43 { int sys_setrlimit(int which, \ 296 const struct orlimit *rlp); } osetrlimit 297146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg 298147 STD { int sys_setsid(void); } 299148 STD { int sys_quotactl(const char *path, int cmd, \ 300 int uid, void *arg); } 301149 COMPAT_43 { int sys_quota(void); } oquota 302150 COMPAT_43 { int sys_getsockname(int fdec, void *asa, \ 303 int *alen); } ogetsockname 304 305; Syscalls 151-180 inclusive are reserved for vendor-specific 306; system calls. (This includes various calls added for compatibity 307; with other Unix variants.) 308; Some of these calls are now supported by BSD... 309151 UNIMPL 310152 UNIMPL 311153 UNIMPL 312154 UNIMPL 313#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL) 314155 STD { int sys_nfssvc(int flag, void *argp); } 315#else 316155 EXCL nfssvc 317#endif 318156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ 319 u_int count, long *basep); } ogetdirentries 320157 COMPAT_20 { int sys_statfs(const char *path, \ 321 struct statfs12 *buf); } 322158 COMPAT_20 { int sys_fstatfs(int fd, struct statfs12 *buf); } 323159 UNIMPL 324160 UNIMPL 325161 COMPAT_30 { int sys_getfh(const char *fname, \ 326 struct compat_30_fhandle *fhp); } 327162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \ 328 ogetdomainname 329163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \ 330 osetdomainname 331164 COMPAT_09 { int sys_uname(struct outsname *name); } ouname 332165 STD { int sys_sysarch(int op, void *parms); } 333166 UNIMPL 334167 UNIMPL 335168 UNIMPL 336; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 337#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(_LP64) 338169 COMPAT_10 { int sys_semsys(int which, int a2, int a3, int a4, \ 339 int a5); } osemsys 340#else 341169 EXCL 1.0 semsys 342#endif 343; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 344#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(_LP64) 345170 COMPAT_10 { int sys_msgsys(int which, int a2, int a3, int a4, \ 346 int a5, int a6); } omsgsys 347#else 348170 EXCL 1.0 msgsys 349#endif 350; XXX more generally, never on machines where sizeof(void *) != sizeof(int) 351#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(_LP64) 352171 COMPAT_10 { int sys_shmsys(int which, int a2, int a3, int a4); } \ 353 oshmsys 354#else 355171 EXCL 1.0 shmsys 356#endif 357172 UNIMPL 358173 STD { ssize_t sys_pread(int fd, void *buf, \ 359 size_t nbyte, int pad, off_t offset); } 360174 STD { ssize_t sys_pwrite(int fd, const void *buf, \ 361 size_t nbyte, int pad, off_t offset); } 362; For some reason, ntp_gettime doesn't want to raise SIGSYS when it's excluded. 363175 COMPAT_30 { int sys_ntp_gettime(struct ntptimeval30 *ntvp); } 364#if defined(NTP) || !defined(_KERNEL) 365176 STD { int sys_ntp_adjtime(struct timex *tp); } 366#else 367176 EXCL ntp_adjtime 368#endif 369177 UNIMPL 370178 UNIMPL 371179 UNIMPL 372180 UNIMPL 373 374; Syscalls 180-199 are used by/reserved for BSD 375181 STD { int sys_setgid(gid_t gid); } 376182 STD { int sys_setegid(gid_t egid); } 377183 STD { int sys_seteuid(uid_t euid); } 378#if defined(LFS) || !defined(_KERNEL) 379184 STD { int sys_lfs_bmapv(fsid_t *fsidp, \ 380 struct block_info *blkiov, int blkcnt); } 381185 STD { int sys_lfs_markv(fsid_t *fsidp, \ 382 struct block_info *blkiov, int blkcnt); } 383186 STD { int sys_lfs_segclean(fsid_t *fsidp, u_long segment); } 384187 STD { int sys_lfs_segwait(fsid_t *fsidp, \ 385 struct timeval *tv); } 386#else 387184 EXCL lfs_bmapv 388185 EXCL lfs_markv 389186 EXCL lfs_segclean 390187 EXCL lfs_segwait 391#endif 392188 COMPAT_12 { int sys_stat(const char *path, struct stat12 *ub); } \ 393 stat12 394189 COMPAT_12 { int sys_fstat(int fd, struct stat12 *sb); } fstat12 395190 COMPAT_12 { int sys_lstat(const char *path, \ 396 struct stat12 *ub); } lstat12 397191 STD { long sys_pathconf(const char *path, int name); } 398192 STD { long sys_fpathconf(int fd, int name); } 399193 UNIMPL 400194 STD { int sys_getrlimit(int which, \ 401 struct rlimit *rlp); } 402195 STD { int sys_setrlimit(int which, \ 403 const struct rlimit *rlp); } 404196 COMPAT_12 { int sys_getdirentries(int fd, char *buf, \ 405 u_int count, long *basep); } 406197 STD { void *sys_mmap(void *addr, size_t len, int prot, \ 407 int flags, int fd, long pad, off_t pos); } 408198 INDIR { quad_t sys___syscall(quad_t num, ...); } 409199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ 410 int whence); } 411200 STD { int sys_truncate(const char *path, int pad, \ 412 off_t length); } 413201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 414202 STD { int sys___sysctl(const int *name, u_int namelen, \ 415 void *old, size_t *oldlenp, const void *new, \ 416 size_t newlen); } 417203 STD { int sys_mlock(const void *addr, size_t len); } 418204 STD { int sys_munlock(const void *addr, size_t len); } 419205 STD { int sys_undelete(const char *path); } 420206 STD { int sys_futimes(int fd, \ 421 const struct timeval *tptr); } 422207 STD MPSAFE { pid_t sys_getpgid(pid_t pid); } 423208 STD { int sys_reboot(int opt, char *bootstr); } 424209 STD { int sys_poll(struct pollfd *fds, u_int nfds, \ 425 int timeout); } 426; 427; Syscalls 210-219 are reserved for dynamically loaded syscalls 428; 429#if defined(LKM) || !defined(_KERNEL) 430210 NODEF { int sys_lkmnosys(void); } 431211 NODEF { int sys_lkmnosys(void); } 432212 NODEF { int sys_lkmnosys(void); } 433213 NODEF { int sys_lkmnosys(void); } 434214 NODEF { int sys_lkmnosys(void); } 435215 NODEF { int sys_lkmnosys(void); } 436216 NODEF { int sys_lkmnosys(void); } 437217 NODEF { int sys_lkmnosys(void); } 438218 NODEF { int sys_lkmnosys(void); } 439219 NODEF { int sys_lkmnosys(void); } 440#else /* !LKM */ 441210 EXCL lkmnosys 442211 EXCL lkmnosys 443212 EXCL lkmnosys 444213 EXCL lkmnosys 445214 EXCL lkmnosys 446215 EXCL lkmnosys 447216 EXCL lkmnosys 448217 EXCL lkmnosys 449218 EXCL lkmnosys 450219 EXCL lkmnosys 451#endif /* !LKM */ 452; System calls 220-300 are reserved for use by NetBSD 453#if defined(SYSVSEM) || !defined(_KERNEL) 454220 COMPAT_14 { int sys___semctl(int semid, int semnum, int cmd, \ 455 union __semun *arg); } 456221 STD { int sys_semget(key_t key, int nsems, int semflg); } 457222 STD { int sys_semop(int semid, struct sembuf *sops, \ 458 size_t nsops); } 459223 STD { int sys_semconfig(int flag); } 460#else 461220 EXCL compat_14_semctl 462221 EXCL semget 463222 EXCL semop 464223 EXCL semconfig 465#endif 466#if defined(SYSVMSG) || !defined(_KERNEL) 467224 COMPAT_14 MPSAFE { int sys_msgctl(int msqid, int cmd, \ 468 struct msqid_ds14 *buf); } 469225 STD MPSAFE { int sys_msgget(key_t key, int msgflg); } 470226 STD MPSAFE { int sys_msgsnd(int msqid, const void *msgp, \ 471 size_t msgsz, int msgflg); } 472227 STD MPSAFE { ssize_t sys_msgrcv(int msqid, void *msgp, \ 473 size_t msgsz, long msgtyp, int msgflg); } 474#else 475224 EXCL compat_14_msgctl 476225 EXCL msgget 477226 EXCL msgsnd 478227 EXCL msgrcv 479#endif 480#if defined(SYSVSHM) || !defined(_KERNEL) 481228 STD { void *sys_shmat(int shmid, const void *shmaddr, \ 482 int shmflg); } 483229 COMPAT_14 { int sys_shmctl(int shmid, int cmd, \ 484 struct shmid_ds14 *buf); } 485230 STD { int sys_shmdt(const void *shmaddr); } 486231 STD { int sys_shmget(key_t key, size_t size, int shmflg); } 487#else 488228 EXCL shmat 489229 EXCL compat_14_shmctl 490230 EXCL shmdt 491231 EXCL shmget 492#endif 493232 STD { int sys_clock_gettime(clockid_t clock_id, \ 494 struct timespec *tp); } 495233 STD { int sys_clock_settime(clockid_t clock_id, \ 496 const struct timespec *tp); } 497234 STD { int sys_clock_getres(clockid_t clock_id, \ 498 struct timespec *tp); } 499235 STD { int sys_timer_create(clockid_t clock_id, \ 500 struct sigevent *evp, timer_t *timerid); } 501236 STD { int sys_timer_delete(timer_t timerid); } 502237 STD { int sys_timer_settime(timer_t timerid, int flags, \ 503 const struct itimerspec *value, \ 504 struct itimerspec *ovalue); } 505238 STD { int sys_timer_gettime(timer_t timerid, struct \ 506 itimerspec *value); } 507239 STD { int sys_timer_getoverrun(timer_t timerid); } 508; 509; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 510; 511240 STD MPSAFE { int sys_nanosleep(const struct timespec *rqtp, \ 512 struct timespec *rmtp); } 513241 STD { int sys_fdatasync(int fd); } 514242 STD { int sys_mlockall(int flags); } 515243 STD { int sys_munlockall(void); } 516244 STD MPSAFE { int sys___sigtimedwait(const sigset_t *set, \ 517 siginfo_t *info, \ 518 struct timespec *timeout); } 519245 UNIMPL sys_sigqueue 520; 521; Syscall 246 is free for any use 522; 523246 UNIMPL 524#if defined(P1003_1B_SEMAPHORE) || (!defined(_KERNEL) && defined(_LIBC)) 525247 STD { int sys__ksem_init(unsigned int value, semid_t *idp); } 526248 STD { int sys__ksem_open(const char *name, int oflag, \ 527 mode_t mode, unsigned int value, semid_t *idp); } 528249 STD { int sys__ksem_unlink(const char *name); } 529250 STD { int sys__ksem_close(semid_t id); } 530251 STD { int sys__ksem_post(semid_t id); } 531252 STD { int sys__ksem_wait(semid_t id); } 532253 STD { int sys__ksem_trywait(semid_t id); } 533254 STD { int sys__ksem_getvalue(semid_t id, \ 534 unsigned int *value); } 535255 STD { int sys__ksem_destroy(semid_t id); } 536256 UNIMPL sys__ksem_timedwait 537#else 538247 EXCL sys__ksem_init 539248 EXCL sys__ksem_open 540249 EXCL sys__ksem_unlink 541250 EXCL sys__ksem_close 542251 EXCL sys__ksem_post 543252 EXCL sys__ksem_wait 544253 EXCL sys__ksem_trywait 545254 EXCL sys__ksem_getvalue 546255 EXCL sys__ksem_destroy 547256 UNIMPL sys__ksem_timedwait 548#endif 549257 UNIMPL sys_mq_open 550258 UNIMPL sys_mq_close 551259 UNIMPL sys_mq_unlink 552260 UNIMPL sys_mq_getattr 553261 UNIMPL sys_mq_setattr 554262 UNIMPL sys_mq_notify 555263 UNIMPL sys_mq_send 556264 UNIMPL sys_mq_receive 557265 UNIMPL sys_mq_timedsend 558266 UNIMPL sys_mq_timedreceive 559267 UNIMPL 560268 UNIMPL 561269 UNIMPL 562270 STD { int sys___posix_rename(const char *from, \ 563 const char *to); } 564271 STD { int sys_swapctl(int cmd, void *arg, int misc); } 565272 COMPAT_30 { int sys_getdents(int fd, char *buf, size_t count); } 566273 STD { int sys_minherit(void *addr, size_t len, \ 567 int inherit); } 568274 STD { int sys_lchmod(const char *path, mode_t mode); } 569275 STD { int sys_lchown(const char *path, uid_t uid, \ 570 gid_t gid); } 571276 STD { int sys_lutimes(const char *path, \ 572 const struct timeval *tptr); } 573277 STD { int sys___msync13(void *addr, size_t len, int flags); } 574278 COMPAT_30 { int sys___stat13(const char *path, struct stat13 *ub); } 575279 COMPAT_30 { int sys___fstat13(int fd, struct stat13 *sb); } 576280 COMPAT_30 { int sys___lstat13(const char *path, struct stat13 *ub); } 577281 STD MPSAFE { int sys___sigaltstack14( \ 578 const struct sigaltstack *nss, \ 579 struct sigaltstack *oss); } 580282 STD { int sys___vfork14(void); } 581283 STD { int sys___posix_chown(const char *path, uid_t uid, \ 582 gid_t gid); } 583284 STD { int sys___posix_fchown(int fd, uid_t uid, \ 584 gid_t gid); } 585285 STD { int sys___posix_lchown(const char *path, uid_t uid, \ 586 gid_t gid); } 587286 STD MPSAFE { pid_t sys_getsid(pid_t pid); } 588287 STD { pid_t sys___clone(int flags, void *stack); } 589#if defined(KTRACE) || !defined(_KERNEL) 590288 STD { int sys_fktrace(const int fd, int ops, \ 591 int facs, int pid); } 592#else 593288 EXCL ktrace 594#endif 595289 STD { ssize_t sys_preadv(int fd, \ 596 const struct iovec *iovp, int iovcnt, \ 597 int pad, off_t offset); } 598290 STD { ssize_t sys_pwritev(int fd, \ 599 const struct iovec *iovp, int iovcnt, \ 600 int pad, off_t offset); } 601291 COMPAT_16 MPSAFE { int sys___sigaction14(int signum, \ 602 const struct sigaction *nsa, \ 603 struct sigaction *osa); } 604292 STD MPSAFE { int sys___sigpending14(sigset_t *set); } 605293 STD MPSAFE { int sys___sigprocmask14(int how, \ 606 const sigset_t *set, \ 607 sigset_t *oset); } 608294 STD MPSAFE { int sys___sigsuspend14(const sigset_t *set); } 609295 COMPAT_16 MPSAFE { int sys___sigreturn14(struct sigcontext *sigcntxp); } 610296 STD { int sys___getcwd(char *bufp, size_t length); } 611297 STD { int sys_fchroot(int fd); } 612298 COMPAT_30 { int sys_fhopen(const struct compat_30_fhandle *fhp, int flags); } 613299 COMPAT_30 { int sys_fhstat(const struct compat_30_fhandle *fhp, \ 614 struct stat13 *sb); } 615300 COMPAT_20 { int sys_fhstatfs(const struct compat_30_fhandle *fhp, \ 616 struct statfs12 *buf); } 617#if defined(SYSVSEM) || !defined(_KERNEL) 618301 STD { int sys_____semctl13(int semid, int semnum, int cmd, \ 619 ... union __semun *arg); } 620#else 621301 EXCL ____semctl13 622#endif 623#if defined(SYSVMSG) || !defined(_KERNEL) 624302 STD MPSAFE { int sys___msgctl13(int msqid, int cmd, \ 625 struct msqid_ds *buf); } 626#else 627302 EXCL __msgctl13 628#endif 629#if defined(SYSVSHM) || !defined(_KERNEL) 630303 STD { int sys___shmctl13(int shmid, int cmd, \ 631 struct shmid_ds *buf); } 632#else 633303 EXCL __shmctl13 634#endif 635304 STD { int sys_lchflags(const char *path, u_long flags); } 636305 STD MPSAFE { int sys_issetugid(void); } 637306 STD MPSAFE { int sys_utrace(const char *label, void *addr, \ 638 size_t len); } 639307 STD { int sys_getcontext(struct __ucontext *ucp); } 640308 STD { int sys_setcontext(const struct __ucontext *ucp); } 641309 STD { int sys__lwp_create(const struct __ucontext *ucp, \ 642 u_long flags, lwpid_t *new_lwp); } 643310 STD { int sys__lwp_exit(void); } 644311 STD MPSAFE { lwpid_t sys__lwp_self(void); } 645312 STD MPSAFE { int sys__lwp_wait(lwpid_t wait_for, \ 646 lwpid_t *departed); } 647313 STD MPSAFE { int sys__lwp_suspend(lwpid_t target); } 648314 STD MPSAFE { int sys__lwp_continue(lwpid_t target); } 649315 STD MPSAFE { int sys__lwp_wakeup(lwpid_t target); } 650316 STD MPSAFE { void *sys__lwp_getprivate(void); } 651317 STD MPSAFE { void sys__lwp_setprivate(void *ptr); } 652318 STD { int sys__lwp_kill(lwpid_t target, int signo); } 653319 STD MPSAFE { int sys__lwp_detach(lwpid_t target); } 654320 STD MPSAFE { int sys__lwp_park(const struct timespec *ts, \ 655 struct __ucontext *ucp, const void *hint); } 656321 STD MPSAFE { int sys__lwp_unpark(lwpid_t target, const void *hint); } 657322 STD MPSAFE { ssize_t sys__lwp_unpark_all(const lwpid_t *targets, \ 658 size_t ntargets, const void *hint); } 659; Syscalls 323-339 reserved for LWP syscalls. 660323 UNIMPL 661324 UNIMPL 662325 UNIMPL 663326 UNIMPL 664327 UNIMPL 665328 UNIMPL 666329 UNIMPL 667; Obsolete SA system calls. Must remain until libc's major version is bumped. 668330 STD MPSAFE { int sys_sa_register(void); } 669331 STD MPSAFE { int sys_sa_stacks(void); } 670332 STD MPSAFE { int sys_sa_enable(void); } 671333 STD MPSAFE { int sys_sa_setconcurrency(void); } 672334 STD MPSAFE { int sys_sa_yield(void); } 673335 STD MPSAFE { int sys_sa_preempt(void); } 674336 STD MPSAFE { int sys_sa_unblockyield(void); } 675337 UNIMPL 676338 UNIMPL 677339 UNIMPL 678340 STD MPSAFE { int sys___sigaction_sigtramp(int signum, \ 679 const struct sigaction *nsa, \ 680 struct sigaction *osa, \ 681 const void *tramp, int vers); } 682341 STD { int sys_pmc_get_info(int ctr, int op, void *args); } 683342 STD { int sys_pmc_control(int ctr, int op, void *args); } 684343 STD { int sys_rasctl(void *addr, size_t len, int op); } 685344 STD { int sys_kqueue(void); } 686345 STD { int sys_kevent(int fd, \ 687 const struct kevent *changelist, size_t nchanges, \ 688 struct kevent *eventlist, size_t nevents, \ 689 const struct timespec *timeout); } 690; 691; Syscalls 346-353 are reserved for the IEEE Std1003.1b scheduling syscalls 692; 693346 UNIMPL sys_sched_setparam 694347 UNIMPL sys_sched_getparam 695348 UNIMPL sys_sched_setscheduler 696349 UNIMPL sys_sched_getscheduler 697350 STD MPSAFE { int sys_sched_yield(void); } 698351 UNIMPL sys_sched_get_priority_max 699352 UNIMPL sys_sched_get_priority_min 700353 UNIMPL sys_sched_rr_get_interval 701 702354 STD { int sys_fsync_range(int fd, int flags, off_t start, \ 703 off_t length); } 704355 STD { int sys_uuidgen(struct uuid *store, int count); } 705356 STD { int sys_getvfsstat(struct statvfs *buf, \ 706 size_t bufsize, int flags); } 707357 STD { int sys_statvfs1(const char *path, \ 708 struct statvfs *buf, int flags); } 709358 STD { int sys_fstatvfs1(int fd, struct statvfs *buf, \ 710 int flags); } 711359 COMPAT_30 { int sys_fhstatvfs1(const struct compat_30_fhandle *fhp, \ 712 struct statvfs *buf, int flags); } 713360 STD { int sys_extattrctl(const char *path, int cmd, \ 714 const char *filename, int attrnamespace, \ 715 const char *attrname); } 716361 STD { int sys_extattr_set_file(const char *path, \ 717 int attrnamespace, const char *attrname, \ 718 const void *data, size_t nbytes); } 719362 STD { ssize_t sys_extattr_get_file(const char *path, \ 720 int attrnamespace, const char *attrname, \ 721 void *data, size_t nbytes); } 722363 STD { int sys_extattr_delete_file(const char *path, \ 723 int attrnamespace, const char *attrname); } 724364 STD { int sys_extattr_set_fd(int fd, \ 725 int attrnamespace, const char *attrname, \ 726 const void *data, size_t nbytes); } 727365 STD { ssize_t sys_extattr_get_fd(int fd, \ 728 int attrnamespace, const char *attrname, \ 729 void *data, size_t nbytes); } 730366 STD { int sys_extattr_delete_fd(int fd, \ 731 int attrnamespace, const char *attrname); } 732367 STD { int sys_extattr_set_link(const char *path, \ 733 int attrnamespace, const char *attrname, \ 734 const void *data, size_t nbytes); } 735368 STD { ssize_t sys_extattr_get_link(const char *path, \ 736 int attrnamespace, const char *attrname, \ 737 void *data, size_t nbytes); } 738369 STD { int sys_extattr_delete_link(const char *path, \ 739 int attrnamespace, const char *attrname); } 740370 STD { ssize_t sys_extattr_list_fd(int fd, \ 741 int attrnamespace, void *data, size_t nbytes); } 742371 STD { ssize_t sys_extattr_list_file(const char *path, \ 743 int attrnamespace, void *data, size_t nbytes); } 744372 STD { ssize_t sys_extattr_list_link(const char *path, \ 745 int attrnamespace, void *data, size_t nbytes); } 746373 STD { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ 747 fd_set *ex, const struct timespec *ts, \ 748 const sigset_t *mask); } 749374 STD { int sys_pollts(struct pollfd *fds, u_int nfds, \ 750 const struct timespec *ts, const sigset_t *mask); } 751375 STD { int sys_setxattr(const char *path, \ 752 const char *name, void *value, size_t size, \ 753 int flags); } 754376 STD { int sys_lsetxattr(const char *path, \ 755 const char *name, void *value, size_t size, \ 756 int flags); } 757377 STD { int sys_fsetxattr(int fd, \ 758 const char *name, void *value, size_t size, \ 759 int flags); } 760378 STD { int sys_getxattr(const char *path, \ 761 const char *name, void *value, size_t size); } 762379 STD { int sys_lgetxattr(const char *path, \ 763 const char *name, void *value, size_t size); } 764380 STD { int sys_fgetxattr(int fd, \ 765 const char *name, void *value, size_t size); } 766381 STD { int sys_listxattr(const char *path, \ 767 char *list, size_t size); } 768382 STD { int sys_llistxattr(const char *path, \ 769 char *list, size_t size); } 770383 STD { int sys_flistxattr(int fd, \ 771 char *list, size_t size); } 772384 STD { int sys_removexattr(const char *path, \ 773 const char *name); } 774385 STD { int sys_lremovexattr(const char *path, \ 775 const char *name); } 776386 STD { int sys_fremovexattr(int fd, \ 777 const char *name); } 778387 STD { int sys___stat30(const char *path, struct stat *ub); } 779388 STD { int sys___fstat30(int fd, struct stat *sb); } 780389 STD { int sys___lstat30(const char *path, struct stat *ub); } 781390 STD { int sys___getdents30(int fd, char *buf, size_t count); } 782391 STD { int sys_posix_fadvise(int fd, off_t offset, \ 783 off_t len, int advice); } 784392 COMPAT_30 { int sys___fhstat30(const struct compat_30_fhandle \ 785 *fhp, struct stat *sb); } 786393 STD { int sys___ntp_gettime30(struct ntptimeval *ntvp); } 787394 STD { int sys___socket30(int domain, int type, int protocol); } 788395 STD { int sys___getfh30(const char *fname, void *fhp, \ 789 size_t *fh_size); } 790396 STD { int sys___fhopen40(const void *fhp, size_t fh_size,\ 791 int flags); } 792397 STD { int sys___fhstatvfs140(const void *fhp, \ 793 size_t fh_size, struct statvfs *buf, int flags); } 794398 STD { int sys___fhstat40(const void *fhp, \ 795 size_t fh_size, struct stat *sb); } 796