From 44bef5f2cb175769155d92ec65bd6b16e6708a1e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Aug 2011 13:38:20 -0700 Subject: Introduced task handles. This is the new way to refer to tasks in rust-land. Currently all they do is serve as a key to look up the old rust_task structure. Ideally they won't be ref counted, but baby steps. --- 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 42deca7b2cd..a94eb6c1a24 100644 --- a/src/rt/rust.cpp +++ b/src/rt/rust.cpp @@ -93,7 +93,9 @@ 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 *root_task = kernel->create_task(NULL, "main"); + rust_task_id root_id = kernel->create_task(NULL, "main"); + rust_task *root_task = kernel->get_task_by_id(root_id); + I(kernel, root_task != NULL); rust_scheduler *sched = root_task->sched; command_line_args *args = new (kernel, "main command line args") -- cgit 1.4.1-3-g733a5