repaint_stack

Function repaint_stack 

Source
pub fn repaint_stack()
Expand description

Paint the part of the stack that is currently not in use.

Note: this can take some time, and an ISR could possibly interrupt this process, dirtying up your freshly painted stack. If you wish to prevent this, run this inside a critical section using [cortex_m::interrupt::free].

Runs in O(n) where n is the size of the stack. This function is inefficient in the sense that it repaints the entire stack, even the parts that still have the STACK_PAINT_VALUE.