about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-12-30 20:46:08 -0800
committerNiko Matsakis <niko@alum.mit.edu>2012-01-06 22:40:31 -0800
commit98f5109cde838e66d629bf05c804ad1ca9b06c42 (patch)
tree097edb4079a90bd4db126927e15494e686b25fd9 /src/rt/rust_builtin.cpp
parente88905cd2882919f95084f41539ca9601ebf5cfc (diff)
downloadrust-98f5109cde838e66d629bf05c804ad1ca9b06c42.tar.gz
rust-98f5109cde838e66d629bf05c804ad1ca9b06c42.zip
simplify task impl
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 28c819879b6..b387078a75a 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -2,6 +2,7 @@
 
 #include "rust_internal.h"
 #include "rust_scheduler.h"
+#include "rust_task.h"
 
 #if !defined(__WIN32__)
 #include <sys/time.h>
@@ -424,18 +425,11 @@ struct fn_env_pair {
     intptr_t env;
 };
 
-// FIXME This is probably not needed at all anymore. Have to rearrange some
-// argument passing to remove it.
-void rust_spawn_wrapper(void* retptr, void* envptr,
-                        void(*func)(void*, void*)) {
-    func(retptr, envptr);
-}
-
 extern "C" CDECL void
 start_task(rust_task_id id, fn_env_pair *f) {
     rust_task *task = rust_scheduler::get_task();
     rust_task *target = task->kernel->get_task_by_id(id);
-    target->start((uintptr_t)rust_spawn_wrapper, f->f, f->env);
+    target->start((spawn_fn)f->f, f->env);
     target->deref();
 }
 
@@ -578,6 +572,5 @@ port_recv(uintptr_t *dptr, rust_port *port,
 // indent-tabs-mode: nil
 // c-basic-offset: 4
 // buffer-file-coding-system: utf-8-unix
-// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
 // End:
 //