Skip to content

Commit 33df9fc

Browse files
committed
std: Remove foreign_stack_size spawn option. Irrelevant to future FFI changes
1 parent 8f835d4 commit 33df9fc

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

src/libstd/task/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,9 @@ pub enum SchedMode {
9090
*
9191
* * sched_mode - The operating mode of the scheduler
9292
*
93-
* * foreign_stack_size - The size of the foreign stack, in bytes
94-
*
95-
* Rust code runs on Rust-specific stacks. When Rust code calls foreign
96-
* code (via functions in foreign modules) it switches to a typical, large
97-
* stack appropriate for running code written in languages like C. By
98-
* default these foreign stacks have unspecified size, but with this
99-
* option their size can be precisely specified.
10093
*/
10194
pub struct SchedOpts {
10295
mode: SchedMode,
103-
foreign_stack_size: Option<uint>,
10496
}
10597

10698
/**
@@ -418,7 +410,6 @@ pub fn default_task_opts() -> TaskOpts {
418410
notify_chan: None,
419411
sched: SchedOpts {
420412
mode: DefaultScheduler,
421-
foreign_stack_size: None
422413
}
423414
}
424415
}

src/libstd/task/spawn.rs

Lines changed: 3 additions & 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, SchedOpts};
87+
use task::{Failure};
8888
use task::{Success, TaskOpts, TaskResult};
8989
use task::unkillable;
9090
use to_bytes::IterBytes;
@@ -741,7 +741,7 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
741741
// Create child task.
742742
let new_task = match opts.sched.mode {
743743
DefaultScheduler => rt::new_task(),
744-
_ => new_task_in_sched(opts.sched)
744+
_ => new_task_in_sched()
745745
};
746746
assert!(!new_task.is_null());
747747
// Getting killed after here would leak the task.
@@ -799,11 +799,7 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
799799
return result;
800800
}
801801

802-
fn new_task_in_sched(opts: SchedOpts) -> *rust_task {
803-
if opts.foreign_stack_size != None {
804-
fail!("foreign_stack_size scheduler option unimplemented");
805-
}
806-
802+
fn new_task_in_sched() -> *rust_task {
807803
unsafe {
808804
let sched_id = rt::rust_new_sched(1);
809805
rt::rust_new_task_in_sched(sched_id)

0 commit comments

Comments
 (0)