rt: Remove rust_kernel::live_tasks. Unused

This commit is contained in:
Brian Anderson 2012-03-01 14:53:10 -08:00
parent 3cec2d6954
commit 5df44bd066
2 changed files with 3 additions and 8 deletions

View File

@ -17,7 +17,6 @@ rust_kernel::rust_kernel(rust_srv *srv) :
_region(srv, true),
_log(srv, NULL),
srv(srv),
live_tasks(0),
max_task_id(0),
rval(0),
max_sched_id(0),
@ -173,7 +172,7 @@ rust_kernel::register_task(rust_task *task) {
scoped_lock with(task_lock);
task->id = max_task_id++;
task_table.put(task->id, task);
new_live_tasks = ++live_tasks;
new_live_tasks = task_table.count();
}
K(srv, task->id != INTPTR_MAX, "Hit the maximum task id");
KLOG_("Registered task %" PRIdPTR, task->id);
@ -187,7 +186,7 @@ rust_kernel::release_task_id(rust_task_id id) {
{
scoped_lock with(task_lock);
task_table.remove(id);
new_live_tasks = --live_tasks;
new_live_tasks = task_table.count();
}
KLOG_("Total outstanding tasks: %d", new_live_tasks);
}

View File

@ -24,12 +24,8 @@ class rust_kernel {
public:
rust_srv *srv;
private:
// Protects live_tasks, max_task_id and task_table
// Protects max_task_id and task_table
lock_and_signal task_lock;
// Tracks the number of tasks that are being managed by
// schedulers. When this hits 0 we will tell all schedulers
// to exit.
uintptr_t live_tasks;
// The next task id
rust_task_id max_task_id;
hash_map<rust_task_id, rust_task *> task_table;