1 $NetBSD: syscalls.master,v 1.2 2013/05/15 21:39:30 pooka 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 NODEF, UNIMPL, or NOARGS 11; 12; types: 13; NODEF always included 14; UNIMPL unimplemented, not included in system 15; NODEF included, but don't define the syscall number 16; NOARGS included, but don't define the syscall args structure 17; 18; arguments: 19; PAD argument not part of the C interface, used only for padding 20; 21; 22; Support just enough syscalls to make fs-utils run (plus a few other 23; low-hanging fruit) 24; 25 26#include <sys/param.h> 27#include <sys/systm.h> 28#include <sys/signal.h> 29#include <sys/socket.h> 30#include <sys/mount.h> 31#include <sys/sched.h> 32#include <sys/syscallargs.h> 33 34#include "rump_cygwin_syscallargs.h" 35 36%% 37 380 NOARGS { int|sys||nosys(void); } 391 UNIMPL exit 402 UNIMPL fork 413 NOARGS { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } 424 NOARGS { ssize_t|sys||write(int fd, const void *buf, \ 43 size_t nbyte); } 445 NODEF { int|rump_cygwin_sys||open(const char *path, \ 45 int flags, int mode); } 466 NOARGS { int|sys||close(int fd); } 477 UNIMPL wait4 488 UNIMPL creat 499 NOARGS { int|sys||link(const char *path, const char *link); } 5010 NOARGS { int|sys||unlink(const char *path); } 5111 UNIMPL execv 5212 NOARGS { int|sys||chdir(const char *path); } 5313 NOARGS { int|sys||fchdir(int fd); } 5414 UNIMPL mknod 5515 NOARGS { int|sys||chmod(const char *path, int mode); } 5616 NOARGS { int|sys||chown(const char *path, int uid, int gid); } 5717 UNIMPL obreak 5818 UNIMPL getfsstat 5919 UNIMPL lseek 6020 NOARGS { pid_t|sys||getpid_with_ppid(void); } getpid 6121 UNIMPL mount 6222 UNIMPL unmount 6323 NOARGS { int|sys||setuid(int uid); } 6424 NOARGS { int|sys||getuid_with_euid(void); } getuid 6525 NOARGS { int|sys||geteuid(void); } 6626 UNIMPL ptrace 6727 UNIMPL recvmsg 6828 UNIMPL sendmsg 6929 UNIMPL recvfrom 7030 UNIMPL accept 7131 UNIMPL getpeername 7232 UNIMPL getsockname 7333 NOARGS { int|sys||access(const char *path, int flags); } 7434 UNIMPL chflags 7535 UNIMPL fchflags 7636 NOARGS { void|sys||sync(void); } 7737 UNIMPL kill 7838 UNIMPL stat 7939 UNIMPL getppid 8040 UNIMPL lstat 8141 NOARGS { int|sys||dup(int fd); } 8242 NOARGS { int|sys||pipe(void); } 8343 UNIMPL getegid 8444 UNIMPL profil 8545 UNIMPL ktrace 8646 UNIMPL sigaction 8747 NOARGS { int|sys||getgid_with_egid(void); } getgid 8848 UNIMPL sigprocmask 8949 UNIMPL __getlogin 9050 UNIMPL __setlogin 9151 UNIMPL acct 9252 UNIMPL sigpending 9353 UNIMPL sigaltstack 9454 UNIMPL ioctl 9555 UNIMPL reboot 9656 UNIMPL revoke 9757 NOARGS { int|sys||symlink(const char *path, \ 98 const char *link); } 9958 NOARGS { ssize_t|sys||readlink(const char *path, char *buf, \ 100 int count); } 10159 UNIMPL execve 10260 NOARGS { mode_t|sys||umask(mode_t newmask); } 10361 NOARGS { int|sys||chroot(const char *path); } 10462 UNIMPL fstat43 10563 UNIMPL getkerninfo 10664 UNIMPL getpagesize 10765 UNIMPL msync 10866 UNIMPL vfork 10967 UNIMPL vread 11068 UNIMPL vwrite 11169 UNIMPL sbrk 11270 UNIMPL sstk 11371 UNIMPL mmap 11472 UNIMPL ovadvise 11573 UNIMPL munmap 11674 UNIMPL mprotect 11775 UNIMPL madvise 11876 UNIMPL vhangup 11977 UNIMPL vlimit 12078 UNIMPL mincore 12179 NOARGS { int|sys||getgroups(int gidsetsize, \ 122 int *gidset); } 12380 NOARGS { int|sys||setgroups(int gidsetsize, \ 124 const int *gidset); } 12581 NOARGS { int|sys||getpgrp(void); } 12682 NOARGS { int|sys||setpgid(int pid, int pgid); } 12783 UNIMPL setitimer 12884 UNIMPL wait 12985 UNIMPL swapon 13086 UNIMPL getitimer 13187 UNIMPL gethostname 13288 UNIMPL sethostname 13389 UNIMPL getdtablesize 13490 NOARGS { int|sys||dup2(int from, int to); } 13591 UNIMPL getdopt 13692 UNIMPL fcntl 13793 UNIMPL select 13894 UNIMPL setdopt 13995 NOARGS { int|sys||fsync(int fd); } 14096 UNIMPL setpriority 14197 UNIMPL socket 14298 UNIMPL connect 14399 UNIMPL accept 144100 UNIMPL getpriority 145 146101 UNIMPL send 147102 UNIMPL recv 148 149103 UNIMPL sigreturn 150104 UNIMPL bind 151105 UNIMPL setsockopt 152106 UNIMPL listen 153107 UNIMPL vtimes 154108 UNIMPL sigvec 155109 UNIMPL sigblock 156110 UNIMPL sigsetmask 157111 UNIMPL sigsuspend 158112 UNIMPL sigstack 159113 UNIMPL orecvmsg 160114 UNIMPL osendmsg 161115 UNIMPL vtrace 162116 UNIMPL gettimeofday 163117 UNIMPL getrusage 164118 UNIMPL getsockopt 165119 UNIMPL resuba 166120 NOARGS { ssize_t|sys||readv(int fd, \ 167 struct iovec *iovp, int iovcnt); } 168121 NOARGS { ssize_t|sys||writev(int fd, \ 169 struct iovec *iovp, int iovcnt); } 170122 UNIMPL settimeofday 171123 NOARGS { int|sys||fchown(int fd, int uid, int gid); } 172124 NOARGS { int|sys||fchmod(int fd, int mode); } 173125 UNIMPL orecvfrom 174126 NOARGS { int|sys||setreuid(int ruid, int euid); } 175127 NOARGS { int|sys||setregid(int rgid, int egid); } 176128 NOARGS { int|sys||rename(char *from, char *to); } 177129 UNIMPL otruncate 178130 UNIMPL oftruncate 179131 NOARGS { int|sys||flock(int fd, int how); } 180132 UNIMPL mkfifo 181133 UNIMPL sendto 182134 UNIMPL shutdown 183135 UNIMPL socketpair 184136 NOARGS { int|sys||mkdir(const char *path, int mode); } 185137 NOARGS { int|sys||rmdir(const char *path); } 186138 UNIMPL utimes 187 188139 UNIMPL 4.2 sigreturn 189140 UNIMPL adjtime 190141 UNIMPL ogetpeername 191142 UNIMPL ogethostid 192143 UNIMPL osethostid 193144 UNIMPL ogetrlimit 194145 UNIMPL osetrlimit 195146 UNIMPL okillpg 196147 NOARGS { int|sys||setsid(void); } 197148 UNIMPL quotactl 198149 UNIMPL oquota 199150 UNIMPL ogetsockname 200 201; Syscalls 151-180 inclusive are reserved for vendor-specific 202; system calls. (This includes various calls added for compatibity 203; with other Unix variants.) 204; Some of these calls are now supported by BSD... 205151 UNIMPL 206152 UNIMPL 207153 UNIMPL 208154 UNIMPL 209155 UNIMPL nfssvc 210156 UNIMPL ogetdirentries 211157 UNIMPL statfs12 212158 UNIMPL fstatfs12 213159 UNIMPL 214160 UNIMPL 215161 UNIMPL getfh30 216162 UNIMPL ogetdomainname 217163 UNIMPL osetdomainname 218164 UNIMPL ouname 219165 UNIMPL sysarch 220166 UNIMPL 221167 UNIMPL 222168 UNIMPL 223169 UNIMPL 1.0 semsys 224170 UNIMPL 1.0 msgsys 225171 UNIMPL 1.0 shmsys 226172 UNIMPL 227173 NOARGS { ssize_t|sys||pread(int fd, char *buf, \ 228 size_t nbyte, int PAD, off_t offset); } 229174 NOARGS { ssize_t|sys||pwrite(int fd, char *buf, \ 230 size_t nbyte, int PAD, off_t offset); } 231175 UNIMPL ntp_gettime 232176 UNIMPL ntp_adjtime 233177 UNIMPL 234178 UNIMPL 235179 UNIMPL 236180 UNIMPL 237 238; Syscalls 180-199 are used by/reserved for BSD 239181 NOARGS { int|sys||setgid(gid_t gid); } 240182 NOARGS { int|sys||setegid(gid_t egid); } 241183 NOARGS { int|sys||seteuid(uid_t euid); } 242184 UNIMPL lfs_bmapv 243185 UNIMPL lfs_markv 244186 UNIMPL lfs_segclean 245187 UNIMPL lfs_segwait 246188 UNIMPL stat12 247189 UNIMPL fstat12 248190 UNIMPL lstat12 249191 UNIMPL pathconf 250192 UNIMPL fpathconf 251193 UNIMPL 252194 UNIMPL getrlimit 253195 UNIMPL setrlimit 254196 UNIMPL getdirentries 255197 UNIMPL mmap 256198 UNIMPL __syscall 257199 NOARGS { long|sys||lseek(int fd, int PAD, off_t offset, \ 258 int whence); } 259200 NOARGS { int|sys||truncate(const char *path, int PAD, \ 260 off_t length); } 261201 NOARGS { int|sys||ftruncate(int fd, int PAD, off_t length); } 262202 UNIMPL __sysctl 263203 UNIMPL mlock 264204 UNIMPL munlock 265205 UNIMPL undelete 266206 UNIMPL futimes 267207 NOARGS { pid_t|sys||getpgid(pid_t pid); } 268208 UNIMPL reboot 269209 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \ 270 int timeout); } 271; 272; Syscalls 210-219 are reserved for dynamically loaded syscalls 273; 274210 UNIMPL afssys 275211 UNIMPL 276212 UNIMPL 277213 UNIMPL 278214 UNIMPL 279215 UNIMPL 280216 UNIMPL 281217 UNIMPL 282218 UNIMPL 283219 UNIMPL 284220 UNIMPL compat_14_semctl 285221 UNIMPL semget 286222 UNIMPL semop 287223 UNIMPL semconfig 288224 UNIMPL compat_14_msgctl 289225 UNIMPL msgget 290226 UNIMPL msgsnd 291227 UNIMPL msgrcv 292228 UNIMPL shmat 293229 UNIMPL compat_14_shmctl 294230 UNIMPL shmdt 295231 UNIMPL shmget 296 297232 UNIMPL clock_gettime 298233 UNIMPL clock_settime 299234 UNIMPL clock_getres 300235 UNIMPL timer_create 301236 UNIMPL timer_delete 302237 UNIMPL timer_settime 303238 UNIMPL timer_gettime 304239 UNIMPL timer_getoverrun 305; 306; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 307; 308240 UNIMPL nanosleep 309241 UNIMPL fdatasync 310242 UNIMPL mlockall 311243 UNIMPL munlockall 312244 UNIMPL __sigtimedwait 313245 UNIMPL sigqueueinfo 314246 UNIMPL modctl 315247 UNIMPL _ksem_init 316248 UNIMPL _ksem_open 317249 UNIMPL _ksem_unlink 318250 UNIMPL _ksem_close 319251 UNIMPL _ksem_post 320252 UNIMPL _ksem_wait 321253 UNIMPL _ksem_trywait 322254 UNIMPL _ksem_getvalue 323255 UNIMPL _ksem_destroy 324256 UNIMPL _ksem_timedwait 325 326257 UNIMPL mq_open 327258 UNIMPL mq_close 328259 UNIMPL mq_unlink 329260 UNIMPL mq_getattr 330261 UNIMPL mq_setattr 331262 UNIMPL mq_notify 332263 UNIMPL mq_send 333264 UNIMPL mq_receive 334265 UNIMPL mq_timedsend 335266 UNIMPL mq_timedreceive 336267 UNIMPL 337268 UNIMPL 338269 UNIMPL 339270 UNIMPL __posix_rename 340271 UNIMPL swapctl 341272 UNIMPL getdents 342273 UNIMPL minherit 343274 UNIMPL lchmod 344275 UNIMPL lchown 345276 UNIMPL lutimes 346277 UNIMPL msync 347278 UNIMPL stat 348279 UNIMPL fstat 349280 UNIMPL lstat 350281 UNIMPL sigaltstack 351282 UNIMPL vfork 352283 UNIMPL __posix_chown 353284 UNIMPL __posix_fchown 354285 UNIMPL __posix_lchown 355286 NOARGS { pid_t|sys||getsid(pid_t pid); } 356 357287 UNIMPL __clone 358288 UNIMPL fktrace 359289 UNIMPL { ssize_t|sys||preadv(int fd, \ 360 const struct iovec *iovp, int iovcnt, \ 361 int PAD, off_t offset); } 362290 UNIMPL { ssize_t|sys||pwritev(int fd, \ 363 const struct iovec *iovp, int iovcnt, \ 364 int PAD, off_t offset); } 365291 UNIMPL sigaction 366292 UNIMPL sigpending 367293 UNIMPL sigprocmask 368294 UNIMPL sigsuspend 369295 UNIMPL sigreturn 370296 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } 371297 NOARGS { int|sys||fchroot(int fd); } 372298 UNIMPL fhopen 373299 UNIMPL fhstat 374300 UNIMPL fhstatfs 375301 UNIMPL ____semctl13 376302 UNIMPL __msgctl13 377303 UNIMPL __shmctl13 378304 UNIMPL lchflags 379305 UNIMPL issetugid 380306 UNIMPL utrace 381307 UNIMPL getcontext 382308 UNIMPL setcontext 383309 UNIMPL _lwp_create 384310 UNIMPL _lwp_exit 385311 UNIMPL _lwp_self 386312 UNIMPL _lwp_wait 387313 UNIMPL _lwp_suspend 388314 UNIMPL _lwp_continue 389315 UNIMPL _lwp_wakeup 390316 UNIMPL _lwp_getprivate 391317 UNIMPL _lwp_setprivate 392318 UNIMPL _lwp_kill 393319 UNIMPL _lwp_detach 394320 UNIMPL _lwp_park 395321 UNIMPL _lwp_unpark 396322 UNIMPL _lwp_unpark_all 397323 UNIMPL _lwp_setname 398324 UNIMPL _lwp_getname 399325 UNIMPL _lwp_ctl 400 401; Syscalls 326-339 reserved for LWP syscalls. 402326 UNIMPL 403327 UNIMPL 404328 UNIMPL 405329 UNIMPL 406; SA system calls. 407330 UNIMPL sa_register 408331 UNIMPL sa_stacks 409332 UNIMPL sa_enable 410333 UNIMPL sa_setconcurrency 411334 UNIMPL sa_yield 412335 UNIMPL sa_preempt 413336 UNIMPL sys_sa_unblockyield 414; 415; Syscalls 337-339 are reserved for other scheduler activation syscalls. 416; 417337 UNIMPL 418338 UNIMPL 419339 UNIMPL 420 421340 UNIMPL __sigaction_sigtramp 422341 UNIMPL pmc_get_info 423342 UNIMPL pmc_control 424343 UNIMPL rasctl 425344 UNIMPL kqueue 426345 UNIMPL kevent 427 428; Scheduling system calls. 429346 UNIMPL _sched_setparam 430347 UNIMPL _sched_getparam 431348 UNIMPL _sched_setaffinity 432349 UNIMPL _sched_getaffinity 433350 UNIMPL sched_yield 434351 UNIMPL 435352 UNIMPL 436353 UNIMPL 437 438354 UNIMPL fsync_range 439355 UNIMPL uuidgen 440356 UNIMPL getvfsstat 441357 UNIMPL statvfs1 442358 UNIMPL fstatvfs1 443359 UNIMPL fhstatvfs1 444360 UNIMPL extattrctl 445361 UNIMPL extattr_set_file 446362 UNIMPL extattr_get_file 447363 UNIMPL extattr_delete_file 448364 UNIMPL extattr_set_fd 449365 UNIMPL extattr_get_fd 450366 UNIMPL extattr_delete_fd 451367 UNIMPL extattr_set_link 452368 UNIMPL extattr_get_link 453369 UNIMPL extattr_delete_link 454370 UNIMPL extattr_list_fd 455371 UNIMPL extattr_list_file 456372 UNIMPL extattr_list_link 457373 UNIMPL pselect 458374 UNIMPL pollts 459375 UNIMPL setxattr 460376 UNIMPL lsetxattr 461377 UNIMPL fsetxattr 462378 UNIMPL getxattr 463379 UNIMPL lgetxattr 464380 UNIMPL fgetxattr 465381 UNIMPL listxattr 466382 UNIMPL llistxattr 467383 UNIMPL flistxattr 468384 UNIMPL removexattr 469385 UNIMPL lremovexattr 470386 UNIMPL fremovexattr 471387 UNIMPL stat30 472388 UNIMPL fstat30 473389 UNIMPL lstat30 474390 NODEF { int|rump_cygwin_sys||getdents(int fd, \ 475 char *buf, size_t nbytes); } 476391 UNIMPL old posix_fadvise 477392 UNIMPL fhstat 478393 UNIMPL ntp_gettime 479394 UNIMPL socket 480395 UNIMPL getfh 481396 UNIMPL fhopen 482397 UNIMPL fhstatvfs1 483398 UNIMPL fhstat 484 485; Asynchronous I/O system calls 486399 UNIMPL aio_cancel 487400 UNIMPL aio_error 488401 UNIMPL aio_fsync 489402 UNIMPL aio_read 490403 UNIMPL aio_return 491404 UNIMPL aio_suspend 492405 UNIMPL aio_write 493406 UNIMPL lio_listio 494 495407 UNIMPL 496408 UNIMPL 497409 UNIMPL 498 499410 UNIMPL mount 500411 UNIMPL mremap 501 502; Processor-sets system calls 503412 UNIMPL pset_create 504413 UNIMPL pset_destroy 505414 UNIMPL pset_assign 506415 UNIMPL _pset_bind 507416 UNIMPL fadvise 508417 UNIMPL select 509418 UNIMPL gettimeofday 510419 UNIMPL settimeofday 511420 NOARGS { int|compat_50_sys||utimes(char *path, \ 512 struct timeval50 *tptr); } 513421 UNIMPL adjtime 514422 UNIMPL lfs_segwait 515423 NOARGS { int|compat_50_sys||futimes(int fd, \ 516 struct timeval50 *tptr); } 517424 UNIMPL lutimes 518425 UNIMPL setitimer 519426 UNIMPL getitimer 520427 UNIMPL clock_gettime 521428 UNIMPL clock_settime 522429 UNIMPL clock_getres 523430 UNIMPL nanosleep 524431 UNIMPL __sigtimedwait 525432 UNIMPL mq_timedsend 526433 UNIMPL mq_timedreceive 527434 UNIMPL _lwp_park 528435 UNIMPL kevent 529436 UNIMPL pselect 530437 UNIMPL ppoll 531438 UNIMPL aio_suspend 532439 NODEF { int|rump_cygwin_sys||stat(const char *path, \ 533 struct cygwin_stat *sp); } 534440 NODEF { int|rump_cygwin_sys||fstat(int fd, \ 535 struct cygwin_stat *sp); } 536441 NODEF { int|rump_cygwin_sys||lstat(const char *path, \ 537 struct cygwin_stat *sp); } 538442 UNIMPL __semctl 539443 UNIMPL shmctl 540444 UNIMPL msgctl 541445 UNIMPL getrusage 542446 UNIMPL timer_settime 543447 UNIMPL timer_gettime 544448 UNIMPL ntp_gettime 545449 UNIMPL wait4 546450 NOARGS { int|sys|50|mknod(const char *path, mode_t mode, \ 547 int dev); } 548451 UNIMPL fhstat 549 550; 452 only ever appeared in 5.99.x and can be reused after netbsd-7 551452 UNIMPL 5.99 quotactl 552453 UNIMPL pipe2 553454 UNIMPL dup3 554455 UNIMPL kqueue1 555456 UNIMPL paccept 556457 UNIMPL linkat 557458 UNIMPL renameat 558459 UNIMPL mkfifoat 559460 UNIMPL mknodat 560461 UNIMPL mkdirat 561462 UNIMPL faccessat 562463 UNIMPL fchmodat 563464 UNIMPL fchownat 564465 UNIMPL fexecve 565466 UNIMPL fstatat 566467 UNIMPL utimensat 567468 UNIMPL openat 568469 UNIMPL readlinkat 569470 UNIMPL symlinkat 570471 UNIMPL unlinkat 571472 UNIMPL futimens 572473 UNIMPL __quotactl 573474 UNIMPL posix_spawn 574475 UNIMPL recvmmsg 575476 UNIMPL sendmmsg 576