File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/unix/bsd/freebsdlike/freebsd Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -2169,6 +2169,9 @@ fn test_freebsd(target: &str) {
21692169 "F_KINFO" => true , // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
21702170 "SHM_RENAME_NOREPLACE"
21712171 | "SHM_RENAME_EXCHANGE"
2172+ | "SHM_LARGEPAGE_ALLOC_DEFAULT"
2173+ | "SHM_LARGEPAGE_ALLOC_NOWAIT"
2174+ | "SHM_LARGEPAGE_ALLOC_HARD"
21722175 | "MFD_CLOEXEC"
21732176 | "MFD_ALLOW_SEALING"
21742177 | "MFD_HUGETLB"
@@ -2258,7 +2261,9 @@ fn test_freebsd(target: &str) {
22582261 "SOCKCRED2SIZE" if Some ( 13 ) > freebsd_ver => true ,
22592262
22602263 // Those are not available in FreeBSD 12.
2261- "memfd_create" | "shm_rename" if Some ( 13 ) > freebsd_ver => true ,
2264+ "memfd_create" | "shm_create_largepage" | "shm_rename" if Some ( 13 ) > freebsd_ver => {
2265+ true
2266+ }
22622267
22632268 _ => false ,
22642269 }
Original file line number Diff line number Diff line change @@ -3619,6 +3619,9 @@ pub const MFD_CLOEXEC: ::c_uint = 0x00000001;
36193619pub const MFD_ALLOW_SEALING : :: c_uint = 0x00000002 ;
36203620pub const MFD_HUGETLB : :: c_uint = 0x00000004 ;
36213621
3622+ pub const SHM_LARGEPAGE_ALLOC_DEFAULT : :: c_int = 0 ;
3623+ pub const SHM_LARGEPAGE_ALLOC_NOWAIT : :: c_int = 1 ;
3624+ pub const SHM_LARGEPAGE_ALLOC_HARD : :: c_int = 2 ;
36223625pub const SHM_RENAME_NOREPLACE : :: c_int = 1 << 0 ;
36233626pub const SHM_RENAME_EXCHANGE : :: c_int = 1 << 1 ;
36243627
@@ -4163,6 +4166,13 @@ extern "C" {
41634166 pub fn adjtime ( arg1 : * const :: timeval , arg2 : * mut :: timeval ) -> :: c_int ;
41644167 pub fn clock_getcpuclockid2 ( arg1 : :: id_t , arg2 : :: c_int , arg3 : * mut clockid_t ) -> :: c_int ;
41654168
4169+ pub fn shm_create_largepage (
4170+ path : * const :: c_char ,
4171+ flags : :: c_int ,
4172+ psind : :: c_int ,
4173+ alloc_policy : :: c_int ,
4174+ mode : :: mode_t ,
4175+ ) -> :: c_int ;
41664176 pub fn shm_rename (
41674177 path_from : * const :: c_char ,
41684178 path_to : * const :: c_char ,
You can’t perform that action at this time.
0 commit comments