diff options
| author | bors <bors@rust-lang.org> | 2013-07-09 18:28:46 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-09 18:28:46 -0700 |
| commit | 41dcec2fe16e272016ae77d10a6a5ff3a737f192 (patch) | |
| tree | 6eebc49e7033a0d696c93c8e23d7caeb28d4eca1 /src/rt/rust_env.cpp | |
| parent | 137d1fb210a844a76f89d7355a1aaf9f7a88af33 (diff) | |
| parent | 413d51e32debf0c3f7dda2434b64d73585df21ef (diff) | |
| download | rust-41dcec2fe16e272016ae77d10a6a5ff3a737f192.tar.gz rust-41dcec2fe16e272016ae77d10a6a5ff3a737f192.zip | |
auto merge of #7265 : brson/rust/io-upstream, r=brson
r? @graydon, @nikomatsakis, @pcwalton, or @catamorphism Sorry this is so huge, but it's been accumulating for about a month. There's lots of stuff here, mostly oriented toward enabling multithreaded scheduling and improving compatibility between the old and new runtimes. Adds task pinning so that we can create the 'platform thread' in servo. [Here](https://github.com/brson/rust/blob/e1555f9b5628af2b6c6ed344cad621399cb7684d/src/libstd/rt/mod.rs#L201) is the current runtime setup code. About half of this has already been reviewed.
Diffstat (limited to 'src/rt/rust_env.cpp')
| -rw-r--r-- | src/rt/rust_env.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rt/rust_env.cpp b/src/rt/rust_env.cpp index eaccb3b0a44..ff03ea817b8 100644 --- a/src/rt/rust_env.cpp +++ b/src/rt/rust_env.cpp @@ -40,7 +40,7 @@ rust_drop_env_lock() { } #if defined(__WIN32__) -static int +int get_num_cpus() { SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); @@ -48,7 +48,7 @@ get_num_cpus() { return (int) sysinfo.dwNumberOfProcessors; } #elif defined(__BSD__) -static int +int get_num_cpus() { /* swiped from http://stackoverflow.com/questions/150355/ programmatically-find-the-number-of-cores-on-a-machine */ @@ -75,7 +75,7 @@ get_num_cpus() { return numCPU; } #elif defined(__GNUC__) -static int +int get_num_cpus() { return sysconf(_SC_NPROCESSORS_ONLN); } |
