Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memfd_create additional flags for FreeBSD. #2829

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,19 @@ fn test_freebsd(target: &str) {
| "MFD_CLOEXEC"
| "MFD_ALLOW_SEALING"
| "MFD_HUGETLB"
| "MFD_HUGE_MASK"
| "MFD_HUGE_64KB"
| "MFD_HUGE_512KB"
| "MFD_HUGE_1MB"
| "MFD_HUGE_2MB"
| "MFD_HUGE_8MB"
| "MFD_HUGE_16MB"
| "MFD_HUGE_32MB"
| "MFD_HUGE_256MB"
| "MFD_HUGE_512MB"
| "MFD_HUGE_1GB"
| "MFD_HUGE_2GB"
| "MFD_HUGE_16GB"
if Some(13) > freebsd_ver =>
{
true
Expand Down
16 changes: 16 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,22 @@ MAXTC
MCL_CURRENT
MCL_FUTURE
MDMBUF
MFD_ALLOW_SEALING
MFD_CLOEXEC
MFD_HUGE_16GB
MFD_HUGE_16MB
MFD_HUGE_1GB
MFD_HUGE_1MB
MFD_HUGE_256MB
MFD_HUGE_2GB
MFD_HUGE_2MB
MFD_HUGE_32MB
MFD_HUGE_512KB
MFD_HUGE_512MB
MFD_HUGE_64KB
MFD_HUGE_8MB
MFD_HUGE_MASK
MFD_HUGETLB
MINCORE_INCORE
MINCORE_MODIFIED
MINCORE_MODIFIED_OTHER
Expand Down
13 changes: 13 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3657,6 +3657,19 @@ pub const CPUCLOCK_WHICH_TID: ::c_int = 1;
pub const MFD_CLOEXEC: ::c_uint = 0x00000001;
pub const MFD_ALLOW_SEALING: ::c_uint = 0x00000002;
pub const MFD_HUGETLB: ::c_uint = 0x00000004;
pub const MFD_HUGE_MASK: ::c_uint = 0xFC000000;
pub const MFD_HUGE_64KB: ::c_uint = 16 << 26;
pub const MFD_HUGE_512KB: ::c_uint = 19 << 26;
pub const MFD_HUGE_1MB: ::c_uint = 20 << 26;
pub const MFD_HUGE_2MB: ::c_uint = 21 << 26;
pub const MFD_HUGE_8MB: ::c_uint = 23 << 26;
pub const MFD_HUGE_16MB: ::c_uint = 24 << 26;
pub const MFD_HUGE_32MB: ::c_uint = 25 << 26;
pub const MFD_HUGE_256MB: ::c_uint = 28 << 26;
pub const MFD_HUGE_512MB: ::c_uint = 29 << 26;
pub const MFD_HUGE_1GB: ::c_uint = 30 << 26;
pub const MFD_HUGE_2GB: ::c_uint = 31 << 26;
pub const MFD_HUGE_16GB: ::c_uint = 34 << 26;

pub const SHM_LARGEPAGE_ALLOC_DEFAULT: ::c_int = 0;
pub const SHM_LARGEPAGE_ALLOC_NOWAIT: ::c_int = 1;
Expand Down