File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -923,21 +923,21 @@ fn get_concurrency() -> usize {
923
923
target_os = "netbsd" ) ) ]
924
924
fn num_cpus ( ) -> usize {
925
925
let mut cpus: libc:: c_uint = 0 ;
926
- let mut CPUS_SIZE = std:: mem:: size_of_val ( & cpus) ;
926
+ let mut cpus_size = std:: mem:: size_of_val ( & cpus) ;
927
927
let mut mib = [ libc:: CTL_HW , libc:: HW_AVAILCPU , 0 , 0 ] ;
928
928
929
929
unsafe {
930
930
libc:: sysctl ( mib. as_mut_ptr ( ) , 2 ,
931
931
& mut cpus as * mut _ as * mut _ ,
932
- & mut CPUS_SIZE as * mut _ as * mut _ ,
932
+ & mut cpus_size as * mut _ as * mut _ ,
933
933
0 as * mut _ , 0 ) ;
934
934
}
935
935
if cpus < 1 {
936
- mib[ 1 ] = HW_NCPU ;
936
+ mib[ 1 ] = libc :: HW_NCPU ;
937
937
unsafe {
938
938
libc:: sysctl ( mib. as_mut_ptr ( ) , 2 ,
939
939
& mut cpus as * mut _ as * mut _ ,
940
- & mut CPUS_SIZE as * mut _ as * mut _ ,
940
+ & mut cpus_size as * mut _ as * mut _ ,
941
941
0 as * mut _ , 0 ) ;
942
942
}
943
943
if cpus < 1 {
You can’t perform that action at this time.
0 commit comments