about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-01-21 19:22:55 -0800
committerBrian Anderson <banderson@mozilla.com>2013-01-23 17:35:34 -0800
commitcc9ab2c0339aa00566ee6c5d12383278c7bd7eef (patch)
treef45ae66e7ce00c66cae3c793d088250a4af8003b /src/rt/rust_kernel.cpp
parenta3e087cefacb1b92476543fe7d6ef68f0ca82dd8 (diff)
downloadrust-cc9ab2c0339aa00566ee6c5d12383278c7bd7eef.tar.gz
rust-cc9ab2c0339aa00566ee6c5d12383278c7bd7eef.zip
Remove old comm-based weak task interface
Diffstat (limited to 'src/rt/rust_kernel.cpp')
-rw-r--r--src/rt/rust_kernel.cpp42
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