File tree 2 files changed +16
-1
lines changed
src/unix/bsd/freebsdlike/freebsd
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) {
2169
2169
"F_KINFO" => true , // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
2170
2170
"SHM_RENAME_NOREPLACE"
2171
2171
| "SHM_RENAME_EXCHANGE"
2172
+ | "SHM_LARGEPAGE_ALLOC_DEFAULT"
2173
+ | "SHM_LARGEPAGE_ALLOC_NOWAIT"
2174
+ | "SHM_LARGEPAGE_ALLOC_HARD"
2172
2175
| "MFD_CLOEXEC"
2173
2176
| "MFD_ALLOW_SEALING"
2174
2177
| "MFD_HUGETLB"
@@ -2258,7 +2261,9 @@ fn test_freebsd(target: &str) {
2258
2261
"SOCKCRED2SIZE" if Some ( 13 ) > freebsd_ver => true ,
2259
2262
2260
2263
// 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
+ }
2262
2267
2263
2268
_ => false ,
2264
2269
}
Original file line number Diff line number Diff line change @@ -3619,6 +3619,9 @@ pub const MFD_CLOEXEC: ::c_uint = 0x00000001;
3619
3619
pub const MFD_ALLOW_SEALING : :: c_uint = 0x00000002 ;
3620
3620
pub const MFD_HUGETLB : :: c_uint = 0x00000004 ;
3621
3621
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 ;
3622
3625
pub const SHM_RENAME_NOREPLACE : :: c_int = 1 << 0 ;
3623
3626
pub const SHM_RENAME_EXCHANGE : :: c_int = 1 << 1 ;
3624
3627
@@ -4163,6 +4166,13 @@ extern "C" {
4163
4166
pub fn adjtime ( arg1 : * const :: timeval , arg2 : * mut :: timeval ) -> :: c_int ;
4164
4167
pub fn clock_getcpuclockid2 ( arg1 : :: id_t , arg2 : :: c_int , arg3 : * mut clockid_t ) -> :: c_int ;
4165
4168
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 ;
4166
4176
pub fn shm_rename (
4167
4177
path_from : * const :: c_char ,
4168
4178
path_to : * const :: c_char ,
You can’t perform that action at this time.
0 commit comments