diff options
| author | Keith Packard <keithp@keithp.com> | 2016-06-29 12:54:31 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2016-06-29 19:17:45 -0700 | 
| commit | a35424cd48205af89ba023db979959dc75b06706 (patch) | |
| tree | b7bb5712ff5d166c0fe372568af74cb612da6877 /src/kernel/ao_task.c | |
| parent | 6c022e094f6f3c551355742a6f9c3deb6e554fe1 (diff) | |
altos: Make task list output more useful
Add the timeout value and task id
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_task.c')
| -rw-r--r-- | src/kernel/ao_task.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/src/kernel/ao_task.c b/src/kernel/ao_task.c index 0a790ccd..cf0b58ed 100644 --- a/src/kernel/ao_task.c +++ b/src/kernel/ao_task.c @@ -537,12 +537,15 @@ ao_task_info(void)  {  	uint8_t		i;  	__xdata struct ao_task *task; +	uint16_t	now = ao_time();  	for (i = 0; i < ao_num_tasks; i++) {  		task = ao_tasks[i]; -		printf("%12s: wchan %04x\n", -		       task->name, -		       (int) task->wchan); +		printf("%2d: wchan %08x alarm %5d %s\n", +		       task->task_id, +		       (int) task->wchan, +		       task->alarm ? (int16_t) (task->alarm - now) : 9999, +		       task->name);  	}  #if HAS_TASK_QUEUE && DEBUG  	ao_task_validate(); | 
