]> git.lizzy.rs Git - rust.git/commitdiff
std: Remove foreign_stack_size spawn option. Irrelevant to future FFI changes
authorBrian Anderson <banderson@mozilla.com>
Mon, 29 Jul 2013 20:11:05 +0000 (13:11 -0700)
committerBrian Anderson <banderson@mozilla.com>
Wed, 31 Jul 2013 00:10:23 +0000 (17:10 -0700)
src/libstd/task/mod.rs
src/libstd/task/spawn.rs

index 5673e10062550df3d5f05a6f077fa77f62e1f17b..895de843061a4d6720b9394efea42226e6755ecd 100644 (file)
@@ -90,17 +90,9 @@ pub enum SchedMode {
  *
  * * sched_mode - The operating mode of the scheduler
  *
- * * foreign_stack_size - The size of the foreign stack, in bytes
- *
- *     Rust code runs on Rust-specific stacks. When Rust code calls foreign
- *     code (via functions in foreign modules) it switches to a typical, large
- *     stack appropriate for running code written in languages like C. By
- *     default these foreign stacks have unspecified size, but with this
- *     option their size can be precisely specified.
  */
 pub struct SchedOpts {
     mode: SchedMode,
-    foreign_stack_size: Option<uint>,
 }
 
 /**
@@ -418,7 +410,6 @@ pub fn default_task_opts() -> TaskOpts {
         notify_chan: None,
         sched: SchedOpts {
             mode: DefaultScheduler,
-            foreign_stack_size: None
         }
     }
 }
index 1d183e7dabb761aabd804bde4025a84733166120..a698f1342f0452e0dd852aa1941c28d7f0e68279 100644 (file)
@@ -84,7 +84,7 @@
 use task::local_data_priv::{local_get, local_set, OldHandle};
 use task::rt::rust_task;
 use task::rt;
-use task::{Failure, SchedOpts};
+use task::{Failure};
 use task::{Success, TaskOpts, TaskResult};
 use task::unkillable;
 use to_bytes::IterBytes;
@@ -741,7 +741,7 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
             // Create child task.
             let new_task = match opts.sched.mode {
                 DefaultScheduler => rt::new_task(),
-                _ => new_task_in_sched(opts.sched)
+                _ => new_task_in_sched()
             };
             assert!(!new_task.is_null());
             // Getting killed after here would leak the task.
@@ -799,11 +799,7 @@ fn make_child_wrapper(child: *rust_task, child_arc: TaskGroupArc,
         return result;
     }
 
-    fn new_task_in_sched(opts: SchedOpts) -> *rust_task {
-        if opts.foreign_stack_size != None {
-            fail!("foreign_stack_size scheduler option unimplemented");
-        }
-
+    fn new_task_in_sched() -> *rust_task {
         unsafe {
             let sched_id = rt::rust_new_sched(1);
             rt::rust_new_task_in_sched(sched_id)