summary refs log tree commit diff
path: root/src/rt/rust_task.h
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-08-17 14:42:28 -0700
committerEric Holk <eholk@mozilla.com>2011-08-17 14:42:40 -0700
commitae89ea223de2fe5e9c9a5cdd2fa85a93828a7daa (patch)
tree1a28bb09eaeaf105bd84cc62c6a3e6c9ae2a8b8f /src/rt/rust_task.h
parentefac7c9a197fa3ff3497ce99a2dda8693b3ef683 (diff)
downloadrust-ae89ea223de2fe5e9c9a5cdd2fa85a93828a7daa.tar.gz
rust-ae89ea223de2fe5e9c9a5cdd2fa85a93828a7daa.zip
Making more of the rust_task structure directly accessible from Rust.
Diffstat (limited to 'src/rt/rust_task.h')
-rw-r--r--src/rt/rust_task.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h
index f1513ada616..ea155687d98 100644
--- a/src/rt/rust_task.h
+++ b/src/rt/rust_task.h
@@ -38,8 +38,11 @@ struct gc_alloc {
 // portions of the task structure that are accessible from the standard
 // library. This struct must agree with the std::task::rust_task record.
 struct rust_task_user {
+    rust_task_id id;
     uint8_t notify_enabled;
     chan_handle notify_chan;
+    context ctx;
+    uintptr_t rust_sp;         // Saved sp when not running.
 };
 
 // std::lib::task::task_result
@@ -66,7 +69,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     // Fields known to the compiler.
     stk_seg *stk;
     uintptr_t runtime_sp;      // Runtime sp while task running.
-    uintptr_t rust_sp;         // Saved sp when not running.
     gc_alloc *gc_alloc_chain;  // Linked list of GC allocations.
     rust_scheduler *sched;
     rust_crate_cache *cache;
@@ -82,7 +84,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     size_t gc_alloc_thresh;
     size_t gc_alloc_accum;
 
-    rust_task_id id;
     rust_port_id next_port_id;
 
     // Keeps track of the last time this task yielded.
@@ -99,8 +100,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     // List of tasks waiting for this task to finish.
     array_list<rust_task *> tasks_waiting_to_join;
 
-    context ctx;
-
     // This flag indicates that a worker is either currently running the task
     // or is about to run this task.
     int running_on;