summaryrefslogtreecommitdiff
path: root/supervisor/shared/stack.h
diff options
context:
space:
mode:
authorHendra Kusumah <h.kusumah87@gmail.com>2019-01-09 01:46:55 +0700
committerGitHub <noreply@github.com>2019-01-09 01:46:55 +0700
commit025852c80548dacd60a73aa94eaa74dd8e09ea68 (patch)
treea3c25f77d019270d4475ce509d7fbd2bba611a83 /supervisor/shared/stack.h
parent57c2c4134c52405b78e8d9cd8ed0ed05fefc2827 (diff)
parent172311fad896fdb0780bdd6597b0b6d4d8bdadd3 (diff)
Merge pull request #1 from adafruit/master
update from original
Diffstat (limited to 'supervisor/shared/stack.h')
-rwxr-xr-xsupervisor/shared/stack.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/supervisor/shared/stack.h b/supervisor/shared/stack.h
index 3a5c18e7d..1fb43be57 100755
--- a/supervisor/shared/stack.h
+++ b/supervisor/shared/stack.h
@@ -37,5 +37,12 @@ void stack_init(void);
void stack_resize(void);
void set_next_stack_size(uint32_t size);
uint32_t get_current_stack_size(void);
+bool stack_ok(void);
+
+// Use this after any calls into a library which may use a lot of stack. This will raise a Python
+// exception when the stack has likely overwritten a portion of the heap.
+void assert_heap_ok(void);
+
+#define STACK_CANARY_VALUE 0x017829ef
#endif // MICROPY_INCLUDED_SUPERVISOR_STACK_H