wip
This commit is contained in:
@@ -404,6 +404,9 @@ rust_task::yield(size_t time_in_us, bool *killed) {
|
||||
*killed = true;
|
||||
}
|
||||
|
||||
// We're not going to need any extra stack for a while
|
||||
clear_stack_cache();
|
||||
|
||||
yield_timer.reset_us(time_in_us);
|
||||
|
||||
// Return to the scheduler.
|
||||
@@ -746,6 +749,15 @@ rust_task::del_stack() {
|
||||
record_stack_limit();
|
||||
}
|
||||
|
||||
void
|
||||
rust_task::clear_stack_cache() {
|
||||
A(sched, stk != NULL, "Expected to have a stack");
|
||||
if (stk->prev != NULL) {
|
||||
free_stk(this, stk->prev);
|
||||
stk->prev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
rust_task::record_stack_limit() {
|
||||
// The function prolog compares the amount of stack needed to the end of
|
||||
|
||||
Reference in New Issue
Block a user