about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-06 14:07:37 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-06 14:07:51 -0700
commit74370042aa698c0360aadf356ccc4305cc2c0cd2 (patch)
tree7d41b1e27b4195ef89c868e5f5838c55e356a3e9
parentc973732a23da75b09dd6d35ce6f951c8bcd6cb01 (diff)
downloadrust-74370042aa698c0360aadf356ccc4305cc2c0cd2.tar.gz
rust-74370042aa698c0360aadf356ccc4305cc2c0cd2.zip
core: Rename task::osmain to platform_thread. #3090
-rw-r--r--src/libcore/task.rs12
-rw-r--r--src/test/run-pass/platform_thread.rs (renamed from src/test/run-pass/osmain.rs)2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index da25eb308ab..cf354f0f809 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -71,7 +71,7 @@ export single_threaded;
 export thread_per_core;
 export thread_per_task;
 export manual_threads;
-export osmain;
+export platform_thread;
 
 /* Data types */
 
@@ -116,7 +116,7 @@ enum sched_mode {
      * The main OS thread is the thread used to launch the runtime which,
      * in most cases, is the process's initial thread as created by the OS.
      */
-    osmain
+    platform_thread
 }
 
 /**
@@ -1176,10 +1176,10 @@ fn spawn_raw(opts: task_opts, +f: fn~()) {
             }
             threads
           }
-          osmain => 0u /* Won't be used */
+          platform_thread => 0u /* Won't be used */
         };
 
-        let sched_id = if opts.mode != osmain {
+        let sched_id = if opts.mode != platform_thread {
             rustrt::rust_new_sched(num_threads)
         } else {
             rustrt::rust_osmain_sched_id()
@@ -1899,10 +1899,10 @@ fn test_avoid_copying_the_body_unlinked() {
 }
 
 #[test]
-fn test_osmain() {
+fn test_platform_thread() {
     let po = comm::port();
     let ch = comm::chan(po);
-    do task().sched_mode(osmain).spawn {
+    do task().sched_mode(platform_thread).spawn {
         comm::send(ch, ());
     }
     comm::recv(po);
diff --git a/src/test/run-pass/osmain.rs b/src/test/run-pass/platform_thread.rs
index 50db95026ea..9b26744870a 100644
--- a/src/test/run-pass/osmain.rs
+++ b/src/test/run-pass/platform_thread.rs
@@ -14,7 +14,7 @@ fn run(i: int) {
         return;
     }
 
-    do task::task().sched_mode(task::osmain).unlinked().spawn {
+    do task::task().sched_mode(task::platform_thread).unlinked().spawn {
         task::yield();
         do task::task().sched_mode(task::single_threaded).unlinked().spawn {
             task::yield();