diff options
Diffstat (limited to 'src/rt/rust_kernel.cpp')
| -rw-r--r-- | src/rt/rust_kernel.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index 8ca49ea6a57..c365f3cca1e 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -369,30 +369,6 @@ rust_kernel::unregister_task() { } void -rust_kernel::weaken_task(rust_port_id chan) { - { - scoped_lock with(weak_task_lock); - KLOG_("Weakening task with channel %" PRIdPTR, chan); - weak_task_chans.push_back(chan); - } - inc_weak_task_count(); -} - -void -rust_kernel::unweaken_task(rust_port_id chan) { - dec_weak_task_count(); - { - scoped_lock with(weak_task_lock); - KLOG_("Unweakening task with channel %" PRIdPTR, chan); - std::vector<rust_port_id>::iterator iter = - std::find(weak_task_chans.begin(), weak_task_chans.end(), chan); - if (iter != weak_task_chans.end()) { - weak_task_chans.erase(iter); - } - } -} - -void rust_kernel::inc_weak_task_count() { uintptr_t new_non_weak_tasks = sync::decrement(non_weak_tasks); KLOG_("New non-weak tasks %" PRIdPTR, new_non_weak_tasks); @@ -408,23 +384,6 @@ rust_kernel::dec_weak_task_count() { } void -rust_kernel::end_weak_tasks() { - std::vector<rust_port_id> chancopies; - { - scoped_lock with(weak_task_lock); - chancopies = weak_task_chans; - weak_task_chans.clear(); - } - while (!chancopies.empty()) { - rust_port_id chan = chancopies.back(); - chancopies.pop_back(); - KLOG_("Notifying weak task " PRIdPTR, chan); - uintptr_t token = 0; - send_to_port(chan, &token); - } -} - -void rust_kernel::begin_shutdown() { { scoped_lock with(sched_lock); @@ -439,7 +398,6 @@ rust_kernel::begin_shutdown() { run_exit_functions(); allow_scheduler_exit(); - end_weak_tasks(); } bool |
