Skip to content

Commit

Permalink
Auto merge of #2413 - devnexen:cpu_isset_bsd_fix_sig, r=Amanieu
Browse files Browse the repository at this point in the history
fix CPU_ISSET signature for freebsd/dragonflybsd.

indeed no rason to be mutable and to match linux part as well.
  • Loading branch information
bors committed Sep 22, 2021
2 parents ea748f7 + 2acd3b3 commit 971fde3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/dragonfly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ f! {
()
}

pub fn CPU_ISSET(cpu: usize, cpuset: &mut cpu_set_t) -> bool {
pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
let (idx, offset) = ((cpu >> 6) & 3, cpu & 63);
0 != cpuset.ary[idx] & (1 << offset)
}
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@ f! {
()
}

pub fn CPU_ISSET(cpu: usize, cpuset: &mut cpuset_t) -> bool {
pub fn CPU_ISSET(cpu: usize, cpuset: &cpuset_t) -> bool {
let bitset_bits = ::mem::size_of::<::c_long>();
let (idx, offset) = (cpu / bitset_bits, cpu % bitset_bits);
0 != cpuset.__bits[idx] & (1 << offset)
Expand Down

0 comments on commit 971fde3

Please sign in to comment.