projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Add AO_STACK_CANARY to detect stack overflows sometimes
[fw/altos]
/
src
/
kernel
/
ao_task.h
diff --git
a/src/kernel/ao_task.h
b/src/kernel/ao_task.h
index 9197e25cef0f6f1c828d033404227206cd75a934..27f47a5629de139565d203e34f3c63ccc21998e3 100644
(file)
--- a/
src/kernel/ao_task.h
+++ b/
src/kernel/ao_task.h
@@
-48,10
+48,16
@@
struct ao_task {
struct ao_list queue;
struct ao_list alarm_queue;
/* Provide both 32-bit and 8-bit stacks */
struct ao_list queue;
struct ao_list alarm_queue;
/* Provide both 32-bit and 8-bit stacks */
+#ifdef AO_STACK_CANARY
+ uint32_t bottom_canary;
+#endif
union {
uint32_t stack32[AO_STACK_SIZE>>2];
uint8_t stack8[AO_STACK_SIZE];
} AO_STACK_ALIGNMENT;
union {
uint32_t stack32[AO_STACK_SIZE>>2];
uint8_t stack8[AO_STACK_SIZE];
} AO_STACK_ALIGNMENT;
+#ifdef AO_STACK_CANARY
+ uint32_t top_canary;
+#endif
#if HAS_SAMPLE_PROFILE
uint32_t ticks;
uint32_t yields;
#if HAS_SAMPLE_PROFILE
uint32_t ticks;
uint32_t yields;