diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-08-05 15:16:48 -0700 |
|---|---|---|
| committer | Eric Holk <eholk@mozilla.com> | 2011-08-05 15:27:28 -0700 |
| commit | b62e80c1f022131da963da84ef6768f300c2c5c3 (patch) | |
| tree | 5b975cd8fe1a872b9ac0bd0a9739d516588fa5ca /src/rt/rust_builtin.cpp | |
| parent | 200bbcf91b4eb190cff227127cc60a333f9c33a2 (diff) | |
| download | rust-b62e80c1f022131da963da84ef6768f300c2c5c3.tar.gz rust-b62e80c1f022131da963da84ef6768f300c2c5c3.zip | |
Atomic ref counting for chans.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 99eb61aff36..1b6ad431cab 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -905,8 +905,13 @@ void del_chan(rust_task *task, rust_chan *chan) { } extern "C" CDECL +void take_chan(rust_task *task, rust_chan *chan) { + chan->ref(); +} + +extern "C" CDECL void drop_chan(rust_task *task, rust_chan *chan) { - chan->ref_count--; + chan->deref(); } extern "C" CDECL |
