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/libextra | |
| 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/libextra')
| -rw-r--r-- | src/libextra/test.rs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/libextra/test.rs b/src/libextra/test.rs index 97793ce440c..1c6e2a25c01 100644 --- a/src/libextra/test.rs +++ b/src/libextra/test.rs @@ -36,14 +36,6 @@ use std::u64; use std::uint; use std::vec; -pub mod rustrt { - use std::libc::size_t; - - #[abi = "cdecl"] - pub extern { - pub unsafe fn rust_sched_threads() -> size_t; - } -} // The name of a test. By convention this follows the rules for rust // paths; i.e. it should be a series of identifiers separated by double @@ -493,11 +485,10 @@ static SCHED_OVERCOMMIT : uint = 1; static SCHED_OVERCOMMIT : uint = 4u; fn get_concurrency() -> uint { - unsafe { - let threads = rustrt::rust_sched_threads() as uint; - if threads == 1 { 1 } - else { threads * SCHED_OVERCOMMIT } - } + use std::rt; + let threads = rt::util::default_sched_threads(); + if threads == 1 { 1 } + else { threads * SCHED_OVERCOMMIT } } #[allow(non_implicitly_copyable_typarams)] |
