diff options
author | Keith Packard <keithp@keithp.com> | 2012-10-23 22:17:49 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-10-25 00:07:14 -0700 |
commit | b119e19604aa557a40e848c60d98a67b5f259bbd (patch) | |
tree | 2391c2fb7db1843096ec4e3d288cb26f7cb88b92 /src/core/ao_task.h | |
parent | 7d34811ba035367bbf26a8510265754f3fbb5a95 (diff) |
altos: profiling on STM32L
Add sample-based profiling, using a 1kHz timer
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_task.h')
-rw-r--r-- | src/core/ao_task.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/ao_task.h b/src/core/ao_task.h index 18edd866..4319d632 100644 --- a/src/core/ao_task.h +++ b/src/core/ao_task.h @@ -26,13 +26,22 @@ struct ao_task { uint8_t task_id; /* unique id */ __code char *name; /* task name */ uint8_t stack[AO_STACK_SIZE]; /* saved stack */ +#if HAS_SAMPLE_PROFILE + uint32_t ticks; + uint32_t yields; + uint16_t start; + uint16_t max_run; +#endif }; -extern __xdata struct ao_task *__data ao_cur_task; - #define AO_NUM_TASKS 16 /* maximum number of tasks */ #define AO_NO_TASK 0 /* no task id */ +extern __xdata struct ao_task * __xdata ao_tasks[AO_NUM_TASKS]; +extern __data uint8_t ao_num_tasks; +extern __data uint8_t ao_cur_task_index; +extern __xdata struct ao_task *__data ao_cur_task; + /* ao_task.c */ |