about summary refs log tree commit diff
path: root/src/rt/rust.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-03-14 20:22:34 -0700
committerBrian Anderson <banderson@mozilla.com>2012-03-15 11:10:52 -0700
commit1366d656605049f2e58525c7cad5433da9977db2 (patch)
tree1d2c2593180d038af2b63b4930d9e9636e54e44a /src/rt/rust.cpp
parentb278d675a231fdfe825c72e499d59e8a3d07ffaa (diff)
downloadrust-1366d656605049f2e58525c7cad5433da9977db2.tar.gz
rust-1366d656605049f2e58525c7cad5433da9977db2.zip
rt: Remove remaining uses of rust_kernel::get_task_by_id
Diffstat (limited to 'src/rt/rust.cpp')
-rw-r--r--src/rt/rust.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp
index 121f3d4bcfc..3f5f083650f 100644
--- a/src/rt/rust.cpp
+++ b/src/rt/rust.cpp
@@ -81,9 +81,7 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) {
     rust_kernel *kernel = new rust_kernel(srv);
     rust_sched_id sched_id = kernel->create_scheduler(env->num_sched_threads);
     rust_scheduler *sched = kernel->get_scheduler_by_id(sched_id);
-    rust_task_id root_id = sched->create_task(NULL, "main", MAIN_STACK_SIZE);
-    rust_task *root_task = kernel->get_task_by_id(root_id);
-    I(kernel, root_task != NULL);
+    rust_task *root_task = sched->create_task(NULL, "main", MAIN_STACK_SIZE);
     rust_task_thread *thread = root_task->thread;
     command_line_args *args
         = new (kernel, "main command line args")
@@ -96,7 +94,6 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) {
     }
 
     root_task->start((spawn_fn)main_fn, NULL, args->args);
-    root_task->deref();
     root_task = NULL;
 
     int ret = kernel->wait_for_schedulers();