File tree 2 files changed +16
-0
lines changed
src/unix/bsd/freebsdlike/freebsd
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,11 @@ CMSG_LEN
163
163
CMSG_NXTHDR
164
164
CMSG_SPACE
165
165
CODESET
166
+ CPU_CLR
167
+ CPU_COUNT
168
+ CPU_ISSET
169
+ CPU_SET
170
+ CPU_ZERO
166
171
CRNCYSTR
167
172
CRTSCTS
168
173
CRTS_IFLOW
Original file line number Diff line number Diff line change @@ -3711,6 +3711,17 @@ f! {
3711
3711
0 != cpuset. __bits[ idx] & ( 1 << offset)
3712
3712
}
3713
3713
3714
+ pub fn CPU_COUNT ( cpuset: & cpuset_t) -> :: c_int {
3715
+ let mut s: u32 = 0 ;
3716
+ let cpuset_size = :: mem:: size_of:: <cpuset_t>( ) ;
3717
+ let bitset_bits = :: mem:: size_of:: <:: c_long>( ) ;
3718
+
3719
+ for i in cpuset. __bits[ ..( cpuset_size / bitset_bits) ] . iter( ) {
3720
+ s += i. count_ones( ) ;
3721
+ } ;
3722
+ s as :: c_int
3723
+ }
3724
+
3714
3725
pub fn SOCKCRED2SIZE ( ngrps: usize ) -> usize {
3715
3726
let ngrps = if ngrps > 0 {
3716
3727
ngrps - 1
You can’t perform that action at this time.
0 commit comments