From 676e0290ed4d306e6d7b517de1409c109309a0b2 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 3 Feb 2013 18:15:43 -0800 Subject: core: Add rt mod and add the new scheduler code --- src/rt/rust_builtin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rt/rust_builtin.cpp') diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index a621d61cdf7..248f851e5b9 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -769,20 +769,20 @@ extern "C" CDECL void record_sp_limit(void *limit); class raw_thread: public rust_thread { public: - fn_env_pair *fn; + fn_env_pair fn; - raw_thread(fn_env_pair *fn) : fn(fn) { } + raw_thread(fn_env_pair fn) : fn(fn) { } virtual void run() { record_sp_limit(0); - fn->f(NULL, fn->env, NULL); + fn.f(NULL, fn.env, NULL); } }; extern "C" raw_thread* rust_raw_thread_start(fn_env_pair *fn) { assert(fn); - raw_thread *thread = new raw_thread(fn); + raw_thread *thread = new raw_thread(*fn); thread->start(); return thread; } -- cgit 1.4.1-3-g733a5