first cut at turnon scripts for EasyTimer v2
[fw/altos] / src / kernel / ao_task.h
index beb4da30e5ad7d799b3780017b805e692c34d656..27f47a5629de139565d203e34f3c63ccc21998e3 100644 (file)
@@ -38,7 +38,7 @@
 struct ao_task {
        void *wchan;                    /* current wait channel (NULL if running) */
        AO_TICK_TYPE alarm;             /* abort ao_sleep time */
-       uint16_t task_id;               /* unique id */
+       uint8_t task_id;                /* unique id */
        /* Saved stack pointer */
        union {
                uint32_t        *sp32;
@@ -48,10 +48,16 @@ struct ao_task {
        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;
+#ifdef AO_STACK_CANARY
+       uint32_t top_canary;
+#endif
 #if HAS_SAMPLE_PROFILE
        uint32_t ticks;
        uint32_t yields;