Module Name: src Committed By: pooka Date: Wed Apr 10 16:44:55 UTC 2013
Added Files: src/sys/rump/kern/lib/libsys_cygwin: Makefile component.c rump_cygwin_compat.c shlib_version syscalls.conf syscalls.master Log Message: cygwin compat To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/lib/libsys_cygwin/Makefile \ src/sys/rump/kern/lib/libsys_cygwin/component.c \ src/sys/rump/kern/lib/libsys_cygwin/rump_cygwin_compat.c \ src/sys/rump/kern/lib/libsys_cygwin/shlib_version \ src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf \ src/sys/rump/kern/lib/libsys_cygwin/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Added files: Index: src/sys/rump/kern/lib/libsys_cygwin/Makefile diff -u /dev/null src/sys/rump/kern/lib/libsys_cygwin/Makefile:1.1 --- /dev/null Wed Apr 10 16:44:55 2013 +++ src/sys/rump/kern/lib/libsys_cygwin/Makefile Wed Apr 10 16:44:54 2013 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2013/04/10 16:44:54 pooka Exp $ +# + +LIB= rumpkern_sys_cygwin + +SRCS= rump_cygwin_compat.c rump_cygwin_sysent.c component.c + +# XXX +CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern + +.include <bsd.lib.mk> +.include <bsd.klinks.mk> Index: src/sys/rump/kern/lib/libsys_cygwin/component.c diff -u /dev/null src/sys/rump/kern/lib/libsys_cygwin/component.c:1.1 --- /dev/null Wed Apr 10 16:44:55 2013 +++ src/sys/rump/kern/lib/libsys_cygwin/component.c Wed Apr 10 16:44:54 2013 @@ -0,0 +1,31 @@ +/* $NetBSD: component.c,v 1.1 2013/04/10 16:44:54 pooka Exp $ */ + +#include <sys/param.h> +#include <sys/proc.h> + +#include <uvm/uvm_extern.h> + +#include "rump_private.h" + +#include "rump_cygwin_syscall.h" + +extern struct sysent rump_cygwin_sysent[]; + +struct emul emul_rump_sys_cygwin = { + .e_name = "cygwin-rump", + .e_sysent = rump_cygwin_sysent, +#ifndef __HAVE_MINIMAL_EMUL + .e_nsysent = RUMP_CYGWIN_SYS_NSYSENT, +#endif + .e_vm_default_addr = uvm_default_mapaddr, +#ifdef __HAVE_SYSCALL_INTERN + .e_syscall_intern = syscall_intern, +#endif +}; + +RUMP_COMPONENT(RUMP_COMPONENT_KERN) +{ + extern struct emul *emul_default; + + emul_default = &emul_rump_sys_cygwin; +} Index: src/sys/rump/kern/lib/libsys_cygwin/rump_cygwin_compat.c diff -u /dev/null src/sys/rump/kern/lib/libsys_cygwin/rump_cygwin_compat.c:1.1 --- /dev/null Wed Apr 10 16:44:55 2013 +++ src/sys/rump/kern/lib/libsys_cygwin/rump_cygwin_compat.c Wed Apr 10 16:44:54 2013 @@ -0,0 +1,251 @@ +/* $NetBSD: rump_cygwin_compat.c,v 1.1 2013/04/10 16:44:54 pooka Exp $ */ + +/* + * Copyright (c) 2013 Antti Kantee. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/param.h> +#include <sys/dirent.h> +#include <sys/fcntl.h> +#include <sys/file.h> +#include <sys/filedesc.h> +#include <sys/malloc.h> +#include <sys/namei.h> +#include <sys/stat.h> +#include <sys/syscallargs.h> +#include <sys/vnode.h> +#include <sys/vfs_syscalls.h> + +#include <compat/sys/time_types.h> + +#include "rump_cygwin_syscallargs.h" + +struct cygwin_stat { + int st_dev; + int64_t st_ino; + int st_mode; + unsigned short st_nlink; + int st_uid; + int st_gid; + int st_rdev; + off_t st_size; + + struct timespec50 st_atim; + struct timespec50 st_mtim; + struct timespec50 st_ctim; + + long st_blksize; + uint64_t st_blocks; + + struct timespec50 st_btim; +}; + +#define PARCOPY(a) ssb->a = sb->a +static void +bsd_to_cygwin_stat(const struct stat *sb, struct cygwin_stat *ssb) +{ + + memset(ssb, 0, sizeof(*ssb)); + PARCOPY(st_dev); + PARCOPY(st_ino); + PARCOPY(st_mode); + PARCOPY(st_nlink); + PARCOPY(st_uid); + PARCOPY(st_gid); + PARCOPY(st_rdev); + PARCOPY(st_size); + PARCOPY(st_blksize); + PARCOPY(st_blocks); + + timespec_to_timespec50(&sb->st_atimespec, &ssb->st_atim); + timespec_to_timespec50(&sb->st_mtimespec, &ssb->st_mtim); + timespec_to_timespec50(&sb->st_ctimespec, &ssb->st_ctim); + timespec_to_timespec50(&sb->st_birthtimespec, &ssb->st_btim); +} + +int +rump_cygwin_sys_stat(struct lwp *l, const struct rump_cygwin_sys_stat_args *uap, + register_t *retval) +{ + struct cygwin_stat ssb; + struct stat sb; + int error; + + error = do_sys_stat(SCARG(uap, path), FOLLOW, &sb); + if (error) + return error; + + bsd_to_cygwin_stat(&sb, &ssb); + + return copyout(&ssb, SCARG(uap, sp), sizeof(ssb)); +} + +int +rump_cygwin_sys_fstat(struct lwp *l, const struct rump_cygwin_sys_fstat_args *uap, + register_t *retval) +{ + struct cygwin_stat ssb; + struct stat sb; + int error; + + error = do_sys_fstat(SCARG(uap, fd), &sb); + if (error) + return error; + + bsd_to_cygwin_stat(&sb, &ssb); + + return copyout(&ssb, SCARG(uap, sp), sizeof(ssb)); +} + +int +rump_cygwin_sys_lstat(struct lwp *l, const struct rump_cygwin_sys_lstat_args *uap, + register_t *retval) +{ + struct cygwin_stat ssb; + struct stat sb; + int error; + + error = do_sys_stat(SCARG(uap, path), NOFOLLOW, &sb); + if (error) + return error; + + bsd_to_cygwin_stat(&sb, &ssb); + + return copyout(&ssb, SCARG(uap, sp), sizeof(ssb)); +} + +int +rump_cygwin_sys_open(struct lwp *l, const struct rump_cygwin_sys_open_args *uap, + register_t *retval) +{ + /* { + syscallarg(const char *) path; + syscallarg(int) flags; + syscallarg(int) mode; + } */ + struct sys_open_args ua; + int sflags, flags; + + sflags = SCARG(uap, flags); + flags = sflags & (3 | O_APPEND | O_ASYNC | O_CREAT | O_TRUNC | O_EXCL); + + SCARG(&ua, path) = SCARG(uap, path); + SCARG(&ua, flags) = flags; + SCARG(&ua, mode) = SCARG(uap, mode); + + return sys_open(l, &ua, retval); +} + +#define CYGWIN_NAME_MAX 255 +struct cygwin_dirent { + long d_version; + int64_t d_ino; + unsigned char d_type; + unsigned char d_unused[3]; + uint32_t d_internal; + char d_name[CYGWIN_NAME_MAX + 1]; +} __packed; + +#define CYGWIN_NAMEOFF(dp) offsetof(struct cygwin_dirent,d_name) +#define CYGWIN_RECLEN(dp, namlen) ((CYGWIN_NAMEOFF(dp) + (namlen) + 1)) + +int +rump_cygwin_sys_getdents(struct lwp *l, + const struct rump_cygwin_sys_getdents_args *uap, register_t *retval) +{ + struct file *fp; + struct dirent *bdp; + struct cygwin_dirent idb; + char *buf, *inp, *outp; + size_t resid, buflen, nbytes; + size_t reclen, cygwin_reclen; + int error, done; + + if ((error = fd_getvnode(SCARG(uap, fd), &fp)) != 0) + return (error); + + /* + * Sneaky, but avoids having "rewind" f_offset due to the + * conversions not fitting from our intermediate kernel buffer + * into the user buffer + */ + nbytes = SCARG(uap, nbytes); + buflen = min(MAXBSIZE, (nbytes*8)/10); + buf = kmem_alloc(buflen, KM_SLEEP); + + if ((fp->f_flag & FREAD) == 0) { + error = EBADF; + goto out; + } + + resid = nbytes; + outp = SCARG(uap, buf); + + again: + if ((error = vn_readdir(fp, buf, UIO_SYSSPACE, buflen, &done, + l, NULL, NULL)) != 0) + goto out; + if (done == 0) + goto eof; + + for (inp = buf; done > 0; done -= reclen) { + bdp = (struct dirent *)inp; + reclen = bdp->d_reclen; + + /* skip empty entries */ + if (bdp->d_fileno == 0) { + inp += reclen; + continue; + } + + cygwin_reclen = CYGWIN_RECLEN(&idb, bdp->d_namlen); + if (resid < cygwin_reclen) { + panic("impossible shortage of resid"); + } + + memset(&idb, 0, sizeof(idb)); + idb.d_ino = bdp->d_fileno; + idb.d_type = bdp->d_type; + strlcpy(idb.d_name, bdp->d_name, sizeof(idb.d_name)); + if ((error = copyout(&idb, outp, cygwin_reclen)) != 0) + goto out; + + inp += reclen; + outp += cygwin_reclen; + resid -= cygwin_reclen; + } + + /* if we squished out the whole block, try again */ + if (outp == SCARG(uap, buf)) { + goto again; + } + + eof: + *retval = nbytes - resid; + out: + kmem_free(buf, buflen); + fd_putfile(SCARG(uap, fd)); + + return (error); +} Index: src/sys/rump/kern/lib/libsys_cygwin/shlib_version diff -u /dev/null src/sys/rump/kern/lib/libsys_cygwin/shlib_version:1.1 --- /dev/null Wed Apr 10 16:44:55 2013 +++ src/sys/rump/kern/lib/libsys_cygwin/shlib_version Wed Apr 10 16:44:54 2013 @@ -0,0 +1,4 @@ +# $NetBSD: shlib_version,v 1.1 2013/04/10 16:44:54 pooka Exp $ +# +major=0 +minor=0 Index: src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf diff -u /dev/null src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf:1.1 --- /dev/null Wed Apr 10 16:44:55 2013 +++ src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf Wed Apr 10 16:44:54 2013 @@ -0,0 +1,14 @@ +# $NetBSD: syscalls.conf,v 1.1 2013/04/10 16:44:54 pooka Exp $ +# + +sysnames="rump_cygwin_syscalls.c" +sysnumhdr="rump_cygwin_syscall.h" +syssw="rump_cygwin_sysent.c" +sysarghdr="rump_cygwin_syscallargs.h" +compatopts="" +libcompatopts="" + +switchname="rump_cygwin_sysent" +namesname="rump_cygwin_syscallnames" +constprefix="RUMP_CYGWIN_SYS_" +nsysent=512 Index: src/sys/rump/kern/lib/libsys_cygwin/syscalls.master diff -u /dev/null src/sys/rump/kern/lib/libsys_cygwin/syscalls.master:1.1 --- /dev/null Wed Apr 10 16:44:55 2013 +++ src/sys/rump/kern/lib/libsys_cygwin/syscalls.master Wed Apr 10 16:44:54 2013 @@ -0,0 +1,573 @@ + $NetBSD: syscalls.master,v 1.1 2013/04/10 16:44:54 pooka Exp $ + +; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 + +; NetBSD system call name/number "master" file. +; (See syscalls.conf to see what it is processed into.) +; +; Fields: number type [type-dependent ...] +; number system call number, must be in order +; type one of NODEF, UNIMPL, or NOARGS +; +; types: +; NODEF always included +; UNIMPL unimplemented, not included in system +; NODEF included, but don't define the syscall number +; NOARGS included, but don't define the syscall args structure +; +; arguments: +; PAD argument not part of the C interface, used only for padding +; +; +; Support just enough syscalls to make fs-utils run (plus a few other +; low-hanging fruit) +; + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/signal.h> +#include <sys/socket.h> +#include <sys/mount.h> +#include <sys/sched.h> +#include <sys/syscallargs.h> + +#include "rump_cygwin_syscallargs.h" + +%% + +0 NOARGS { int|sys||nosys(void); } +1 UNIMPL exit +2 UNIMPL fork +3 NOARGS { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } +4 NOARGS { ssize_t|sys||write(int fd, const void *buf, \ + size_t nbyte); } +5 NODEF { int|rump_cygwin_sys||open(const char *path, \ + int flags, int mode); } +6 NOARGS { int|sys||close(int fd); } +7 UNIMPL wait4 +8 UNIMPL creat +9 NOARGS { int|sys||link(const char *path, const char *link); } +10 NOARGS { int|sys||unlink(const char *path); } +11 UNIMPL execv +12 NOARGS { int|sys||chdir(const char *path); } +13 NOARGS { int|sys||fchdir(int fd); } +14 UNIMPL mknod +15 NOARGS { int|sys||chmod(const char *path, int mode); } +16 NOARGS { int|sys||chown(const char *path, int uid, int gid); } +17 UNIMPL obreak +18 UNIMPL getfsstat +19 UNIMPL lseek +20 NOARGS { pid_t|sys||getpid_with_ppid(void); } getpid +21 UNIMPL mount +22 UNIMPL unmount +23 NOARGS { int|sys||setuid(int uid); } +24 NOARGS { int|sys||getuid_with_euid(void); } getuid +25 NOARGS { int|sys||geteuid(void); } +26 UNIMPL ptrace +27 UNIMPL recvmsg +28 UNIMPL sendmsg +29 UNIMPL recvfrom +30 UNIMPL accept +31 UNIMPL getpeername +32 UNIMPL getsockname +33 NOARGS { int|sys||access(const char *path, int flags); } +34 UNIMPL chflags +35 UNIMPL fchflags +36 NOARGS { void|sys||sync(void); } +37 UNIMPL kill +38 UNIMPL stat +39 UNIMPL getppid +40 UNIMPL lstat +41 NOARGS { int|sys||dup(int fd); } +42 NOARGS { int|sys||pipe(void); } +43 UNIMPL getegid +44 UNIMPL profil +45 UNIMPL ktrace +46 UNIMPL sigaction +47 NOARGS { int|sys||getgid_with_egid(void); } getgid +48 UNIMPL sigprocmask +49 UNIMPL __getlogin +50 UNIMPL __setlogin +51 UNIMPL acct +52 UNIMPL sigpending +53 UNIMPL sigaltstack +54 UNIMPL ioctl +55 UNIMPL reboot +56 UNIMPL revoke +57 NOARGS { int|sys||symlink(const char *path, \ + const char *link); } +58 NOARGS { ssize_t|sys||readlink(const char *path, char *buf, \ + int count); } +59 UNIMPL execve +60 NOARGS { mode_t|sys||umask(mode_t newmask); } +61 NOARGS { int|sys||chroot(const char *path); } +62 UNIMPL fstat43 +63 UNIMPL getkerninfo +64 UNIMPL getpagesize +65 UNIMPL msync +66 UNIMPL vfork +67 UNIMPL vread +68 UNIMPL vwrite +69 UNIMPL sbrk +70 UNIMPL sstk +71 UNIMPL mmap +72 UNIMPL ovadvise +73 UNIMPL munmap +74 UNIMPL mprotect +75 UNIMPL madvise +76 UNIMPL vhangup +77 UNIMPL vlimit +78 UNIMPL mincore +79 NOARGS { int|sys||getgroups(int gidsetsize, \ + int *gidset); } +80 NOARGS { int|sys||setgroups(int gidsetsize, \ + const int *gidset); } +81 NOARGS { int|sys||getpgrp(void); } +82 NOARGS { int|sys||setpgid(int pid, int pgid); } +83 UNIMPL setitimer +84 UNIMPL wait +85 UNIMPL swapon +86 UNIMPL getitimer +87 UNIMPL gethostname +88 UNIMPL sethostname +89 UNIMPL getdtablesize +90 NOARGS { int|sys||dup2(int from, int to); } +91 UNIMPL getdopt +92 UNIMPL fcntl +93 UNIMPL select +94 UNIMPL setdopt +95 NOARGS { int|sys||fsync(int fd); } +96 UNIMPL setpriority +97 UNIMPL socket +98 UNIMPL connect +99 UNIMPL accept +100 UNIMPL getpriority + +101 UNIMPL send +102 UNIMPL recv + +103 UNIMPL sigreturn +104 UNIMPL bind +105 UNIMPL setsockopt +106 UNIMPL listen +107 UNIMPL vtimes +108 UNIMPL sigvec +109 UNIMPL sigblock +110 UNIMPL sigsetmask +111 UNIMPL sigsuspend +112 UNIMPL sigstack +113 UNIMPL orecvmsg +114 UNIMPL osendmsg +115 UNIMPL vtrace +116 UNIMPL gettimeofday +117 UNIMPL getrusage +118 UNIMPL getsockopt +119 UNIMPL resuba +120 NOARGS { ssize_t|sys||readv(int fd, \ + struct iovec *iovp, int iovcnt); } +121 NOARGS { ssize_t|sys||writev(int fd, \ + struct iovec *iovp, int iovcnt); } +122 UNIMPL settimeofday +123 NOARGS { int|sys||fchown(int fd, int uid, int gid); } +124 NOARGS { int|sys||fchmod(int fd, int mode); } +125 UNIMPL orecvfrom +126 NOARGS { int|sys||setreuid(int ruid, int euid); } +127 NOARGS { int|sys||setregid(int rgid, int egid); } +128 NOARGS { int|sys||rename(char *from, char *to); } +129 UNIMPL otruncate +130 UNIMPL oftruncate +131 NOARGS { int|sys||flock(int fd, int how); } +132 UNIMPL mkfifo +133 UNIMPL sendto +134 UNIMPL shutdown +135 UNIMPL socketpair +136 NOARGS { int|sys||mkdir(const char *path, int mode); } +137 NOARGS { int|sys||rmdir(const char *path); } +138 UNIMPL utimes + +139 UNIMPL 4.2 sigreturn +140 UNIMPL adjtime +141 UNIMPL ogetpeername +142 UNIMPL ogethostid +143 UNIMPL osethostid +144 UNIMPL ogetrlimit +145 UNIMPL osetrlimit +146 UNIMPL okillpg +147 NOARGS { int|sys||setsid(void); } +148 UNIMPL quotactl +149 UNIMPL oquota +150 UNIMPL ogetsockname + +; Syscalls 151-180 inclusive are reserved for vendor-specific +; system calls. (This includes various calls added for compatibity +; with other Unix variants.) +; Some of these calls are now supported by BSD... +151 UNIMPL +152 UNIMPL +153 UNIMPL +154 UNIMPL +155 UNIMPL nfssvc +156 UNIMPL ogetdirentries +157 UNIMPL statfs12 +158 UNIMPL fstatfs12 +159 UNIMPL +160 UNIMPL +161 UNIMPL getfh30 +162 UNIMPL ogetdomainname +163 UNIMPL osetdomainname +164 UNIMPL ouname +165 UNIMPL sysarch +166 UNIMPL +167 UNIMPL +168 UNIMPL +169 UNIMPL 1.0 semsys +170 UNIMPL 1.0 msgsys +171 UNIMPL 1.0 shmsys +172 UNIMPL +173 NOARGS { ssize_t|sys||pread(int fd, char *buf, \ + size_t nbyte, int PAD, off_t offset); } +174 NOARGS { ssize_t|sys||pwrite(int fd, char *buf, \ + size_t nbyte, int PAD, off_t offset); } +175 UNIMPL ntp_gettime +176 UNIMPL ntp_adjtime +177 UNIMPL +178 UNIMPL +179 UNIMPL +180 UNIMPL + +; Syscalls 180-199 are used by/reserved for BSD +181 NOARGS { int|sys||setgid(gid_t gid); } +182 NOARGS { int|sys||setegid(gid_t egid); } +183 NOARGS { int|sys||seteuid(uid_t euid); } +184 UNIMPL lfs_bmapv +185 UNIMPL lfs_markv +186 UNIMPL lfs_segclean +187 UNIMPL lfs_segwait +188 UNIMPL stat12 +189 UNIMPL fstat12 +190 UNIMPL lstat12 +191 UNIMPL pathconf +192 UNIMPL fpathconf +193 UNIMPL +194 UNIMPL getrlimit +195 UNIMPL setrlimit +196 UNIMPL getdirentries +197 UNIMPL mmap +198 UNIMPL __syscall +199 NOARGS { long|sys||lseek(int fd, int PAD, off_t offset, \ + int whence); } +200 NOARGS { int|sys||truncate(const char *path, int PAD, \ + off_t length); } +201 NOARGS { int|sys||ftruncate(int fd, int PAD, off_t length); } +202 UNIMPL __sysctl +203 UNIMPL mlock +204 UNIMPL munlock +205 UNIMPL undelete +206 UNIMPL futimes +207 NOARGS { pid_t|sys||getpgid(pid_t pid); } +208 UNIMPL reboot +209 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \ + int timeout); } +; +; Syscalls 210-219 are reserved for dynamically loaded syscalls +; +210 UNIMPL afssys +211 UNIMPL +212 UNIMPL +213 UNIMPL +214 UNIMPL +215 UNIMPL +216 UNIMPL +217 UNIMPL +218 UNIMPL +219 UNIMPL +220 UNIMPL compat_14_semctl +221 UNIMPL semget +222 UNIMPL semop +223 UNIMPL semconfig +224 UNIMPL compat_14_msgctl +225 UNIMPL msgget +226 UNIMPL msgsnd +227 UNIMPL msgrcv +228 UNIMPL shmat +229 UNIMPL compat_14_shmctl +230 UNIMPL shmdt +231 UNIMPL shmget + +232 UNIMPL clock_gettime +233 UNIMPL clock_settime +234 UNIMPL clock_getres +235 UNIMPL timer_create +236 UNIMPL timer_delete +237 UNIMPL timer_settime +238 UNIMPL timer_gettime +239 UNIMPL timer_getoverrun +; +; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls +; +240 UNIMPL nanosleep +241 UNIMPL fdatasync +242 UNIMPL mlockall +243 UNIMPL munlockall +244 UNIMPL __sigtimedwait +245 UNIMPL sigqueueinfo +246 UNIMPL modctl +247 UNIMPL _ksem_init +248 UNIMPL _ksem_open +249 UNIMPL _ksem_unlink +250 UNIMPL _ksem_close +251 UNIMPL _ksem_post +252 UNIMPL _ksem_wait +253 UNIMPL _ksem_trywait +254 UNIMPL _ksem_getvalue +255 UNIMPL _ksem_destroy +256 UNIMPL _ksem_timedwait + +257 UNIMPL mq_open +258 UNIMPL mq_close +259 UNIMPL mq_unlink +260 UNIMPL mq_getattr +261 UNIMPL mq_setattr +262 UNIMPL mq_notify +263 UNIMPL mq_send +264 UNIMPL mq_receive +265 UNIMPL mq_timedsend +266 UNIMPL mq_timedreceive +267 UNIMPL +268 UNIMPL +269 UNIMPL +270 UNIMPL __posix_rename +271 UNIMPL swapctl +272 UNIMPL getdents +273 UNIMPL minherit +274 UNIMPL lchmod +275 UNIMPL lchown +276 UNIMPL lutimes +277 UNIMPL msync +278 UNIMPL stat +279 UNIMPL fstat +280 UNIMPL lstat +281 UNIMPL sigaltstack +282 UNIMPL vfork +283 UNIMPL __posix_chown +284 UNIMPL __posix_fchown +285 UNIMPL __posix_lchown +286 NOARGS { pid_t|sys||getsid(pid_t pid); } + +287 UNIMPL __clone +288 UNIMPL fktrace +289 UNIMPL { ssize_t|sys||preadv(int fd, \ + const struct iovec *iovp, int iovcnt, \ + int PAD, off_t offset); } +290 UNIMPL { ssize_t|sys||pwritev(int fd, \ + const struct iovec *iovp, int iovcnt, \ + int PAD, off_t offset); } +291 UNIMPL sigaction +292 UNIMPL sigpending +293 UNIMPL sigprocmask +294 UNIMPL sigsuspend +295 UNIMPL sigreturn +296 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } +297 NOARGS { int|sys||fchroot(int fd); } +298 UNIMPL fhopen +299 UNIMPL fhstat +300 UNIMPL fhstatfs +301 UNIMPL ____semctl13 +302 UNIMPL __msgctl13 +303 UNIMPL __shmctl13 +304 UNIMPL lchflags +305 UNIMPL issetugid +306 UNIMPL utrace +307 UNIMPL getcontext +308 UNIMPL setcontext +309 UNIMPL _lwp_create +310 UNIMPL _lwp_exit +311 UNIMPL _lwp_self +312 UNIMPL _lwp_wait +313 UNIMPL _lwp_suspend +314 UNIMPL _lwp_continue +315 UNIMPL _lwp_wakeup +316 UNIMPL _lwp_getprivate +317 UNIMPL _lwp_setprivate +318 UNIMPL _lwp_kill +319 UNIMPL _lwp_detach +320 UNIMPL _lwp_park +321 UNIMPL _lwp_unpark +322 UNIMPL _lwp_unpark_all +323 UNIMPL _lwp_setname +324 UNIMPL _lwp_getname +325 UNIMPL _lwp_ctl + +; Syscalls 326-339 reserved for LWP syscalls. +326 UNIMPL +327 UNIMPL +328 UNIMPL +329 UNIMPL +; SA system calls. +330 UNIMPL sa_register +331 UNIMPL sa_stacks +332 UNIMPL sa_enable +333 UNIMPL sa_setconcurrency +334 UNIMPL sa_yield +335 UNIMPL sa_preempt +336 UNIMPL sys_sa_unblockyield +; +; Syscalls 337-339 are reserved for other scheduler activation syscalls. +; +337 UNIMPL +338 UNIMPL +339 UNIMPL + +340 UNIMPL __sigaction_sigtramp +341 UNIMPL pmc_get_info +342 UNIMPL pmc_control +343 UNIMPL rasctl +344 UNIMPL kqueue +345 UNIMPL kevent + +; Scheduling system calls. +346 UNIMPL _sched_setparam +347 UNIMPL _sched_getparam +348 UNIMPL _sched_setaffinity +349 UNIMPL _sched_getaffinity +350 UNIMPL sched_yield +351 UNIMPL +352 UNIMPL +353 UNIMPL + +354 UNIMPL fsync_range +355 UNIMPL uuidgen +356 UNIMPL getvfsstat +357 UNIMPL statvfs1 +358 UNIMPL fstatvfs1 +359 UNIMPL fhstatvfs1 +360 UNIMPL extattrctl +361 UNIMPL extattr_set_file +362 UNIMPL extattr_get_file +363 UNIMPL extattr_delete_file +364 UNIMPL extattr_set_fd +365 UNIMPL extattr_get_fd +366 UNIMPL extattr_delete_fd +367 UNIMPL extattr_set_link +368 UNIMPL extattr_get_link +369 UNIMPL extattr_delete_link +370 UNIMPL extattr_list_fd +371 UNIMPL extattr_list_file +372 UNIMPL extattr_list_link +373 UNIMPL pselect +374 UNIMPL pollts +375 UNIMPL setxattr +376 UNIMPL lsetxattr +377 UNIMPL fsetxattr +378 UNIMPL getxattr +379 UNIMPL lgetxattr +380 UNIMPL fgetxattr +381 UNIMPL listxattr +382 UNIMPL llistxattr +383 UNIMPL flistxattr +384 UNIMPL removexattr +385 UNIMPL lremovexattr +386 UNIMPL fremovexattr +387 UNIMPL stat30 +388 UNIMPL fstat30 +389 UNIMPL lstat30 +390 NODEF { int|rump_cygwin_sys||getdents(int fd, \ + char *buf, size_t nbytes); } +391 UNIMPL old posix_fadvise +392 UNIMPL fhstat +393 UNIMPL ntp_gettime +394 UNIMPL socket +395 UNIMPL getfh +396 UNIMPL fhopen +397 UNIMPL fhstatvfs1 +398 UNIMPL fhstat + +; Asynchronous I/O system calls +399 UNIMPL aio_cancel +400 UNIMPL aio_error +401 UNIMPL aio_fsync +402 UNIMPL aio_read +403 UNIMPL aio_return +404 UNIMPL aio_suspend +405 UNIMPL aio_write +406 UNIMPL lio_listio + +407 UNIMPL +408 UNIMPL +409 UNIMPL + +410 UNIMPL mount +411 UNIMPL mremap + +; Processor-sets system calls +412 UNIMPL pset_create +413 UNIMPL pset_destroy +414 UNIMPL pset_assign +415 UNIMPL _pset_bind +416 UNIMPL fadvise +417 UNIMPL select +418 UNIMPL gettimeofday +419 UNIMPL settimeofday +420 UNIMPL utimes +421 UNIMPL adjtime +422 UNIMPL lfs_segwait +423 UNIMPL futimes +424 UNIMPL lutimes +425 UNIMPL setitimer +426 UNIMPL getitimer +427 UNIMPL clock_gettime +428 UNIMPL clock_settime +429 UNIMPL clock_getres +430 UNIMPL nanosleep +431 UNIMPL __sigtimedwait +432 UNIMPL mq_timedsend +433 UNIMPL mq_timedreceive +434 UNIMPL _lwp_park +435 UNIMPL kevent +436 UNIMPL pselect +437 UNIMPL ppoll +438 UNIMPL aio_suspend +439 NODEF { int|rump_cygwin_sys||stat(const char *path, \ + struct cygwin_stat *sp); } +440 NODEF { int|rump_cygwin_sys||fstat(int fd, \ + struct cygwin_stat *sp); } +441 NODEF { int|rump_cygwin_sys||lstat(const char *path, \ + struct cygwin_stat *sp); } +442 UNIMPL __semctl +443 UNIMPL shmctl +444 UNIMPL msgctl +445 UNIMPL getrusage +446 UNIMPL timer_settime +447 UNIMPL timer_gettime +448 UNIMPL ntp_gettime +449 UNIMPL wait4 +450 NOARGS { int|sys|50|mknod(const char *path, mode_t mode, \ + int dev); } +451 UNIMPL fhstat + +; 452 only ever appeared in 5.99.x and can be reused after netbsd-7 +452 UNIMPL 5.99 quotactl +453 UNIMPL pipe2 +454 UNIMPL dup3 +455 UNIMPL kqueue1 +456 UNIMPL paccept +457 UNIMPL linkat +458 UNIMPL renameat +459 UNIMPL mkfifoat +460 UNIMPL mknodat +461 UNIMPL mkdirat +462 UNIMPL faccessat +463 UNIMPL fchmodat +464 UNIMPL fchownat +465 UNIMPL fexecve +466 UNIMPL fstatat +467 UNIMPL utimensat +468 UNIMPL openat +469 UNIMPL readlinkat +470 UNIMPL symlinkat +471 UNIMPL unlinkat +472 UNIMPL futimens +473 UNIMPL __quotactl +474 UNIMPL posix_spawn +475 UNIMPL recvmmsg +476 UNIMPL sendmmsg