Skip to content

Commit bf6193d

Browse files
committed
---
yaml --- r: 69502 b: refs/heads/auto c: cb9ee7f h: refs/heads/master v: v3
1 parent 35bf99c commit bf6193d

File tree

7 files changed

+3
-62
lines changed

7 files changed

+3
-62
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 0144c83213cb5ce43df61f149274379f49b6d7cb
17+
refs/heads/auto: cb9ee7f5be0de2bb93688f8e2ef2934eb3bd7df7
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libextra/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ mod tests {
890890
fn test_sem_runtime_friendly_blocking() {
891891
// Force the runtime to schedule two threads on the same sched_loop.
892892
// When one blocks, it should schedule the other one.
893-
do task::spawn_sched(task::ManualThreads(1)) {
893+
do task::spawn_sched(task::SingleThreaded) {
894894
let s = ~Semaphore::new(1);
895895
let s2 = ~s.clone();
896896
let (p,c) = comm::stream();

branches/auto/src/libstd/task/mod.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ pub enum SchedMode {
107107
SingleThreaded,
108108
/// Tasks are distributed among available CPUs
109109
ThreadPerTask,
110-
/// Tasks are distributed among a fixed number of OS threads
111-
ManualThreads(uint),
112110
}
113111

114112
/**
@@ -932,13 +930,6 @@ fn test_try_fail() {
932930
}
933931
}
934932

935-
#[test]
936-
#[should_fail]
937-
#[ignore(cfg(windows))]
938-
fn test_spawn_sched_no_threads() {
939-
do spawn_sched(ManualThreads(0u)) { }
940-
}
941-
942933
#[test]
943934
fn test_spawn_sched() {
944935
let (po, ch) = stream::<()>();
@@ -1219,34 +1210,6 @@ fn test_child_doesnt_ref_parent() {
12191210
task::spawn(child_no(0));
12201211
}
12211212

1222-
#[test]
1223-
fn test_spawn_thread_on_demand() {
1224-
let (port, chan) = comm::stream();
1225-
1226-
do spawn_sched(ManualThreads(2)) || {
1227-
unsafe {
1228-
let max_threads = rt::rust_sched_threads();
1229-
assert_eq!(max_threads as int, 2);
1230-
let running_threads = rt::rust_sched_current_nonlazy_threads();
1231-
assert_eq!(running_threads as int, 1);
1232-
1233-
let (port2, chan2) = comm::stream();
1234-
1235-
do spawn_sched(CurrentScheduler) || {
1236-
chan2.send(());
1237-
}
1238-
1239-
let running_threads2 = rt::rust_sched_current_nonlazy_threads();
1240-
assert_eq!(running_threads2 as int, 2);
1241-
1242-
port2.recv();
1243-
chan.send(());
1244-
}
1245-
}
1246-
1247-
port.recv();
1248-
}
1249-
12501213
#[test]
12511214
fn test_simple_newsched_spawn() {
12521215
use rt::test::run_in_newsched_task;

branches/auto/src/libstd/task/rt.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ extern {
3636

3737
pub fn rust_get_sched_id() -> sched_id;
3838
pub fn rust_new_sched(num_threads: libc::uintptr_t) -> sched_id;
39-
pub fn rust_sched_threads() -> libc::size_t;
40-
pub fn rust_sched_current_nonlazy_threads() -> libc::size_t;
4139

4240
pub fn get_task_id() -> task_id;
4341
#[rust_stack]

branches/auto/src/libstd/task/spawn.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ use local_data;
8484
use task::local_data_priv::{local_get, local_set, OldHandle};
8585
use task::rt::rust_task;
8686
use task::rt;
87-
use task::{Failure, ManualThreads, PlatformThread, SchedOpts, SingleThreaded};
87+
use task::{Failure, PlatformThread, SchedOpts, SingleThreaded};
8888
use task::{Success, TaskOpts, TaskResult, ThreadPerTask};
8989
use task::{ExistingScheduler, SchedulerHandle};
9090
use task::unkillable;
@@ -814,12 +814,6 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
814814
ThreadPerTask => {
815815
fail!("ThreadPerTask scheduling mode unimplemented")
816816
}
817-
ManualThreads(threads) => {
818-
if threads == 0u {
819-
fail!("can not create a scheduler with no threads");
820-
}
821-
threads
822-
}
823817
};
824818

825819
unsafe {

branches/auto/src/rt/rust_builtin.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -549,18 +549,6 @@ start_task(rust_task *target, fn_env_pair *f) {
549549
target->start(f->f, f->env, NULL);
550550
}
551551

552-
extern "C" CDECL size_t
553-
rust_sched_current_nonlazy_threads() {
554-
rust_task *task = rust_get_current_task();
555-
return task->sched->number_of_threads();
556-
}
557-
558-
extern "C" CDECL size_t
559-
rust_sched_threads() {
560-
rust_task *task = rust_get_current_task();
561-
return task->sched->max_number_of_threads();
562-
}
563-
564552
// This is called by an intrinsic on the Rust stack and must run
565553
// entirely in the red zone. Do not call on the C stack.
566554
extern "C" CDECL MUST_CHECK bool

branches/auto/src/rt/rustrt.def.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ rust_log_console_off
4141
rust_should_log_console
4242
rust_set_environ
4343
rust_unset_sigprocmask
44-
rust_sched_current_nonlazy_threads
45-
rust_sched_threads
4644
rust_set_exit_status
4745
rust_start
4846
rust_env_pairs

0 commit comments

Comments
 (0)