V2: now with more locks!

This commit is contained in:
Philipp Brüschweiler
2012-09-18 12:28:05 +02:00
committed by Brian Anderson
parent 68e755b1c2
commit d3e0a06578
6 changed files with 43 additions and 33 deletions

View File

@@ -26,7 +26,7 @@ export run_tests_console;
#[abi = "cdecl"]
extern mod rustrt {
fn rust_max_sched_threads() -> libc::size_t;
fn rust_sched_threads() -> libc::size_t;
}
// The name of a test. By convention this follows the rules for rust
@@ -327,7 +327,7 @@ const sched_overcommit : uint = 1u;
const sched_overcommit : uint = 4u;
fn get_concurrency() -> uint {
let threads = rustrt::rust_max_sched_threads() as uint;
let threads = rustrt::rust_sched_threads() as uint;
if threads == 1u { 1u }
else { threads * sched_overcommit }
}