about summary refs log tree commit diff
path: root/src/rt/rust_task.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_task.h')
-rw-r--r--src/rt/rust_task.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h
index 300c1df133c..cc4a2a0ffe3 100644
--- a/src/rt/rust_task.h
+++ b/src/rt/rust_task.h
@@ -68,7 +68,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     // Fields known only to the runtime.
     rust_kernel *kernel;
     const char *const name;
-    rust_task_list *state;
     rust_cond *cond;
     const char *cond_name;
     int32_t list_index;
@@ -107,6 +106,9 @@ rust_task : public kernel_owned<rust_task>, rust_cond
 
 private:
 
+    lock_and_signal state_lock;
+    rust_task_list *state;
+
     // Protects the killed flag
     lock_and_signal kill_lock;
     // Indicates that the task was killed and needs to unwind
@@ -218,6 +220,8 @@ public:
     bool have_c_stack() { return c_stack != NULL; }
 
     rust_port_selector *get_port_selector() { return &port_selector; }
+
+    rust_task_list *get_state() { return state; }
 };
 
 // This stuff is on the stack-switching fast path