summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-02-02 16:30:22 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-02 18:10:24 -0800
commit3978fbff8b79d53de57d48473bde43aa533369fd (patch)
treeeedd614937b44394cebb2fc51a30b2f65c3d63d0 /src/rt
parented3a5ad5ad01a7213cecb6361b83d710f8eb4249 (diff)
downloadrust-3978fbff8b79d53de57d48473bde43aa533369fd.tar.gz
rust-3978fbff8b79d53de57d48473bde43aa533369fd.zip
rt: Remove rust_task::can_schedule. Does nothing
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_scheduler.cpp18
-rw-r--r--src/rt/rust_task.cpp5
-rw-r--r--src/rt/rust_task.h2
3 files changed, 5 insertions, 20 deletions
diff --git a/src/rt/rust_scheduler.cpp b/src/rt/rust_scheduler.cpp
index 7b6a0356b6b..508c87d820d 100644
--- a/src/rt/rust_scheduler.cpp
+++ b/src/rt/rust_scheduler.cpp
@@ -135,16 +135,10 @@ rust_scheduler::reap_dead_tasks(int id) {
     for (size_t i = 0; i < dead_tasks_len; ++i) {
         rust_task *task = dead_tasks_copy[i];
         task->lock.lock();
-        // Make sure this task isn't still running somewhere else...
-        if (task->can_schedule(id)) {
-            DLOG(this, task,
-                "deleting unreferenced dead task %s @0x%" PRIxPTR,
-                task->name, task);
-            task->lock.unlock();
-        } else {
-            task->lock.unlock();
-            dead_tasks_copy[i] = NULL;
-        }
+        DLOG(this, task,
+             "deleting unreferenced dead task %s @0x%" PRIxPTR,
+             task->name, task);
+        task->lock.unlock();
     }
 
     // Now grab the lock again and remove the tasks that were truly dead
@@ -192,9 +186,7 @@ rust_scheduler::schedule_task(int id) {
         // Look around for a runnable task, starting at k.
         for(size_t j = 0; j < running_tasks.length(); ++j) {
             size_t  i = (j + k) % running_tasks.length();
-            if (running_tasks[i]->can_schedule(id)) {
-                return (rust_task *)running_tasks[i];
-            }
+            return (rust_task *)running_tasks[i];
         }
     }
     return NULL;
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 831d34a6bf0..098e9e3c131 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -623,11 +623,6 @@ rust_task::backtrace() {
 #endif
 }
 
-bool rust_task::can_schedule(int id)
-{
-    return true;
-}
-
 void *
 rust_task::calloc(size_t size, const char *tag) {
     return local_region.calloc(size, tag);
diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h
index 07ebfb9c50a..c3a53ee4eac 100644
--- a/src/rt/rust_task.h
+++ b/src/rt/rust_task.h
@@ -171,8 +171,6 @@ rust_task : public kernel_owned<rust_task>, rust_cond
     frame_glue_fns *get_frame_glue_fns(uintptr_t fp);
     rust_crate_cache * get_crate_cache();
 
-    bool can_schedule(int worker);
-
     void *calloc(size_t size, const char *tag);
 
     rust_port_id register_port(rust_port *port);