Skip to content

Commit c220373

Browse files
author
Eric Holk
committed
---
yaml --- r: 4090 b: refs/heads/master c: 57459ec h: refs/heads/master v: v3
1 parent 372bee5 commit c220373

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 8878b128baddfa4ee38e4f9c43be75abe0edcd3d
2+
refs/heads/master: 57459ec8ae402be358393455533cdf363866cdca

trunk/src/rt/rust_chan.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ rust_chan::~rust_chan() {
3232
void rust_chan::associate(maybe_proxy<rust_port> *port) {
3333
this->port = port;
3434
if (port->is_proxy() == false) {
35+
scoped_lock with(port->referent()->lock);
3536
DLOG(kernel->sched, task,
3637
"associating chan: 0x%" PRIxPTR " with port: 0x%" PRIxPTR,
3738
this, port);
@@ -54,6 +55,7 @@ void rust_chan::disassociate() {
5455
"Channel must be associated with a port.");
5556

5657
if (port->is_proxy() == false) {
58+
scoped_lock with(port->referent()->lock);
5759
DLOG(kernel->sched, task,
5860
"disassociating chan: 0x%" PRIxPTR " from port: 0x%" PRIxPTR,
5961
this, port->referent());

0 commit comments

Comments
 (0)