From 343e9de8ef4ee9727f027c896ce99f09611b9603 Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Wed, 11 Jul 2012 20:00:58 -0400 Subject: Proper locking with blocked_on()/wakeup() in rust_port. Closes #2787. Closes #1923. --- src/rt/rust_port_selector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rt/rust_port_selector.cpp') diff --git a/src/rt/rust_port_selector.cpp b/src/rt/rust_port_selector.cpp index 7b3b45788f7..52f9e0c3a01 100644 --- a/src/rt/rust_port_selector.cpp +++ b/src/rt/rust_port_selector.cpp @@ -75,7 +75,7 @@ rust_port_selector::msg_sent_on(rust_port *port) { // Prevent two ports from trying to wake up the task // simultaneously - scoped_lock with(rendezvous_lock); + scoped_lock with(task->lifecycle_lock); if (task->blocked_on(this)) { for (size_t i = 0; i < n_ports; i++) { @@ -85,7 +85,7 @@ rust_port_selector::msg_sent_on(rust_port *port) { n_ports = 0; *task->rendezvous_ptr = (uintptr_t) port; task->rendezvous_ptr = NULL; - task->wakeup(this); + task->wakeup_inner(this); return; } } -- cgit 1.4.1-3-g733a5