rt: Add a task field to stk_seg and populate it
This commit is contained in:
@@ -12,6 +12,7 @@ struct stk_seg {
|
|||||||
uint32_t pad;
|
uint32_t pad;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
rust_task *task;
|
||||||
uintptr_t canary;
|
uintptr_t canary;
|
||||||
|
|
||||||
uint8_t data[];
|
uint8_t data[];
|
||||||
|
|||||||
@@ -508,6 +508,7 @@ rust_task::new_stack(size_t requested_sz) {
|
|||||||
size_t sz = rust_stk_sz + RED_ZONE_SIZE;
|
size_t sz = rust_stk_sz + RED_ZONE_SIZE;
|
||||||
stk_seg *new_stk = create_stack(&local_region, sz);
|
stk_seg *new_stk = create_stack(&local_region, sz);
|
||||||
LOGPTR(thread, "new stk", (uintptr_t)new_stk);
|
LOGPTR(thread, "new stk", (uintptr_t)new_stk);
|
||||||
|
new_stk->task = this;
|
||||||
new_stk->next = NULL;
|
new_stk->next = NULL;
|
||||||
new_stk->prev = stk;
|
new_stk->prev = stk;
|
||||||
if (stk) {
|
if (stk) {
|
||||||
|
|||||||
Reference in New Issue
Block a user