mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 13:40:15 +03:00
rt: expose rust_task refcounts to rustland
This commit is contained in:
@@ -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++
|
||||
|
||||
@@ -194,3 +194,5 @@ rust_signal_cond_lock
|
||||
rust_get_task_local_data
|
||||
rust_set_task_local_data
|
||||
rust_task_local_data_atexit
|
||||
rust_task_ref
|
||||
rust_task_deref
|
||||
|
||||
Reference in New Issue
Block a user