about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-18 15:36:48 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-18 15:36:48 -0800
commit1e58049da27614034f8eac5bc0e6ef9e2f2be3e6 (patch)
treec563329196ecb410c7834a068dea1f8421378007 /src/rt/rust_task.cpp
parent792068d871f2a8f7184a6f109db1d65c73bf63da (diff)
downloadrust-1e58049da27614034f8eac5bc0e6ef9e2f2be3e6.tar.gz
rust-1e58049da27614034f8eac5bc0e6ef9e2f2be3e6.zip
rt: Remove fail calls from rust_task::yield
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 39f8488e784..e996563b0f5 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -267,13 +267,13 @@ rust_task::grow(size_t n_frame_bytes)
 
 // Only run this on the rust stack
 void
-rust_task::yield(size_t time_in_us) {
+rust_task::yield(size_t time_in_us, bool *killed) {
     LOG(this, task, "task %s @0x%" PRIxPTR " yielding for %d us",
         name, this, time_in_us);
 
-    if (killed) {
+    if (this->killed) {
         A(sched, !blocked(), "Shouldn't be blocked before failing");
-        fail();
+        *killed = true;
     }
 
     yield_timer.reset_us(time_in_us);
@@ -281,8 +281,8 @@ rust_task::yield(size_t time_in_us) {
     // Return to the scheduler.
     ctx.next->swap(ctx);
 
-    if (killed) {
-        fail();
+    if (this->killed) {
+        *killed = true;
     }
 }