From bae817efe688d32047db158606495dea6a2466f0 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 16 Nov 2011 16:58:52 -0800 Subject: [PATCH] rt: Remove rust_task::notify_tasks_wating_to_join --- src/rt/rust_scheduler.cpp | 1 - src/rt/rust_task.cpp | 15 --------------- src/rt/rust_task.h | 6 ------ 3 files changed, 22 deletions(-) diff --git a/src/rt/rust_scheduler.cpp b/src/rt/rust_scheduler.cpp index cf3b03ee60de..6a88c2f2417a 100644 --- a/src/rt/rust_scheduler.cpp +++ b/src/rt/rust_scheduler.cpp @@ -137,7 +137,6 @@ rust_scheduler::reap_dead_tasks(int id) { task->lock.lock(); // Make sure this task isn't still running somewhere else... if (task->can_schedule(id)) { - I(this, task->tasks_waiting_to_join.is_empty()); DLOG(this, task, "deleting unreferenced dead task %s @0x%" PRIxPTR, task->name, task); diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 14a32ac2c63c..19e9e1e14e10 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -197,7 +197,6 @@ void task_start_wrapper(spawn_args *a) #endif } else { task->lock.lock(); - task->notify_tasks_waiting_to_join(); task->lock.unlock(); task->yield(1); } @@ -324,7 +323,6 @@ rust_task::conclude_failure() { unblock(); fail_parent(); failed = true; - notify_tasks_waiting_to_join(); yield(4); } @@ -356,19 +354,6 @@ rust_task::unsupervise() propagate_failure = false; } -void -rust_task::notify_tasks_waiting_to_join() { - while (tasks_waiting_to_join.is_empty() == false) { - LOG(this, task, "notify_tasks_waiting_to_join: %d", - tasks_waiting_to_join.size()); - rust_task *waiting_task = 0; - tasks_waiting_to_join.pop(&waiting_task); - if (waiting_task->blocked() == true) { - waiting_task->wakeup(this); - } - } -} - frame_glue_fns* rust_task::get_frame_glue_fns(uintptr_t fp) { fp -= sizeof(uintptr_t); diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index edd4faa8903d..9311ba610a87 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -99,9 +99,6 @@ rust_task : public kernel_owned, rust_cond // that location before waking us up. uintptr_t* rendezvous_ptr; - // List of tasks waiting for this task to finish. - array_list tasks_waiting_to_join; - // This flag indicates that a worker is either currently running the task // or is about to run this task. int running_on; @@ -184,9 +181,6 @@ rust_task : public kernel_owned, rust_cond // Disconnect from our supervisor. void unsupervise(); - // Notify tasks waiting for us that we are about to die. - void notify_tasks_waiting_to_join(); - frame_glue_fns *get_frame_glue_fns(uintptr_t fp); rust_crate_cache * get_crate_cache();