X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao.h;h=20c2458cd87fc72766117784c25967120d3f409f;hb=ed6f67dc47d750d5ff8bea63ae7cbb560689b9b6;hp=853738b29171358967c0a80b931bcefa6d529b66;hpb=3d5a5fc4db5f681e848202c4ee4099d2879677d6;p=fw%2Faltos diff --git a/ao.h b/ao.h index 853738b2..20c2458c 100644 --- a/ao.h +++ b/ao.h @@ -29,7 +29,7 @@ /* Stack runs from above the allocated __data space to 0xfe, which avoids * writing to 0xff as that triggers the stack overflow indicator */ -#define AO_STACK_START 0x6f +#define AO_STACK_START 0x62 #define AO_STACK_END 0xfe #define AO_STACK_SIZE (AO_STACK_END - AO_STACK_START + 1) @@ -38,6 +38,7 @@ struct ao_task { __xdata void *wchan; /* current wait channel (NULL if running) */ uint8_t stack_count; /* amount of saved stack */ uint8_t task_id; /* index in the task array */ + __code char *name; /* task name */ uint8_t stack[AO_STACK_SIZE]; /* saved stack */ }; @@ -64,7 +65,11 @@ ao_yield(void) _naked; /* Add a task to the run queue */ void -ao_add_task(__xdata struct ao_task * task, void (*start)(void)); +ao_add_task(__xdata struct ao_task * task, void (*start)(void), __code char *name); + +/* Dump task info to console */ +void +ao_task_info(void); /* Start the scheduler. This will not return */ void