diff options
author | Keith Packard <keithp@keithp.com> | 2016-03-26 15:54:24 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-03-26 16:07:20 -0700 |
commit | 4fa71ecf168e275b24534a5a20e3dd4e178c7bbd (patch) | |
tree | d3d042dbb8a3dff4d3133959db64dd6d90055c0d /src/kernel/ao_task.h | |
parent | 6a9546413d6a236c010e806b50506d870961d074 (diff) |
altos/stm: Validate current task SP in interrupt by looking at PSP
We use a separate stack pointer for task code, which means we can
verify that it is in range in any interrupt handler. This adds checks
for the task stack (under #ifdef DEBUG) that run in ao_wakeup as well
as at every timer interrupt.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_task.h')
-rw-r--r-- | src/kernel/ao_task.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/ao_task.h b/src/kernel/ao_task.h index c6bec0e3..0e353fe8 100644 --- a/src/kernel/ao_task.h +++ b/src/kernel/ao_task.h @@ -56,6 +56,10 @@ extern __data uint8_t ao_num_tasks; extern __xdata struct ao_task *__data ao_cur_task; extern __data uint8_t ao_task_minimize_latency; /* Reduce IRQ latency */ +#ifndef HAS_ARCH_VALIDATE_CUR_STACK +#define ao_validate_cur_stack() +#endif + /* ao_task.c */ |