rt: Remove rust_kernel::live_tasks. Unused
This commit is contained in:
parent
3cec2d6954
commit
5df44bd066
|
@ -17,7 +17,6 @@ rust_kernel::rust_kernel(rust_srv *srv) :
|
||||||
_region(srv, true),
|
_region(srv, true),
|
||||||
_log(srv, NULL),
|
_log(srv, NULL),
|
||||||
srv(srv),
|
srv(srv),
|
||||||
live_tasks(0),
|
|
||||||
max_task_id(0),
|
max_task_id(0),
|
||||||
rval(0),
|
rval(0),
|
||||||
max_sched_id(0),
|
max_sched_id(0),
|
||||||
|
@ -173,7 +172,7 @@ rust_kernel::register_task(rust_task *task) {
|
||||||
scoped_lock with(task_lock);
|
scoped_lock with(task_lock);
|
||||||
task->id = max_task_id++;
|
task->id = max_task_id++;
|
||||||
task_table.put(task->id, task);
|
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");
|
K(srv, task->id != INTPTR_MAX, "Hit the maximum task id");
|
||||||
KLOG_("Registered task %" PRIdPTR, 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);
|
scoped_lock with(task_lock);
|
||||||
task_table.remove(id);
|
task_table.remove(id);
|
||||||
new_live_tasks = --live_tasks;
|
new_live_tasks = task_table.count();
|
||||||
}
|
}
|
||||||
KLOG_("Total outstanding tasks: %d", new_live_tasks);
|
KLOG_("Total outstanding tasks: %d", new_live_tasks);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,12 +24,8 @@ class rust_kernel {
|
||||||
public:
|
public:
|
||||||
rust_srv *srv;
|
rust_srv *srv;
|
||||||
private:
|
private:
|
||||||
// Protects live_tasks, max_task_id and task_table
|
// Protects max_task_id and task_table
|
||||||
lock_and_signal task_lock;
|
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
|
// The next task id
|
||||||
rust_task_id max_task_id;
|
rust_task_id max_task_id;
|
||||||
hash_map<rust_task_id, rust_task *> task_table;
|
hash_map<rust_task_id, rust_task *> task_table;
|
||||||
|
|
Loading…
Reference in New Issue