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-09 13:47:37 -0800
committerNiko Matsakis <niko@alum.mit.edu>2012-01-09 19:53:32 -0800
commit110c3ccdcad4616fd558f248b61a4ba79d8ec86b (patch)
treee211c5b764ed6899c2ecf55047ee1a15886b722e /src/rt/rust_task.h
parent005e3194858785e9debae8116caedf4c14e3b727 (diff)
downloadrust-110c3ccdcad4616fd558f248b61a4ba79d8ec86b.tar.gz
rust-110c3ccdcad4616fd558f248b61a4ba79d8ec86b.zip
add rust_task_is_unwinding predicate and do not kill if already unwinding
Diffstat (limited to 'src/rt/rust_task.h')
-rw-r--r--src/rt/rust_task.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h
index d0e3d0e2ad6..b47b62e2d14 100644
--- a/src/rt/rust_task.h
+++ b/src/rt/rust_task.h
@@ -107,8 +107,10 @@ rust_task : public kernel_owned<rust_task>, rust_cond
 
     memory_region local_region;
 
-    // Indicates that the task ended in failure
-    bool failed;
+    // Indicates that fail() has been called and we are cleaning up.
+    // We use this to suppress the "killed" flag during calls to yield.
+    bool unwinding;
+
     // Indicates that the task was killed and needs to unwind
     bool killed;
     bool propagate_failure;