Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 COMPAT_NETBSD32: Add support for memfd_c...
details: https://anonhg.NetBSD.org/src/rev/c24e139d5461
branches: trunk
changeset: 378338:c24e139d5461
user: rin <rin%NetBSD.org@localhost>
date: Sun Jul 30 05:30:45 2023 +0000
description:
COMPAT_NETBSD32: Add support for memfd_create(2).
diffstat:
sys/compat/netbsd32/netbsd32_netbsd.c | 19 +++++++++++++++++--
sys/compat/netbsd32/syscalls.master | 5 +++--
2 files changed, 20 insertions(+), 4 deletions(-)
diffs (59 lines):
diff -r 546a7fd88006 -r c24e139d5461 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Sun Jul 30 05:20:36 2023 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Sun Jul 30 05:30:45 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_netbsd.c,v 1.234 2023/07/30 05:10:47 rin Exp $ */
+/* $NetBSD: netbsd32_netbsd.c,v 1.235 2023/07/30 05:30:45 rin Exp $ */
/*
* Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.234 2023/07/30 05:10:47 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.235 2023/07/30 05:30:45 rin Exp $");
/*
* below are all the standard NetBSD system calls, in the 32bit
@@ -2648,6 +2648,21 @@ netbsd32_eventfd(struct lwp *l,
return sys_eventfd(l, &ua, retval);
}
+int
+netbsd32_memfd_create(struct lwp *l,
+ const struct netbsd32_memfd_create_args *uap, register_t *retval)
+{
+ /* {
+ syscallarg(const netbsd32_charp) name;
+ syscallarg(unsigned int) flags;
+ } */
+ struct sys_memfd_create_args ua;
+
+ NETBSD32TOP_UAP(name, const char);
+ NETBSD32TO64_UAP(flags);
+ return sys_memfd_create(l, &ua, retval);
+}
+
/*
* MI indirect system call support.
* Only used if the MD netbsd32_syscall.c doesn't intercept the calls.
diff -r 546a7fd88006 -r c24e139d5461 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master Sun Jul 30 05:20:36 2023 +0000
+++ b/sys/compat/netbsd32/syscalls.master Sun Jul 30 05:30:45 2023 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.142 2023/07/29 12:38:25 rin Exp $
+ $NetBSD: syscalls.master,v 1.143 2023/07/30 05:30:45 rin Exp $
; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -1214,7 +1214,8 @@ 498 STD { int|netbsd32||__acl_aclcheck_
acl_type_t type, netbsd32_aclp_t aclp); }
499 STD { long|netbsd32||lpathconf(const netbsd32_charp path, \
int name); }
-500 UNIMPL memfd_create
+500 STD { int|netbsd32||memfd_create( \
+ const netbsd32_charp name, unsigned int flags); }
501 STD { int|netbsd32|100|kevent(int fd, \
const netbsd32_keventp_t changelist, \
netbsd32_size_t nchanges, \
Home |
Main Index |
Thread Index |
Old Index