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 @@ -2154,6 +2154,9 @@ fn test_freebsd(target: &str) {
2154
2154
"F_KINFO" => true , // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
2155
2155
"SHM_RENAME_NOREPLACE"
2156
2156
| "SHM_RENAME_EXCHANGE"
2157
+ | "SHM_LARGEPAGE_ALLOC_DEFAULT"
2158
+ | "SHM_LARGEPAGE_ALLOC_NOWAIT"
2159
+ | "SHM_LARGEPAGE_ALLOC_HARD"
2157
2160
| "MFD_CLOEXEC"
2158
2161
| "MFD_ALLOW_SEALING"
2159
2162
| "MFD_HUGETLB"
@@ -2243,7 +2246,9 @@ fn test_freebsd(target: &str) {
2243
2246
"SOCKCRED2SIZE" if Some ( 13 ) > freebsd_ver => true ,
2244
2247
2245
2248
// 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
+ }
2247
2252
2248
2253
_ => false ,
2249
2254
}
Original file line number Diff line number Diff line change @@ -3561,6 +3561,9 @@ pub const MFD_CLOEXEC: ::c_uint = 0x00000001;
3561
3561
pub const MFD_ALLOW_SEALING : :: c_uint = 0x00000002 ;
3562
3562
pub const MFD_HUGETLB : :: c_uint = 0x00000004 ;
3563
3563
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 ;
3564
3567
pub const SHM_RENAME_NOREPLACE : :: c_int = 1 << 0 ;
3565
3568
pub const SHM_RENAME_EXCHANGE : :: c_int = 1 << 1 ;
3566
3569
@@ -4105,6 +4108,13 @@ extern "C" {
4105
4108
pub fn adjtime ( arg1 : * const :: timeval , arg2 : * mut :: timeval ) -> :: c_int ;
4106
4109
pub fn clock_getcpuclockid2 ( arg1 : :: id_t , arg2 : :: c_int , arg3 : * mut clockid_t ) -> :: c_int ;
4107
4110
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 ;
4108
4118
pub fn shm_rename (
4109
4119
path_from : * const :: c_char ,
4110
4120
path_to : * const :: c_char ,
You can’t perform that action at this time.
0 commit comments