rt: expose rust_task refcounts to rustland

This commit is contained in:
Ben Blum
2012-08-03 21:00:23 -04:00
parent f57760c609
commit 4174de8bb9
2 changed files with 14 additions and 0 deletions

View File

@@ -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++