about summary refs log tree commit diff
path: root/src/rt/rust.cpp
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-07-23 14:01:43 -0700
committerEric Holk <eholk@mozilla.com>2011-07-28 10:47:28 -0700
commitb51f5c395cc3458e428159b908ca95b1777e66e2 (patch)
treea531c23c4a54812fd6de8faee80f24f3e4607da9 /src/rt/rust.cpp
parentc15871ac517136e216a1783d722307a1da1da106 (diff)
downloadrust-b51f5c395cc3458e428159b908ca95b1777e66e2.tar.gz
rust-b51f5c395cc3458e428159b908ca95b1777e66e2.zip
Made root_task no longer special.
Diffstat (limited to 'src/rt/rust.cpp')
-rw-r--r--src/rt/rust.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp
index 029532363c8..06097e34197 100644
--- a/src/rt/rust.cpp
+++ b/src/rt/rust.cpp
@@ -144,10 +144,11 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) {
     rust_srv *srv = new rust_srv();
     rust_kernel *kernel = new rust_kernel(srv);
     kernel->start();
-    rust_scheduler *sched = kernel->get_scheduler();
+    rust_task *root_task = kernel->create_task(NULL, "main");
+    rust_scheduler *sched = root_task->sched;
     command_line_args *args
         = new (kernel, "main command line args")
-        command_line_args(sched->root_task, argc, argv);
+        command_line_args(root_task, argc, argv);
 
     DLOG(sched, dom, "startup: %d args in 0x%" PRIxPTR,
              args->argc, (uintptr_t)args->args);
@@ -155,7 +156,7 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) {
         DLOG(sched, dom, "startup: arg[%d] = '%s'", i, args->argv[i]);
     }
 
-    sched->root_task->start(main_fn, (uintptr_t)args->args);
+    root_task->start(main_fn, (uintptr_t)args->args);
 
     int num_threads = get_num_threads();