From e7f00b64933b85289921f641b2658f41eeb338ec Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 3 Feb 2012 15:45:59 -0800 Subject: rt: Do all task creation through a scheduler --- src/rt/rust.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/rt/rust.cpp') 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 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; -- cgit 1.4.1-3-g733a5