about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-17 02:51:53 +0000
committerbors <bors@rust-lang.org>2014-06-17 02:51:53 +0000
commit09967665eaa5ca3d259f0f59ef26c8d236bf47a7 (patch)
treeae450abfecbe1fdec6f583cf7cf743c35663a4c7 /src/libstd/rt
parentcc30abbcad282634fb99089eb9297e7cc4f26729 (diff)
parentb9adb6c717627ab6dcc9298b79a8d44cfe2fc616 (diff)
downloadrust-09967665eaa5ca3d259f0f59ef26c8d236bf47a7.tar.gz
rust-09967665eaa5ca3d259f0f59ef26c8d236bf47a7.zip
auto merge of #14955 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/util.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs
index 670d4aa2061..fa30ddbcc48 100644
--- a/src/libstd/rt/util.rs
+++ b/src/libstd/rt/util.rs
@@ -11,23 +11,11 @@
 use from_str::FromStr;
 use from_str::from_str;
 use libc::uintptr_t;
-use libc;
 use option::{Some, None, Option};
 use os;
 use str::Str;
 use sync::atomics;
 
-/// Get the number of cores available
-pub fn num_cpus() -> uint {
-    unsafe {
-        return rust_get_num_cpus();
-    }
-
-    extern {
-        fn rust_get_num_cpus() -> libc::uintptr_t;
-    }
-}
-
 /// Dynamically inquire about whether we're running under V.
 /// You should usually not use this unless your test definitely
 /// can't run correctly un-altered. Valgrind is there to help
@@ -81,7 +69,7 @@ pub fn default_sched_threads() -> uint {
             if limit_thread_creation_due_to_osx_and_valgrind() {
                 1
             } else {
-                num_cpus()
+                os::num_cpus()
             }
         }
     }