diff options
| author | Philipp Brüschweiler <blei42@gmail.com> | 2012-09-18 12:28:05 +0200 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-19 14:01:53 -0700 |
| commit | d3e0a065788ef145fe911cf73bb7324c22b53fee (patch) | |
| tree | b8c32522ae1e647b5810c7259a6e0233ab457b9c /src/libcore/task.rs | |
| parent | 68e755b1c26db09cf8e121bbbea2075f6116e279 (diff) | |
| download | rust-d3e0a065788ef145fe911cf73bb7324c22b53fee.tar.gz rust-d3e0a065788ef145fe911cf73bb7324c22b53fee.zip | |
V2: now with more locks!
Diffstat (limited to 'src/libcore/task.rs')
| -rw-r--r-- | src/libcore/task.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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(); |
