From d3e0a065788ef145fe911cf73bb7324c22b53fee Mon Sep 17 00:00:00 2001 From: Philipp Brüschweiler Date: Tue, 18 Sep 2012 12:28:05 +0200 Subject: V2: now with more locks! --- src/libcore/task.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/task.rs b/src/libcore/task.rs index d9b5eb15a71..021f595cb32 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -1661,8 +1661,8 @@ extern mod rustrt { fn rust_get_sched_id() -> sched_id; fn rust_new_sched(num_threads: libc::uintptr_t) -> sched_id; - fn rust_max_sched_threads() -> libc::size_t; fn rust_sched_threads() -> libc::size_t; + fn rust_sched_current_nonlazy_threads() -> libc::size_t; fn rust_num_threads() -> libc::uintptr_t; fn get_task_id() -> task_id; @@ -2436,7 +2436,7 @@ fn test_sched_thread_per_core() { do spawn_sched(ThreadPerCore) { let cores = rustrt::rust_num_threads(); - let reported_threads = rustrt::rust_max_sched_threads(); + let reported_threads = rustrt::rust_sched_threads(); assert(cores as uint == reported_threads as uint); chan.send(()); } @@ -2449,9 +2449,9 @@ fn test_spawn_thread_on_demand() { let (chan, port) = pipes::stream(); do spawn_sched(ManualThreads(2)) { - let max_threads = rustrt::rust_max_sched_threads(); + let max_threads = rustrt::rust_sched_threads(); assert(max_threads as int == 2); - let running_threads = rustrt::rust_sched_threads(); + let running_threads = rustrt::rust_sched_current_nonlazy_threads(); assert(running_threads as int == 1); let (chan2, port2) = pipes::stream(); @@ -2460,7 +2460,7 @@ fn test_spawn_thread_on_demand() { chan2.send(()); } - let running_threads2 = rustrt::rust_sched_threads(); + let running_threads2 = rustrt::rust_sched_current_nonlazy_threads(); assert(running_threads2 as int == 2); port2.recv(); -- cgit 1.4.1-3-g733a5