From 08f783ff10cd561fbe31d5744fd42713d4b3764f Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 21 Mar 2012 14:13:31 -0700 Subject: [PATCH] rt: Add a task field to stk_seg and populate it --- src/rt/rust_stack.h | 1 + src/rt/rust_task.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/rt/rust_stack.h b/src/rt/rust_stack.h index bea86cf1ec8f..ecd591cbe365 100644 --- a/src/rt/rust_stack.h +++ b/src/rt/rust_stack.h @@ -12,6 +12,7 @@ struct stk_seg { uint32_t pad; #endif + rust_task *task; uintptr_t canary; uint8_t data[]; diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 98c3c9e456fa..317638b93c99 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -508,6 +508,7 @@ rust_task::new_stack(size_t requested_sz) { size_t sz = rust_stk_sz + RED_ZONE_SIZE; stk_seg *new_stk = create_stack(&local_region, sz); LOGPTR(thread, "new stk", (uintptr_t)new_stk); + new_stk->task = this; new_stk->next = NULL; new_stk->prev = stk; if (stk) {