From ed3a5ad5ad01a7213cecb6361b83d710f8eb4249 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 2 Feb 2012 16:15:19 -0800 Subject: [PATCH] rt: Remove running_on flag. Does nothing --- src/rt/rust_scheduler.cpp | 2 -- src/rt/rust_task.cpp | 4 +--- src/rt/rust_task.h | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/rt/rust_scheduler.cpp b/src/rt/rust_scheduler.cpp index 9719ec377156..7b6a0356b6bb 100644 --- a/src/rt/rust_scheduler.cpp +++ b/src/rt/rust_scheduler.cpp @@ -282,9 +282,7 @@ rust_scheduler::start_main_loop() { DLOG(this, task, "Running task %p on worker %d", scheduled_task, id); - scheduled_task->running_on = id; activate(scheduled_task); - scheduled_task->running_on = -1; DLOG(this, task, "returned from task %s @0x%" PRIxPTR diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 6bd03e5f0ccf..831d34a6bf07 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -244,7 +244,6 @@ rust_task::rust_task(rust_scheduler *sched, rust_task_list *state, list_index(-1), next_port_id(0), rendezvous_ptr(0), - running_on(-1), local_region(&sched->srv->local_region), boxed(&local_region), unwinding(false), @@ -626,8 +625,7 @@ rust_task::backtrace() { bool rust_task::can_schedule(int id) { - return - running_on == -1; + return true; } void * diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index c9bd9e9d3a94..07ebfb9c50a7 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -98,10 +98,6 @@ rust_task : public kernel_owned, rust_cond // that location before waking us up. uintptr_t* rendezvous_ptr; - // This flag indicates that a worker is either currently running the task - // or is about to run this task. - int running_on; - memory_region local_region; boxed_region boxed;