about summary refs log tree commit diff
path: root/src/libcore/task.rs
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-06-26 16:18:37 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-06-26 16:18:37 -0700
commit697f1e38d646bb6c7bab054c8c8c5b469c566ef6 (patch)
tree614999c97dd8e6f648f8a3fd41a8de3304baffa9 /src/libcore/task.rs
parent999b567e2af0a454bc862bc2e5b1bc16dae78f44 (diff)
Change 'native' and 'crust' to 'extern'.
This comes with a terminology change. All linkage-symbols are 'extern'
now, including rust syms in other crates. Some extern ABIs are
merely "foreign". The term "native" is retired, not clear/useful.

What was "crust" is now "extern" applied to a _definition_. This
is a bit of an overloading, but should be unambiguous: it means
that the definition should be made available to some non-rust ABI.
Diffstat (limited to 'src/libcore/task.rs')
-rw-r--r--src/libcore/task.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index a284fc13e2e..5db3de225ad 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -104,17 +104,17 @@ Scheduler configuration options
 
 * sched_mode - The operating mode of the scheduler
 
-* native_stack_size - The size of the native stack, in bytes
+* foreign_stack_size - The size of the foreign stack, in bytes
 
-    Rust code runs on Rust-specific stacks. When Rust code calls native code
-    (via functions in native modules) it switches to a typical, large stack
+    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
-    native stacks have unspecified size, but with this option their size can
+    foreign stacks have unspecified size, but with this option their size can
     be precisely specified.
 "]
 type sched_opts = {
     mode: sched_mode,
-    native_stack_size: option<uint>
+    foreign_stack_size: option<uint>
 };
 
 #[doc = "
@@ -140,7 +140,7 @@ Task configuration options
     into a new scheduler with the specific properties required.
 
     This is of particular importance for libraries which want to call
-    into native code that blocks. Without doing so in a different
+    into foreign code that blocks. Without doing so in a different
     scheduler other tasks will be impeded or even blocked indefinitely.
 
 "]
@@ -408,7 +408,7 @@ fn spawn_sched(mode: sched_mode, +f: fn~()) {
     set_opts(builder, {
         sched: some({
             mode: mode,
-            native_stack_size: none
+            foreign_stack_size: none
         })
         with get_opts(builder)
     });
@@ -542,8 +542,8 @@ fn spawn_raw(opts: task_opts, +f: fn~()) {
     }
 
     fn new_task_in_new_sched(opts: sched_opts) -> *rust_task {
-        if opts.native_stack_size != none {
-            fail "native_stack_size scheduler option unimplemented";
+        if opts.foreign_stack_size != none {
+            fail "foreign_stack_size scheduler option unimplemented";
         }
 
         let num_threads = alt opts.mode {
@@ -804,7 +804,7 @@ native mod testrt {
 #[test]
 fn test_spawn_sched_blocking() {
 
-    // Testing that a task in one scheduler can block natively
+    // Testing that a task in one scheduler can block in foreign code
     // without affecting other schedulers
     iter::repeat(20u) {||
 
@@ -947,7 +947,7 @@ fn test_osmain() {
     let opts = {
         sched: some({
             mode: osmain,
-            native_stack_size: none
+            foreign_stack_size: none
         })
         with get_opts(buildr)
     };