Skip to content

Commit 3622215

Browse files
committed
---
yaml --- r: 14572 b: refs/heads/try c: 5df44bd h: refs/heads/master v: v3
1 parent d03aada commit 3622215

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 3cec2d695431d6b5a3b8756f851935c2f8120f04
5+
refs/heads/try: 5df44bd06669bef20959572a7c6a5b18759bec44
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rt/rust_kernel.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ rust_kernel::rust_kernel(rust_srv *srv) :
1717
_region(srv, true),
1818
_log(srv, NULL),
1919
srv(srv),
20-
live_tasks(0),
2120
max_task_id(0),
2221
rval(0),
2322
max_sched_id(0),
@@ -173,7 +172,7 @@ rust_kernel::register_task(rust_task *task) {
173172
scoped_lock with(task_lock);
174173
task->id = max_task_id++;
175174
task_table.put(task->id, task);
176-
new_live_tasks = ++live_tasks;
175+
new_live_tasks = task_table.count();
177176
}
178177
K(srv, task->id != INTPTR_MAX, "Hit the maximum task id");
179178
KLOG_("Registered task %" PRIdPTR, task->id);
@@ -187,7 +186,7 @@ rust_kernel::release_task_id(rust_task_id id) {
187186
{
188187
scoped_lock with(task_lock);
189188
task_table.remove(id);
190-
new_live_tasks = --live_tasks;
189+
new_live_tasks = task_table.count();
191190
}
192191
KLOG_("Total outstanding tasks: %d", new_live_tasks);
193192
}

branches/try/src/rt/rust_kernel.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@ class rust_kernel {
2424
public:
2525
rust_srv *srv;
2626
private:
27-
// Protects live_tasks, max_task_id and task_table
27+
// Protects max_task_id and task_table
2828
lock_and_signal task_lock;
29-
// Tracks the number of tasks that are being managed by
30-
// schedulers. When this hits 0 we will tell all schedulers
31-
// to exit.
32-
uintptr_t live_tasks;
3329
// The next task id
3430
rust_task_id max_task_id;
3531
hash_map<rust_task_id, rust_task *> task_table;

0 commit comments

Comments
 (0)