rusEFI
The most advanced open source ECU
|
Functions | |
int | getRemainingStack (thread_t *otp) |
int | CountFreeStackSpace (const void *wabase) |
int CountFreeStackSpace | ( | const void * | wabase | ) |
Definition at line 171 of file eficonsole.cpp.
Referenced by cmd_threads().
int getRemainingStack | ( | thread_t * | otp | ) |
Of note is that interrupts are NOT serviced on the stack of the thread that was running when the interrupt occurred. The only thing that happens on that thread's stack is that its registers are pushed (by hardware) when an interrupt occurs, just before swapping the stack pointer out for the main stack (currently 0x400=1024 bytes), where the ISR actually runs. see also main_stack_size see also process_stack_size
see also http://www.chibios.org/dokuwiki/doku.php?id=chibios:kb:stacks
In the firmware we are using 'extern *Engine' - in the firmware Engine is a singleton
On the other hand, in order to have a meaningful unit test we are passing Engine * engine as a parameter
Definition at line 164 of file at32_common.cpp.