]> git.ipfire.org Git - thirdparty/glibc.git/commit
hurd: Implement SHM_ANON
authorSergey Bugaev <bugaevc@gmail.com>
Mon, 30 Jan 2023 12:52:16 +0000 (15:52 +0300)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 1 Feb 2023 22:36:11 +0000 (23:36 +0100)
commita979b72747e34add3433a23c0966490cd809120f
tree45d4888dc9ee62a8d851dc27b435516f827718b5
parent65392c84782a53b0d7705ca0207c95c3da41c7dc
hurd: Implement SHM_ANON

This adds a special SHM_ANON value that can be passed into shm_open ()
in place of a name. When called in this way, shm_open () will create a
new anonymous shared memory file. The file will be created in the same
way that other shared memory files are created (i.e., under /dev/shm/),
except that it is not given a name and therefore cannot be reached from
the file system, nor by other calls to shm_open (). This is accomplished
by utilizing O_TMPFILE.

This is intended to be compatible with FreeBSD's API of the same name.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230130125216.6254-4-bugaevc@gmail.com>
posix/shm-directory.c
rt/shm_open.c
sysdeps/mach/hurd/bits/mman_ext.h [new file with mode: 0644]