diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2012-07-11 20:00:58 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2012-07-12 18:08:36 -0400 |
| commit | 343e9de8ef4ee9727f027c896ce99f09611b9603 (patch) | |
| tree | 203e9084453699cb8b7175a75438cfd5c9ed8d00 /src/rt/rust_port_selector.cpp | |
| parent | b897696a3abde84e57cda3f6e4267be3b647835c (diff) | |
| download | rust-343e9de8ef4ee9727f027c896ce99f09611b9603.tar.gz rust-343e9de8ef4ee9727f027c896ce99f09611b9603.zip | |
Proper locking with blocked_on()/wakeup() in rust_port. Closes #2787. Closes #1923.
Diffstat (limited to 'src/rt/rust_port_selector.cpp')
| -rw-r--r-- | src/rt/rust_port_selector.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } } |
