extra: Make test runner compatible with newsched
This commit is contained in:
parent
d071f51cdc
commit
e65d0cbabe
4 changed files with 18 additions and 23 deletions
|
|
@ -31,14 +31,6 @@ use core::to_str::ToStr;
|
|||
use core::uint;
|
||||
use core::vec;
|
||||
|
||||
pub mod rustrt {
|
||||
use core::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
|
||||
|
|
@ -488,11 +480,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 core::rt;
|
||||
let threads = rt::util::default_sched_threads();
|
||||
if threads == 1 { 1 }
|
||||
else { threads * sched_overcommit }
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue