Modify task::join to indicate how the task terminated

This involves sticking yet another field into the task structure
This commit is contained in:
Brian Anderson
2011-07-14 19:39:53 -07:00
parent d9cc4cb81b
commit ced8393f20
6 changed files with 43 additions and 6 deletions

View File

@@ -82,7 +82,8 @@ rust_task::rust_task(rust_scheduler *sched, rust_task_list *state,
running_on(-1),
pinned_on(-1),
local_region(&sched->srv->local_region),
_on_wakeup(NULL)
_on_wakeup(NULL),
failed(false)
{
LOGPTR(sched, "new task", (uintptr_t)this);
DLOG(sched, task, "sizeof(task) = %d (0x%x)", sizeof *this, sizeof *this);
@@ -230,6 +231,7 @@ rust_task::fail() {
// FIXME: implement unwinding again.
if (this == sched->root_task)
sched->fail();
failed = true;
}
void