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-02-01 18:50:19 -0800
committerNiko Matsakis <niko@alum.mit.edu>2012-02-01 18:50:19 -0800
commit31166438063236e6d2ad021cf2169fce2b3839b4 (patch)
treec42edd27f47c8a78cc212391c093992d3bde7f4b /src/rt/rust_task.h
parentc36207bfb82f794f17fc5854d4ae50284eddf329 (diff)
Revert "make boxes self-describing (fixes #1493)" until a new
snapshot is prepared.
Diffstat (limited to 'src/rt/rust_task.h')
-rw-r--r--src/rt/rust_task.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h
index 418eb54cab5..0d7cfed4a32 100644
--- a/src/rt/rust_task.h
+++ b/src/rt/rust_task.h
@@ -14,7 +14,6 @@
 #include "rust_internal.h"
 #include "rust_kernel.h"
 #include "rust_obstack.h"
-#include "boxed_region.h"
 
 // Corresponds to the rust chan (currently _chan) type.
 struct chan_handle {
@@ -107,7 +106,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     int pinned_on;
 
     memory_region local_region;
-    boxed_region boxed;
 
     // Indicates that fail() has been called and we are cleaning up.
     // We use this to suppress the "killed" flag during calls to yield.
@@ -123,6 +121,7 @@ rust_task : public kernel_owned<rust_task>, rust_cond
 
     rust_obstack dynastack;
 
+    std::map<void *,const type_desc *> local_allocs;
     uint32_t cc_counter;
 
     debug::task_debug_info debug;
@@ -140,7 +139,7 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     ~rust_task();
 
     void start(spawn_fn spawnee_fn,
-               rust_opaque_box *env,
+               rust_opaque_closure *env,
                void *args);
     void start();
     bool running();
@@ -195,6 +194,11 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     // not at all safe.
     intptr_t get_ref_count() const { return ref_count; }
 
+    // FIXME: These functions only exist to get the tasking system off the
+    // ground. We should never be migrating shared boxes between tasks.
+    const type_desc *release_alloc(void *alloc);
+    void claim_alloc(void *alloc, const type_desc *tydesc);
+
     void notify(bool success);
 
     void *new_stack(size_t stk_sz, void *args_addr, size_t args_sz);