Skip to content

Commit 76e173c

Browse files
committed
---
yaml --- r: 64875 b: refs/heads/snap-stage3 c: cb9ee7f h: refs/heads/master i: 64873: bdbe4c0 64871: 3ddcb61 v: v3
1 parent 403558a commit 76e173c

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 0144c83213cb5ce43df61f149274379f49b6d7cb
4+
refs/heads/snap-stage3: cb9ee7f5be0de2bb93688f8e2ef2934eb3bd7df7
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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/snap-stage3/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/snap-stage3/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/snap-stage3/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/snap-stage3/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/snap-stage3/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)