From 12fa90888e56c81088e30edd26d1bc404b3e334d Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 3 Feb 2012 17:26:54 -0800 Subject: rt: Clean up the way the kernel tracks tasks --- src/rt/rust_task.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rt/rust_task.cpp') diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 150ef1a18c1..1563fe63516 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -275,12 +275,11 @@ rust_task::~rust_task() DLOG(thread, task, "~rust_task %s @0x%" PRIxPTR ", refcnt=%d", name, (uintptr_t)this, ref_count); + // FIXME: We should do this when the task exits, not in the destructor if (supervisor) { supervisor->deref(); } - kernel->release_task_id(user.id); - /* FIXME: tighten this up, there are some more assertions that hold at task-lifecycle events. */ I(thread, ref_count == 0); // || @@ -288,6 +287,7 @@ rust_task::~rust_task() // Delete all the stacks. There may be more than one if the task failed // and no landing pads stopped to clean up. + // FIXME: We should do this when the task exits, not in the destructor while (stk != NULL) { del_stk(this, stk); } -- cgit 1.4.1-3-g733a5