And fix up the related messages.
Signed-off-by: Keith Packard <keithp@keithp.com>
int8_t
ao_add_stdio(int (*_pollchar)(void),
void (*putchar)(char),
int8_t
ao_add_stdio(int (*_pollchar)(void),
void (*putchar)(char),
{
if (ao_num_stdios == AO_NUM_STDIOS)
ao_panic(AO_PANIC_STDIO);
ao_stdios[ao_num_stdios]._pollchar = _pollchar;
ao_stdios[ao_num_stdios].putchar = putchar;
{
if (ao_num_stdios == AO_NUM_STDIOS)
ao_panic(AO_PANIC_STDIO);
ao_stdios[ao_num_stdios]._pollchar = _pollchar;
ao_stdios[ao_num_stdios].putchar = putchar;
- ao_stdios[ao_num_stdios].flush = flush;
+ ao_stdios[ao_num_stdios].flush = _flush;
ao_stdios[ao_num_stdios].echo = 1;
#if AO_NUM_STDIOS > 1
return ao_num_stdios++;
ao_stdios[ao_num_stdios].echo = 1;
#if AO_NUM_STDIOS > 1
return ao_num_stdios++;
static struct ao_list run_queue;
static struct ao_list alarm_queue;
static struct ao_list run_queue;
static struct ao_list alarm_queue;
-static struct ao_list sleep_queue[SLEEP_HASH_SIZE];
+static struct ao_list ao_sleep_queue[SLEEP_HASH_SIZE];
static void
ao_task_to_run_queue(struct ao_task *task)
static void
ao_task_to_run_queue(struct ao_task *task)
static struct ao_list *
ao_task_sleep_queue(void *wchan)
{
static struct ao_list *
ao_task_sleep_queue(void *wchan)
{
- return &sleep_queue[(uintptr_t) wchan % SLEEP_HASH_SIZE];
+ return &ao_sleep_queue[(uintptr_t) wchan % SLEEP_HASH_SIZE];
ao_list_init(&alarm_queue);
ao_task_alarm_tick = 0;
for (i = 0; i < SLEEP_HASH_SIZE; i++)
ao_list_init(&alarm_queue);
ao_task_alarm_tick = 0;
for (i = 0; i < SLEEP_HASH_SIZE; i++)
- ao_list_init(&sleep_queue[i]);
+ ao_list_init(&ao_sleep_queue[i]);
#endif /* HAS_TASK_QUEUE */
void
#endif /* HAS_TASK_QUEUE */
void
-ao_add_task(struct ao_task * task, void (*start)(void), const char *name)
+ao_add_task(struct ao_task * task, void (*task_func)(void), const char *name)
{
uint8_t task_id;
uint8_t t;
{
uint8_t task_id;
uint8_t t;
* Construct a stack frame so that it will 'return'
* to the start of the task
*/
* Construct a stack frame so that it will 'return'
* to the start of the task
*/
- ao_arch_init_stack(task, start);
+ ao_arch_init_stack(task, task_func);
ao_arch_critical(
#if HAS_TASK_QUEUE
ao_task_init_queue(task);
ao_arch_critical(
#if HAS_TASK_QUEUE
ao_task_init_queue(task);
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wmissing-declarations \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wmissing-declarations \
+ -Wnested-externs \
+ -Wshadow
AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
-DNEWLIB_INTEGER_PRINTF_SCANF \
AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
-DNEWLIB_INTEGER_PRINTF_SCANF \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wmissing-declarations \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wmissing-declarations \
+ -Wnested-externs \
+ -Wshadow
AO_CFLAGS=-I. -I../stm -I../kernel -I../drivers -I../math -I../draw \
-DNEWLIB_INTEGER_PRINTF_SCANF \
AO_CFLAGS=-I. -I../stm -I../kernel -I../drivers -I../math -I../draw \
-DNEWLIB_INTEGER_PRINTF_SCANF \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wmissing-declarations \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wmissing-declarations \
+ -Wnested-externs \
+ -Wshadow
AO_CFLAGS=-I. -I$(TOPDIR)/stmf0 -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
-DNEWLIB_INTEGER_PRINTF_SCANF \
AO_CFLAGS=-I. -I$(TOPDIR)/stmf0 -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
-DNEWLIB_INTEGER_PRINTF_SCANF \