1 $NetBSD: syscalls.master,v 1.2 2013/02/17 15:17:40 stacktic 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; The purpose of this syscalls.master is to map to the Linux types which 23; are marshalled into the arg structure by the clientside rump_syscalls.c 24; code in librumpclient. 25; 26 27#include <sys/param.h> 28#include <sys/systm.h> 29#include <sys/signal.h> 30#include <sys/socket.h> 31#include <sys/mount.h> 32#include <sys/sched.h> 33#include <sys/syscallargs.h> 34 35#include <compat/linux/common/linux_types.h> 36#include <compat/linux/common/linux_signal.h> 37 38#include "rump_linux_syscallargs.h" 39 40%% 41 420 NOARGS { int|linux_sys||nosys(void); } 431 UNIMPL exit 442 UNIMPL fork 453 NOARGS { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } 464 NOARGS { ssize_t|sys||write(int fd, const void *buf, \ 47 size_t nbyte); } 485 NODEF { int|linux_sys||open(const char *path, \ 49 int flags, int mode); } 506 NOARGS { int|sys||close(int fd); } 517 UNIMPL wait4 528 UNIMPL creat 539 NOARGS { int|sys||link(const char *path, const char *link); } 5410 NODEF { int|linux_sys||unlink(const char *path); } 5511 UNIMPL execv 5612 NOARGS { int|sys||chdir(const char *path); } 5713 NOARGS { int|sys||fchdir(int fd); } 5814 UNIMPL mknod 5915 NOARGS { int|sys||chmod(const char *path, mode_t mode); } 6016 NOARGS { int|sys||__posix_chown(const char *path, uid_t uid, \ 61 gid_t gid); } 6217 UNIMPL obreak 6318 UNIMPL getfsstat 6419 UNIMPL lseek 6520 NOARGS { pid_t|sys||getpid_with_ppid(void); } getpid 6621 UNIMPL mount 6722 UNIMPL unmount 6823 NOARGS { int|sys||setuid(uid_t uid); } 6924 NOARGS { uid_t|sys||getuid_with_euid(void); } getuid 7025 NOARGS { uid_t|sys||geteuid(void); } 7126 UNIMPL ptrace 7227 NODEF { ssize_t|linux_sys||recvmsg(int s, \ 73 struct linux_msghdr *msg, int flags); } 7428 NODEF { ssize_t|linux_sys||sendmsg(int s, \ 75 const struct linux_msghdr *msg, int flags); } 7629 NODEF { ssize_t|linux_sys||recvfrom(int s, void *buf, \ 77 int len, int flags, struct osockaddr *from, \ 78 int *fromlenaddr); } 7930 NODEF { int|linux_sys||accept(int s, struct osockaddr *name, \ 80 int *anamelen); } 8131 NODEF { int|linux_sys||getpeername(int fdes, \ 82 struct osockaddr *asa, int *alen); } 8332 NODEF { int|linux_sys||getsockname(int fdes, \ 84 struct osockaddr *asa, int *alen); } 8533 NOARGS { int|sys||access(const char *path, int flags); } 8634 UNIMPL chflags 8735 UNIMPL fchflags 8836 NOARGS { void|sys||sync(void); } 8937 UNIMPL kill 9038 UNIMPL stat 9139 UNIMPL getppid 9240 UNIMPL lstat 9341 NOARGS { int|sys||dup(int fd); } 94 95; we mimic the librumpclient calling convention, therefore no linux_sys_pipe 9642 NOARGS { int|sys||pipe(void); } 97 9843 UNIMPL getegid 9944 UNIMPL profil 10045 UNIMPL ktrace 10146 UNIMPL sigaction 10247 NOARGS { gid_t|sys||getgid_with_egid(void); } getgid 10348 UNIMPL sigprocmask 10449 UNIMPL __getlogin 10550 UNIMPL __setlogin 10651 UNIMPL acct 10752 UNIMPL sigpending 10853 UNIMPL sigaltstack 10954 NODEF { int|linux_sys||ioctl(int fd, \ 110 u_long com, void *data); } 11155 UNIMPL reboot 11256 UNIMPL revoke 11357 NOARGS { int|sys||symlink(const char *path, \ 114 const char *link); } 11558 NOARGS { ssize_t|sys||readlink(const char *path, char *buf, \ 116 int count); } 11759 UNIMPL execve 11860 NOARGS { mode_t|sys||umask(mode_t newmask); } 11961 NOARGS { int|sys||chroot(const char *path); } 12062 UNIMPL fstat43 12163 UNIMPL getkerninfo 12264 UNIMPL getpagesize 12365 UNIMPL msync 12466 UNIMPL vfork 12567 UNIMPL vread 12668 UNIMPL vwrite 12769 UNIMPL sbrk 12870 UNIMPL sstk 12971 UNIMPL mmap 13072 UNIMPL ovadvise 13173 UNIMPL munmap 13274 UNIMPL mprotect 13375 UNIMPL madvise 13476 UNIMPL vhangup 13577 UNIMPL vlimit 13678 UNIMPL mincore 13779 NOARGS { int|sys||getgroups(int gidsetsize, \ 138 int *gidset); } 13980 NOARGS { int|sys||setgroups(int gidsetsize, \ 140 const int *gidset); } 14181 NOARGS { int|sys||getpgrp(void); } 14282 NOARGS { int|sys||setpgid(int pid, int pgid); } 14383 UNIMPL setitimer 14484 UNIMPL wait 14585 UNIMPL swapon 14686 UNIMPL getitimer 14787 UNIMPL gethostname 14888 UNIMPL sethostname 14989 UNIMPL getdtablesize 15090 NOARGS { int|sys||dup2(int from, int to); } 15191 UNIMPL getdopt 15292 NODEF { int|linux_sys||fcntl(int fd, int cmd, void *arg); } 15393 UNIMPL select 15494 UNIMPL setdopt 15595 NOARGS { int|sys||fsync(int fd); } 15696 UNIMPL setpriority 15797 UNIMPL socket 15898 NODEF { int|linux_sys||connect(int s, \ 159 const struct osockaddr *name, \ 160 unsigned int namelen); } 16199 UNIMPL accept 162100 UNIMPL getpriority 163 164101 UNIMPL send 165102 UNIMPL recv 166 167103 UNIMPL sigreturn 168104 NODEF { int|linux_sys||bind(int s, \ 169 const struct osockaddr *name, unsigned namelen); } 170105 NODEF { int|linux_sys||setsockopt(int s, int level, \ 171 int name, const void *val, int optlen); } 172106 NOARGS { int|sys||listen(int s, int backlog); } 173107 UNIMPL vtimes 174108 UNIMPL sigvec 175109 UNIMPL sigblock 176110 UNIMPL sigsetmask 177111 UNIMPL sigsuspend 178112 UNIMPL sigstack 179113 UNIMPL orecvmsg 180114 UNIMPL osendmsg 181115 UNIMPL vtrace 182116 UNIMPL gettimeofday 183117 UNIMPL getrusage 184118 NODEF { int|linux_sys||getsockopt(int s, int level, \ 185 int name, void *val, int *avalsize); } 186119 UNIMPL resuba 187120 NOARGS { ssize_t|sys||readv(int fd, \ 188 const struct iovec *iovp, int iovcnt); } 189121 NOARGS { ssize_t|sys||writev(int fd, \ 190 const struct iovec *iovp, int iovcnt); } 191122 UNIMPL settimeofday 192123 NOARGS { int|sys||__posix_fchown(int fd, int uid, int gid); } 193124 NOARGS { int|sys||fchmod(int fd, mode_t mode); } 194125 UNIMPL orecvfrom 195126 NOARGS { int|sys||setreuid(uid_t ruid, uid_t euid); } 196127 NOARGS { int|sys||setregid(gid_t rgid, gid_t egid); } 197128 NOARGS { int|sys||__posix_rename(const char *from, \ 198 const char *to); } 199129 UNIMPL otruncate 200130 UNIMPL oftruncate 201131 NOARGS { int|sys||flock(int fd, int how); } 202132 UNIMPL mkfifo 203133 NODEF { int|linux_sys||sendto(int s, void *buf, \ 204 int len, int flags, const struct osockaddr *to, \ 205 int tolen); } 206134 NOARGS { int|sys||shutdown(int s, int how); } 207135 NODEF { int|linux_sys||socketpair(int domain, int type, \ 208 int protocol, int *rsv); } 209136 NOARGS { int|sys||mkdir(const char *path, mode_t mode); } 210137 NOARGS { int|sys||rmdir(const char *path); } 211138 UNIMPL utimes 212 213139 UNIMPL 4.2 sigreturn 214140 UNIMPL adjtime 215141 UNIMPL ogetpeername 216142 UNIMPL ogethostid 217143 UNIMPL osethostid 218144 UNIMPL ogetrlimit 219145 UNIMPL osetrlimit 220146 UNIMPL okillpg 221147 NOARGS { int|sys||setsid(void); } 222148 UNIMPL quotactl 223149 UNIMPL oquota 224150 UNIMPL ogetsockname 225 226; Syscalls 151-180 inclusive are reserved for vendor-specific 227; system calls. (This includes various calls added for compatibity 228; with other Unix variants.) 229; Some of these calls are now supported by BSD... 230151 UNIMPL 231152 UNIMPL 232153 UNIMPL 233154 UNIMPL 234155 UNIMPL nfssvc 235156 UNIMPL ogetdirentries 236157 UNIMPL statfs12 237158 UNIMPL fstatfs12 238159 UNIMPL 239160 UNIMPL 240161 UNIMPL getfh30 241162 UNIMPL ogetdomainname 242163 UNIMPL osetdomainname 243164 UNIMPL ouname 244165 UNIMPL sysarch 245166 UNIMPL 246167 UNIMPL 247168 UNIMPL 248169 UNIMPL 1.0 semsys 249170 UNIMPL 1.0 msgsys 250171 UNIMPL 1.0 shmsys 251172 UNIMPL 252173 NODEF { ssize_t|linux_sys||pread(int fd, char *buf, \ 253 size_t nbyte, int PAD, linux_off_t offset); } 254174 NODEF { ssize_t|linux_sys||pwrite(int fd, char *buf, \ 255 size_t nbyte, int PAD, linux_off_t offset); } 256175 UNIMPL ntp_gettime 257176 UNIMPL ntp_adjtime 258177 UNIMPL 259178 UNIMPL 260179 UNIMPL 261180 UNIMPL 262 263; Syscalls 180-199 are used by/reserved for BSD 264181 NOARGS { int|sys||setgid(gid_t gid); } 265182 NOARGS { int|sys||setegid(gid_t egid); } 266183 NOARGS { int|sys||seteuid(uid_t euid); } 267184 UNIMPL lfs_bmapv 268185 UNIMPL lfs_markv 269186 UNIMPL lfs_segclean 270187 UNIMPL lfs_segwait 271188 UNIMPL stat12 272189 UNIMPL fstat12 273190 UNIMPL lstat12 274191 UNIMPL pathconf 275192 UNIMPL fpathconf 276193 UNIMPL 277194 NODEF { int|linux_sys||getrlimit(int which, \ 278 struct orlimit *rlp); } 279195 NODEF { int|linux_sys||setrlimit(int which, \ 280 const struct orlimit *rlp); } 281196 UNIMPL getdirentries 282197 UNIMPL mmap 283198 UNIMPL __syscall 284199 NOARGS { off_t|sys||lseek(int fd, int PAD, off_t offset, \ 285 int whence); } 286200 NOARGS { int|sys||truncate(const char *path, int PAD, \ 287 off_t length); } 288201 NOARGS { int|sys||ftruncate(int fd, int PAD, off_t length); } 289202 UNIMPL __sysctl 290203 UNIMPL mlock 291204 UNIMPL munlock 292205 UNIMPL undelete 293206 UNIMPL futimes 294207 NOARGS { pid_t|sys||getpgid(pid_t pid); } 295208 UNIMPL reboot 296209 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \ 297 int timeout); } 298; 299; Syscalls 210-219 are reserved for dynamically loaded syscalls 300; 301210 UNIMPL afssys 302211 UNIMPL 303212 UNIMPL 304213 UNIMPL 305214 UNIMPL 306215 UNIMPL 307216 UNIMPL 308217 UNIMPL 309218 UNIMPL 310219 UNIMPL 311220 UNIMPL compat_14_semctl 312221 UNIMPL semget 313222 UNIMPL semop 314223 UNIMPL semconfig 315224 UNIMPL compat_14_msgctl 316225 UNIMPL msgget 317226 UNIMPL msgsnd 318227 UNIMPL msgrcv 319228 UNIMPL shmat 320229 UNIMPL compat_14_shmctl 321230 UNIMPL shmdt 322231 UNIMPL shmget 323 324232 UNIMPL clock_gettime 325233 UNIMPL clock_settime 326234 UNIMPL clock_getres 327235 UNIMPL timer_create 328236 UNIMPL timer_delete 329237 UNIMPL timer_settime 330238 UNIMPL timer_gettime 331239 UNIMPL timer_getoverrun 332; 333; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls 334; 335240 UNIMPL nanosleep 336241 NODEF { int|linux_sys||fdatasync(int fd); } 337242 UNIMPL mlockall 338243 UNIMPL munlockall 339244 UNIMPL __sigtimedwait 340245 UNIMPL sigqueueinfo 341246 UNIMPL modctl 342247 UNIMPL _ksem_init 343248 UNIMPL _ksem_open 344249 UNIMPL _ksem_unlink 345250 UNIMPL _ksem_close 346251 UNIMPL _ksem_post 347252 UNIMPL _ksem_wait 348253 UNIMPL _ksem_trywait 349254 UNIMPL _ksem_getvalue 350255 UNIMPL _ksem_destroy 351256 UNIMPL _ksem_timedwait 352 353257 UNIMPL mq_open 354258 UNIMPL mq_close 355259 UNIMPL mq_unlink 356260 UNIMPL mq_getattr 357261 UNIMPL mq_setattr 358262 UNIMPL mq_notify 359263 UNIMPL mq_send 360264 UNIMPL mq_receive 361265 UNIMPL mq_timedsend 362266 UNIMPL mq_timedreceive 363267 UNIMPL 364268 UNIMPL 365269 UNIMPL 366270 UNIMPL __posix_rename 367271 UNIMPL swapctl 368272 UNIMPL getdents 369273 UNIMPL minherit 370274 UNIMPL lchmod 371275 UNIMPL lchown 372276 UNIMPL lutimes 373277 UNIMPL msync 374278 UNIMPL stat 375279 UNIMPL fstat 376280 UNIMPL lstat 377281 UNIMPL sigaltstack 378282 UNIMPL vfork 379283 UNIMPL __posix_chown 380284 UNIMPL __posix_fchown 381285 UNIMPL __posix_lchown 382286 NOARGS { pid_t|sys||getsid(pid_t pid); } 383 384287 UNIMPL __clone 385288 UNIMPL fktrace 386289 UNIMPL { ssize_t|sys||preadv(int fd, \ 387 const struct iovec *iovp, int iovcnt, \ 388 int PAD, off_t offset); } 389290 UNIMPL { ssize_t|sys||pwritev(int fd, \ 390 const struct iovec *iovp, int iovcnt, \ 391 int PAD, off_t offset); } 392291 UNIMPL sigaction 393292 UNIMPL sigpending 394293 UNIMPL sigprocmask 395294 UNIMPL sigsuspend 396295 UNIMPL sigreturn 397296 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } 398297 NOARGS { int|sys||fchroot(int fd); } 399298 UNIMPL fhopen 400299 UNIMPL fhstat 401300 UNIMPL fhstatfs 402301 UNIMPL ____semctl13 403302 UNIMPL __msgctl13 404303 UNIMPL __shmctl13 405304 UNIMPL lchflags 406305 UNIMPL issetugid 407306 UNIMPL utrace 408307 UNIMPL getcontext 409308 UNIMPL setcontext 410309 UNIMPL _lwp_create 411310 UNIMPL _lwp_exit 412311 UNIMPL _lwp_self 413312 UNIMPL _lwp_wait 414313 UNIMPL _lwp_suspend 415314 UNIMPL _lwp_continue 416315 UNIMPL _lwp_wakeup 417316 UNIMPL _lwp_getprivate 418317 UNIMPL _lwp_setprivate 419318 UNIMPL _lwp_kill 420319 UNIMPL _lwp_detach 421320 UNIMPL _lwp_park 422321 UNIMPL _lwp_unpark 423322 UNIMPL _lwp_unpark_all 424323 UNIMPL _lwp_setname 425324 UNIMPL _lwp_getname 426325 UNIMPL _lwp_ctl 427 428; Syscalls 326-339 reserved for LWP syscalls. 429326 UNIMPL 430327 UNIMPL 431328 UNIMPL 432329 UNIMPL 433; SA system calls. 434330 UNIMPL sa_register 435331 UNIMPL sa_stacks 436332 UNIMPL sa_enable 437333 UNIMPL sa_setconcurrency 438334 UNIMPL sa_yield 439335 UNIMPL sa_preempt 440336 UNIMPL sys_sa_unblockyield 441; 442; Syscalls 337-339 are reserved for other scheduler activation syscalls. 443; 444337 UNIMPL 445338 UNIMPL 446339 UNIMPL 447 448340 UNIMPL __sigaction_sigtramp 449341 UNIMPL pmc_get_info 450342 UNIMPL pmc_control 451343 UNIMPL rasctl 452344 UNIMPL kqueue 453345 UNIMPL kevent 454 455; Scheduling system calls. 456346 UNIMPL _sched_setparam 457347 UNIMPL _sched_getparam 458348 UNIMPL _sched_setaffinity 459349 UNIMPL _sched_getaffinity 460350 UNIMPL sched_yield 461351 UNIMPL 462352 UNIMPL 463353 UNIMPL 464 465354 UNIMPL fsync_range 466355 UNIMPL uuidgen 467356 UNIMPL getvfsstat 468357 UNIMPL statvfs1 469358 UNIMPL fstatvfs1 470359 UNIMPL fhstatvfs1 471360 UNIMPL extattrctl 472361 UNIMPL extattr_set_file 473362 UNIMPL extattr_get_file 474363 UNIMPL extattr_delete_file 475364 UNIMPL extattr_set_fd 476365 UNIMPL extattr_get_fd 477366 UNIMPL extattr_delete_fd 478367 UNIMPL extattr_set_link 479368 UNIMPL extattr_get_link 480369 UNIMPL extattr_delete_link 481370 UNIMPL extattr_list_fd 482371 UNIMPL extattr_list_file 483372 UNIMPL extattr_list_link 484373 UNIMPL pselect 485374 UNIMPL pollts 486375 UNIMPL setxattr 487376 UNIMPL lsetxattr 488377 UNIMPL fsetxattr 489378 UNIMPL getxattr 490379 UNIMPL lgetxattr 491380 UNIMPL fgetxattr 492381 UNIMPL listxattr 493382 UNIMPL llistxattr 494383 UNIMPL flistxattr 495384 UNIMPL removexattr 496385 UNIMPL lremovexattr 497386 UNIMPL fremovexattr 498387 UNIMPL stat30 499388 UNIMPL fstat30 500389 UNIMPL lstat30 501390 NODEF { int|linux_sys||getdents(int fd, \ 502 struct linux_dirent *dent, unsigned int count); } 503391 UNIMPL old posix_fadvise 504392 UNIMPL fhstat 505393 UNIMPL ntp_gettime 506394 NODEF { int|linux_sys||socket(int domain, \ 507 int type, int protocol); } 508395 UNIMPL getfh 509396 UNIMPL fhopen 510397 UNIMPL fhstatvfs1 511398 UNIMPL fhstat 512 513; Asynchronous I/O system calls 514399 UNIMPL aio_cancel 515400 UNIMPL aio_error 516401 UNIMPL aio_fsync 517402 UNIMPL aio_read 518403 UNIMPL aio_return 519404 UNIMPL aio_suspend 520405 UNIMPL aio_write 521406 UNIMPL lio_listio 522 523407 UNIMPL 524408 UNIMPL 525409 UNIMPL 526 527410 UNIMPL mount 528411 UNIMPL mremap 529 530; Processor-sets system calls 531412 UNIMPL pset_create 532413 UNIMPL pset_destroy 533414 UNIMPL pset_assign 534415 UNIMPL _pset_bind 535416 UNIMPL fadvise 536417 NODEF { int|linux_sys||select(int nd, \ 537 fd_set *in, fd_set *ou, fd_set *ex, \ 538 struct timeval50 *tv); } 539418 UNIMPL gettimeofday 540419 UNIMPL settimeofday 541420 UNIMPL utimes 542421 UNIMPL adjtime 543422 UNIMPL lfs_segwait 544423 UNIMPL futimes 545424 UNIMPL lutimes 546425 UNIMPL setitimer 547426 UNIMPL getitimer 548427 UNIMPL clock_gettime 549428 UNIMPL clock_settime 550429 UNIMPL clock_getres 551430 UNIMPL nanosleep 552431 UNIMPL __sigtimedwait 553432 UNIMPL mq_timedsend 554433 UNIMPL mq_timedreceive 555434 UNIMPL _lwp_park 556435 UNIMPL kevent 557436 UNIMPL pselect 558437 NODEF { int|linux_sys||ppoll(struct pollfd *fds, \ 559 u_int nfds, const struct linux_timespec *timeout, \ 560 const linux_sigset_t *mask);} 561438 UNIMPL aio_suspend 562439 NODEF { int|linux_sys||stat64(const char *path, \ 563 struct linux_stat64 *sp); } 564440 NODEF { int|linux_sys||fstat64(int fd, \ 565 struct linux_stat64 *sp); } 566441 NODEF { int|linux_sys||lstat64(const char *path, \ 567 struct linux_stat64 *sp); } 568442 UNIMPL __semctl 569443 UNIMPL shmctl 570444 UNIMPL msgctl 571445 UNIMPL getrusage 572446 UNIMPL timer_settime 573447 UNIMPL timer_gettime 574448 UNIMPL ntp_gettime 575449 UNIMPL wait4 576450 NODEF { int|linux_sys||mknod(const char *path, mode_t mode, \ 577 int dev); } 578451 UNIMPL fhstat 579 580; 452 only ever appeared in 5.99.x and can be reused after netbsd-7 581452 UNIMPL 5.99 quotactl 582453 UNIMPL pipe2 583454 UNIMPL dup3 584455 UNIMPL kqueue1 585456 UNIMPL paccept 586457 UNIMPL linkat 587458 UNIMPL renameat 588459 UNIMPL mkfifoat 589460 UNIMPL mknodat 590461 UNIMPL mkdirat 591462 UNIMPL faccessat 592463 UNIMPL fchmodat 593464 UNIMPL fchownat 594465 UNIMPL fexecve 595466 UNIMPL fstatat 596467 UNIMPL utimensat 597468 UNIMPL openat 598469 UNIMPL readlinkat 599470 UNIMPL symlinkat 600471 UNIMPL unlinkat 601472 UNIMPL futimens 602473 UNIMPL __quotactl 603474 UNIMPL posix_spawn 604475 UNIMPL recvmmsg 605476 UNIMPL sendmmsg 606