fix num_cpus
This commit is contained in:
parent
40cb69da59
commit
82cb207607
1 changed files with 2 additions and 7 deletions
|
|
@ -1192,12 +1192,6 @@ fn get_concurrency() -> usize {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "redox")]
|
||||
fn num_cpus() -> usize {
|
||||
// FIXME: Implement num_cpus on Redox
|
||||
1
|
||||
}
|
||||
|
||||
#[cfg(target_os = "vxworks")]
|
||||
fn num_cpus() -> usize {
|
||||
// FIXME: Implement num_cpus on vxWorks
|
||||
|
|
@ -1220,7 +1214,8 @@ fn get_concurrency() -> usize {
|
|||
target_os = "ios",
|
||||
target_os = "linux",
|
||||
target_os = "macos",
|
||||
target_os = "solaris"
|
||||
target_os = "solaris",
|
||||
target_os = "redox",
|
||||
))]
|
||||
fn num_cpus() -> usize {
|
||||
unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as usize }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue