From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id AD9B8385AE6D; Mon, 11 Jul 2022 11:50:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD9B8385AE6D Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Add a shm_open2 syscall to support upcoming memfd_create X-Act-Checkin: newlib-cygwin X-Git-Author: Kyle Evans X-Git-Refname: refs/heads/master X-Git-Oldrev: 878b65b3b61050b7b380e677246424c9e9feb703 X-Git-Newrev: 99b66f53154560be576365fba7880f1e2e73de28 Message-Id: <20220711115038.AD9B8385AE6D@sourceware.org> Date: Mon, 11 Jul 2022 11:50:38 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 11:50:38 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D99b66f53154= 560be576365fba7880f1e2e73de28 commit 99b66f53154560be576365fba7880f1e2e73de28 Author: Kyle Evans Date: Wed Sep 25 17:59:15 2019 +0000 Add a shm_open2 syscall to support upcoming memfd_create =20 shm_open2 allows a little more flexibility than the original shm_open. shm_open2 doesn't enforce CLOEXEC on its callers, and it has a separate shmflag argument that can be expanded later. Currently the only shmflag= is to allow file sealing on the returned fd. =20 shm_open and memfd_create will both be implemented in libc to use this = new syscall. =20 __FreeBSD_version is bumped to indicate the presence. =20 Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D21393 Diff: --- newlib/libc/sys/rtems/include/sys/mman.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rte= ms/include/sys/mman.h index f75490c96..6e178d83d 100644 --- a/newlib/libc/sys/rtems/include/sys/mman.h +++ b/newlib/libc/sys/rtems/include/sys/mman.h @@ -176,6 +176,12 @@ * Anonymous object constant for shm_open(). */ #define SHM_ANON ((char *)1) + +/* + * shmflags for shm_open2() + */ +#define SHM_ALLOW_SEALING 0x00000001 + #endif /* __BSD_VISIBLE */ =20 /*