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
This commit is contained in:
parent
878b65b3b6
commit
99b66f5315
|
@ -176,6 +176,12 @@
|
||||||
* Anonymous object constant for shm_open().
|
* Anonymous object constant for shm_open().
|
||||||
*/
|
*/
|
||||||
#define SHM_ANON ((char *)1)
|
#define SHM_ANON ((char *)1)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* shmflags for shm_open2()
|
||||||
|
*/
|
||||||
|
#define SHM_ALLOW_SEALING 0x00000001
|
||||||
|
|
||||||
#endif /* __BSD_VISIBLE */
|
#endif /* __BSD_VISIBLE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue