about summary refs log tree commit diff
path: root/src/libcore/task
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/task')
-rw-r--r--src/libcore/task/mod.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs
index 501dd52f9ca..c6b0491786d 100644
--- a/src/libcore/task/mod.rs
+++ b/src/libcore/task/mod.rs
@@ -971,15 +971,17 @@ fn test_spawn_sched_blocking() {
             let lock = testrt::rust_dbg_lock_create();
 
             do spawn_sched(SingleThreaded) {
-                testrt::rust_dbg_lock_lock(lock);
+                unsafe {
+                    testrt::rust_dbg_lock_lock(lock);
 
-                oldcomm::send(start_ch, ());
+                    oldcomm::send(start_ch, ());
 
-                // Block the scheduler thread
-                testrt::rust_dbg_lock_wait(lock);
-                testrt::rust_dbg_lock_unlock(lock);
+                    // Block the scheduler thread
+                    testrt::rust_dbg_lock_wait(lock);
+                    testrt::rust_dbg_lock_unlock(lock);
 
-                oldcomm::send(fin_ch, ());
+                    oldcomm::send(fin_ch, ());
+                }
             };
 
             // Wait until the other task has its lock