about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBen Blum <bblum@andrew.cmu.edu>2012-07-12 19:43:22 -0400
committerBen Blum <bblum@andrew.cmu.edu>2012-07-12 19:49:49 -0400
commita10f52c5793b358a16e3e98db4b16c65ba8e254b (patch)
tree67e53933ce262ab82e2179841f9fc400db72a840 /src/rt/rust_task.cpp
parent5724c6454950617c292daba89cdb9a3b4c862430 (diff)
downloadrust-a10f52c5793b358a16e3e98db4b16c65ba8e254b.tar.gz
rust-a10f52c5793b358a16e3e98db4b16c65ba8e254b.zip
Revert linked failure (rust_port locking)
This reverts commit 343e9de8ef4ee9727f027c896ce99f09611b9603.
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 3d88c05b3ff..fa05a713745 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -243,7 +243,7 @@ rust_task::must_fail_from_being_killed_inner() {
 // Only run this on the rust stack
 void
 rust_task::yield(bool *killed) {
-    // FIXME (#2875): clean this up
+    // FIXME (#2787): clean this up
     if (must_fail_from_being_killed()) {
         {
             scoped_lock with(lifecycle_lock);
@@ -346,11 +346,12 @@ void rust_task::assert_is_running()
     assert(state == task_state_running);
 }
 
-// FIXME (#2851) Remove this code when rust_port goes away?
+// FIXME (#2851, #2787): This is only used by rust_port/rust_port selector,
+// and is inherently racy. Get rid of it.
 bool
 rust_task::blocked_on(rust_cond *on)
 {
-    lifecycle_lock.must_have_lock();
+    scoped_lock with(lifecycle_lock);
     return cond == on;
 }