summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-04-25 13:13:24 -0700
committerKeith Packard <keithp@keithp.com>2009-04-25 13:13:24 -0700
commit4a050704ad2c497e9f1b0988334228b0bbc4c170 (patch)
tree952935658f07f7fec9d2572c98712d2a2c6628f2
parent6b3d25a6d6d7847765eb03b836913dd5ecef2993 (diff)
Make some functions reentrant to save DSEG space
-rw-r--r--ao.h6
-rw-r--r--ao_beep.c2
-rw-r--r--ao_led.c2
-rw-r--r--ao_task.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/ao.h b/ao.h
index cbb6b26f..2cad7621 100644
--- a/ao.h
+++ b/ao.h
@@ -65,7 +65,7 @@ ao_yield(void) _naked;
/* Add a task to the run queue */
void
-ao_add_task(__xdata struct ao_task * task, void (*start)(void), __code char *name);
+ao_add_task(__xdata struct ao_task * task, void (*start)(void), __code char *name) __reentrant;
/* Dump task info to console */
void
@@ -215,7 +215,7 @@ ao_beep(uint8_t beep);
/* Turn on the beeper for the specified time */
void
-ao_beep_for(uint8_t beep, uint16_t ticks);
+ao_beep_for(uint8_t beep, uint16_t ticks) __reentrant;
/* Initialize the beeper */
void
@@ -243,7 +243,7 @@ ao_led_set(uint8_t colors);
/* Turn on the specified LEDs for the indicated interval */
void
-ao_led_for(uint8_t colors, uint16_t ticks);
+ao_led_for(uint8_t colors, uint16_t ticks) __reentrant;
/* Initialize the LEDs */
void
diff --git a/ao_beep.c b/ao_beep.c
index 93c2e890..3642f4c6 100644
--- a/ao_beep.c
+++ b/ao_beep.c
@@ -32,7 +32,7 @@ ao_beep(uint8_t beep)
}
void
-ao_beep_for(uint8_t beep, uint16_t ticks)
+ao_beep_for(uint8_t beep, uint16_t ticks) __reentrant
{
ao_beep(beep);
ao_delay(ticks);
diff --git a/ao_led.c b/ao_led.c
index f2bc179a..1268ff69 100644
--- a/ao_led.c
+++ b/ao_led.c
@@ -36,7 +36,7 @@ ao_led_set(uint8_t colors)
}
void
-ao_led_for(uint8_t colors, uint16_t ticks)
+ao_led_for(uint8_t colors, uint16_t ticks) __reentrant
{
ao_led_on(colors);
ao_delay(ticks);
diff --git a/ao_task.c b/ao_task.c
index 47db1277..81a71dda 100644
--- a/ao_task.c
+++ b/ao_task.c
@@ -25,7 +25,7 @@ __data uint8_t ao_cur_task_index;
__xdata struct ao_task *__data ao_cur_task;
void
-ao_add_task(__xdata struct ao_task * task, void (*start)(void), __code char *name)
+ao_add_task(__xdata struct ao_task * task, void (*start)(void), __code char *name) __reentrant
{
uint8_t __xdata *stack;
if (ao_num_tasks == AO_NUM_TASKS)