Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej-futex]: src/sys/compat/linux32/common Add eventfd glue to COMPAT...



details:   https://anonhg.NetBSD.org/src/rev/77b89db2f58d
branches:  thorpej-futex
changeset: 947545:77b89db2f58d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Dec 16 03:07:43 2020 +0000

description:
Add eventfd glue to COMPAT_LINUX32.

diffstat:

 sys/compat/linux32/arch/amd64/syscalls.master |   7 +++--
 sys/compat/linux32/common/linux32_misc.c      |  34 +++++++++++++++++++++++++-
 2 files changed, 36 insertions(+), 5 deletions(-)

diffs (78 lines):

diff -r edc1eec895f6 -r 77b89db2f58d sys/compat/linux32/arch/amd64/syscalls.master
--- a/sys/compat/linux32/arch/amd64/syscalls.master     Tue Dec 15 14:07:51 2020 +0000
+++ b/sys/compat/linux32/arch/amd64/syscalls.master     Wed Dec 16 03:07:43 2020 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.71 2020/04/26 18:53:33 thorpej Exp $
+       $NetBSD: syscalls.master,v 1.71.2.1 2020/12/16 03:07:43 thorpej Exp $
 
 ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file.
 ; (See syscalls.conf to see what it is processed into.)
@@ -547,13 +547,14 @@
                            linux32_timespecp_t times, int flag); }
 321    UNIMPL  signalfd
 322    UNIMPL  timerfd_create
-323    UNIMPL  eventfd
+323    STD     { int|linux32_sys||eventfd(unsigned int initval); }
 324    STD     { int|linux32_sys||fallocate(int fd, int mode, \
                            off_t offset, off_t len); }
 325    UNIMPL  timerfd_settime
 326    UNIMPL  timerfd_gettime
 327    UNIMPL  signalfd4
-328    UNIMPL  eventfd2
+328    STD     { int|linux32_sys||eventfd2(unsigned int initval, \
+                   int flags); }
 329    UNIMPL  epoll_create1
 330    STD     { int|linux32_sys||dup3(int from, int to, int flags); }
 331     STD    { int|linux32_sys||pipe2(netbsd32_intp fd, int flags); }
diff -r edc1eec895f6 -r 77b89db2f58d sys/compat/linux32/common/linux32_misc.c
--- a/sys/compat/linux32/common/linux32_misc.c  Tue Dec 15 14:07:51 2020 +0000
+++ b/sys/compat/linux32/common/linux32_misc.c  Wed Dec 16 03:07:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux32_misc.c,v 1.30 2020/05/03 01:06:56 thorpej Exp $        */
+/*     $NetBSD: linux32_misc.c,v 1.30.2.1 2020/12/16 03:07:43 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.30 2020/05/03 01:06:56 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.30.2.1 2020/12/16 03:07:43 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -352,3 +352,33 @@
        return pollcommon(retval, SCARG_P32(uap, fds), SCARG(uap, nfds),
            ts, sigmask);
 }
+
+int
+linux32_sys_eventfd(struct lwp *l, const struct linux32_sys_eventfd_args *uap,
+    register_t *retval)
+{
+       /* {
+               syscallarg(unsigned int) initval;
+       } */
+       struct linux_sys_eventfd_args ua;
+
+       NETBSD32TO64_UAP(initval);
+
+       return linux_sys_eventfd(l, &ua, retval);
+}
+
+int
+linux32_sys_eventfd2(struct lwp *l, const struct linux32_sys_eventfd2_args *uap,
+    register_t *retval)
+{
+       /* {
+               syscallarg(unsigned int) initval;
+               syscallarg(int) flags;
+       } */
+       struct linux_sys_eventfd2_args ua;
+
+       NETBSD32TO64_UAP(initval);
+       NETBSD32TO64_UAP(flags);
+
+       return linux_sys_eventfd2(l, &ua, retval);
+}



Home | Main Index | Thread Index | Old Index