summaryrefslogtreecommitdiff
path: root/ao.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-04-18 23:16:01 -0700
committerKeith Packard <keithp@keithp.com>2009-04-18 23:16:01 -0700
commited6f67dc47d750d5ff8bea63ae7cbb560689b9b6 (patch)
tree124f29a6d86e47ff9b16f2608b225270651f5903 /ao.h
parent3d5a5fc4db5f681e848202c4ee4099d2879677d6 (diff)
Add task names and 'T' command to show task status.
The T command shows the current wchan and PC for each task in the system.
Diffstat (limited to 'ao.h')
-rw-r--r--ao.h9
1 files changed, 7 insertions, 2 deletions
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