Remove old comm-based weak task interface

This commit is contained in:
Brian Anderson
2013-01-21 19:22:55 -08:00
parent a3e087cefa
commit cc9ab2c033
5 changed files with 0 additions and 165 deletions
-42
View File
@@ -368,30 +368,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);
@@ -407,23 +383,6 @@ rust_kernel::dec_weak_task_count() {
KLOG_("New non-weak tasks %" PRIdPTR, new_non_weak_tasks);
}
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() {
{
@@ -439,7 +398,6 @@ rust_kernel::begin_shutdown() {
run_exit_functions();
allow_scheduler_exit();
end_weak_tasks();
}
bool