diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2012-08-03 21:00:23 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2012-08-03 21:00:23 -0400 |
| commit | 4174de8bb941c3edbeb14f42ab4ebbfff5fb176d (patch) | |
| tree | 03b802a61a79fb6d74422fd16b2a655165f3b635 /src/rt/rust_builtin.cpp | |
| parent | f57760c609d636d2e4698a26848f5c990d417265 (diff) | |
| download | rust-4174de8bb941c3edbeb14f42ab4ebbfff5fb176d.tar.gz rust-4174de8bb941c3edbeb14f42ab4ebbfff5fb176d.zip | |
rt: expose rust_task refcounts to rustland
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index f9c95db1d04..1ba941c233c 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -968,6 +968,18 @@ task_signal_event(rust_task *target, void *event) { target->signal_event(event); } +// Can safely run on the rust stack. +extern "C" void +rust_task_ref(rust_task *task) { + task->ref(); +} + +// Don't run on the rust stack! +extern "C" void +rust_task_deref(rust_task *task) { + task->deref(); +} + // // Local Variables: // mode: C++ |
