public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Add a shm_open2 syscall to support upcoming memfd_create
Date: Mon, 11 Jul 2022 11:50:38 +0000 (GMT)	[thread overview]
Message-ID: <20220711115038.AD9B8385AE6D@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=99b66f53154560be576365fba7880f1e2e73de28

commit 99b66f53154560be576365fba7880f1e2e73de28
Author: Kyle Evans <kevans@FreeBSD.org>
Date:   Wed Sep 25 17:59:15 2019 +0000

    Add a shm_open2 syscall to support upcoming memfd_create
    
    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.
    
    shm_open and memfd_create will both be implemented in libc to use this new
    syscall.
    
    __FreeBSD_version is bumped to indicate the presence.
    
    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/rtems/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 */
 
 /*


                 reply	other threads:[~2022-07-11 11:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220711115038.AD9B8385AE6D@sourceware.org \
    --to=sh@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).