8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66c421f commit 88b449aCopy full SHA for 88b449a
py/stackctrl.c
@@ -31,6 +31,8 @@
31
#include "py/stackctrl.h"
32
33
void mp_stack_ctrl_init(void) {
34
+ // Force routine to not be inlined. Better guarantee than MP_NOINLINE for -flto.
35
+ asm("");
36
volatile int stack_dummy;
37
MP_STATE_THREAD(stack_top) = (char*)&stack_dummy;
38
}
@@ -41,6 +43,8 @@ void mp_stack_set_top(void *top) {
41
43
42
44
mp_uint_t mp_stack_usage(void) {
45
// Assumes descending stack
46
47
48
49
return MP_STATE_THREAD(stack_top) - (char*)&stack_dummy;
50
0 commit comments