From a493350eb5ab38ba8a6563f3eb4a090d257b0d3a Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Fri, 10 Sep 2010 01:21:29 -0700 Subject: Cleanup, refactoring, and some runtime tests. --- src/rt/rust_task.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/rt/rust_task.h') diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index 7b0cfef7..26ba872d 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -7,7 +7,6 @@ #include "util/array_list.h" - struct rust_task : public maybe_proxy, public dom_owned @@ -22,11 +21,11 @@ rust_task : public maybe_proxy, // Fields known only to the runtime. const char *const name; - ptr_vec *state; + rust_task_list *state; rust_cond *cond; const char *cond_name; rust_task *supervisor; // Parent-link for failure propagation. - size_t idx; + int32_t list_index; size_t gc_alloc_thresh; size_t gc_alloc_accum; @@ -50,6 +49,7 @@ rust_task : public maybe_proxy, // Only a pointer to 'name' is kept, so it must live as long as this task. rust_task(rust_dom *dom, + rust_task_list *state, rust_task *spawner, const char *name); @@ -71,8 +71,7 @@ rust_task : public maybe_proxy, void *realloc(void *data, size_t sz, bool gc_mem=false); void free(void *p, bool gc_mem=false); - const char *state_str(); - void transition(ptr_vec *svec, ptr_vec *dvec); + void transition(rust_task_list *src, rust_task_list *dst); void block(rust_cond *on, const char* name); void wakeup(rust_cond *from); -- cgit v1.2.3