about summary refs log tree commit diff
path: root/src/rt/rust.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-02-03 15:45:59 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-03 23:48:12 -0800
commite7f00b64933b85289921f641b2658f41eeb338ec (patch)
treefdd69132ccbbf691c5658639373636d27443dd09 /src/rt/rust.cpp
parentbf250bec7c59b52bbeb6bcb67d4b09133fd2f483 (diff)
downloadrust-e7f00b64933b85289921f641b2658f41eeb338ec.tar.gz
rust-e7f00b64933b85289921f641b2658f41eeb338ec.zip
rt: Do all task creation through a scheduler
Diffstat (limited to 'src/rt/rust.cpp')
-rw-r--r--src/rt/rust.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp
index 9f9af2c5e8c..b5af3942a20 100644
--- a/src/rt/rust.cpp
+++ b/src/rt/rust.cpp
@@ -1,5 +1,6 @@
 #include "rust_internal.h"
 #include "rust_util.h"
+#include "rust_scheduler.h"
 #include <cstdio>
 
 struct
@@ -87,7 +88,8 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) {
 
     rust_srv *srv = new rust_srv(env);
     rust_kernel *kernel = new rust_kernel(srv, env->num_sched_threads);
-    rust_task_id root_id = kernel->create_task(NULL, "main", MAIN_STACK_SIZE);
+    rust_scheduler *sched = kernel->get_default_scheduler();
+    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_thread *thread = root_task->thread;