about summary refs log tree commit diff
path: root/src/rt/rust_task.h
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-01-04 20:11:39 -0800
committerNiko Matsakis <niko@alum.mit.edu>2012-01-06 22:40:31 -0800
commit25e81e34eaaa1953ca301e95314c1ed01e773a9d (patch)
treec8da5e9478d874344dc2c836d2c88dd2b1ea045b /src/rt/rust_task.h
parent98f5109cde838e66d629bf05c804ad1ca9b06c42 (diff)
downloadrust-25e81e34eaaa1953ca301e95314c1ed01e773a9d.tar.gz
rust-25e81e34eaaa1953ca301e95314c1ed01e773a9d.zip
rewrite task tests
Diffstat (limited to 'src/rt/rust_task.h')
-rw-r--r--src/rt/rust_task.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h
index 2c8e9809c7a..6be28f41574 100644
--- a/src/rt/rust_task.h
+++ b/src/rt/rust_task.h
@@ -21,7 +21,17 @@ struct chan_handle {
     rust_port_id port;
 };
 
-typedef void (*CDECL spawn_fn)(uintptr_t, uintptr_t);
+struct rust_closure {
+    const type_desc *td;
+    // ... see trans_closure.rs for full description ...
+};
+
+struct rust_boxed_closure {
+    intptr_t ref_count;
+    rust_closure closure;
+};
+
+typedef void (*CDECL spawn_fn)(void*, rust_boxed_closure*, void *);
 
 struct rust_box;
 
@@ -135,7 +145,8 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     ~rust_task();
 
     void start(spawn_fn spawnee_fn,
-               uintptr_t args);
+               rust_boxed_closure *env,
+               void *args);
     void start();
     bool running();
     bool blocked();