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 @@ -2154,6 +2154,9 @@ fn test_freebsd(target: &str) {
21542154 "F_KINFO" => true , // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
21552155 "SHM_RENAME_NOREPLACE"
21562156 | "SHM_RENAME_EXCHANGE"
2157+ | "SHM_LARGEPAGE_ALLOC_DEFAULT"
2158+ | "SHM_LARGEPAGE_ALLOC_NOWAIT"
2159+ | "SHM_LARGEPAGE_ALLOC_HARD"
21572160 | "MFD_CLOEXEC"
21582161 | "MFD_ALLOW_SEALING"
21592162 | "MFD_HUGETLB"
@@ -2243,7 +2246,9 @@ fn test_freebsd(target: &str) {
22432246 "SOCKCRED2SIZE" if Some ( 13 ) > freebsd_ver => true ,
22442247
22452248 // Those are not available in FreeBSD 12.
2246- "memfd_create" | "shm_rename" if Some ( 13 ) > freebsd_ver => true ,
2249+ "memfd_create" | "shm_create_largepage" | "shm_rename" if Some ( 13 ) > freebsd_ver => {
2250+ true
2251+ }
22472252
22482253 _ => false ,
22492254 }
Original file line number Diff line number Diff line change @@ -3561,6 +3561,9 @@ pub const MFD_CLOEXEC: ::c_uint = 0x00000001;
35613561pub const MFD_ALLOW_SEALING : :: c_uint = 0x00000002 ;
35623562pub const MFD_HUGETLB : :: c_uint = 0x00000004 ;
35633563
3564+ pub const SHM_LARGEPAGE_ALLOC_DEFAULT : :: c_int = 0 ;
3565+ pub const SHM_LARGEPAGE_ALLOC_NOWAIT : :: c_int = 1 ;
3566+ pub const SHM_LARGEPAGE_ALLOC_HARD : :: c_int = 2 ;
35643567pub const SHM_RENAME_NOREPLACE : :: c_int = 1 << 0 ;
35653568pub const SHM_RENAME_EXCHANGE : :: c_int = 1 << 1 ;
35663569
@@ -4105,6 +4108,13 @@ extern "C" {
41054108 pub fn adjtime ( arg1 : * const :: timeval , arg2 : * mut :: timeval ) -> :: c_int ;
41064109 pub fn clock_getcpuclockid2 ( arg1 : :: id_t , arg2 : :: c_int , arg3 : * mut clockid_t ) -> :: c_int ;
41074110
4111+ pub fn shm_create_largepage (
4112+ path : * const :: c_char ,
4113+ flags : :: c_int ,
4114+ psind : :: c_int ,
4115+ alloc_policy : :: c_int ,
4116+ mode : :: mode_t ,
4117+ ) -> :: c_int ;
41084118 pub fn shm_rename (
41094119 path_from : * const :: c_char ,
41104120 path_to : * const :: c_char ,
You can’t perform that action at this time.
0 commit comments