Skip to content

Commit

Permalink
Increase size of cpuset_t on FreeBSD 14
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Oct 18, 2023
1 parent 5be41c9 commit d2a19af
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -365,9 +365,13 @@ s! {
}

pub struct cpuset_t {
#[cfg(target_pointer_width = "64")]
#[cfg(all(freebsd14, target_pointer_width = "64"))]
__bits: [::c_long; 16],
#[cfg(all(freebsd14, target_pointer_width = "32"))]
__bits: [::c_long; 32],
#[cfg(all(not(freebsd14), target_pointer_width = "64"))]
__bits: [::c_long; 4],
#[cfg(target_pointer_width = "32")]
#[cfg(all(not(freebsd14), target_pointer_width = "32"))]
__bits: [::c_long; 8],
}

Expand Down Expand Up @@ -2613,6 +2617,9 @@ pub const DEVSTAT_N_TRANS_FLAGS: ::c_int = 4;
pub const DEVSTAT_NAME_LEN: ::c_int = 16;

// sys/cpuset.h
#[cfg(freebsd14)]
pub const CPU_SETSIZE: ::c_int = 1024;
#[cfg(not(freebsd14))]
pub const CPU_SETSIZE: ::c_int = 256;

pub const SIGEV_THREAD_ID: ::c_int = 4;
Expand Down

0 comments on commit d2a19af

Please sign in to comment.