diff options
author | Bdale Garbee <bdale@gag.com> | 2015-02-22 14:55:40 -0700 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2015-02-22 14:55:40 -0700 |
commit | 4af4e36cda96d053458eeb040e35886890917385 (patch) | |
tree | 2b1b870b5b15af2fea0297b8cc9a5dff73d265df /src/kernel/ao_task.h | |
parent | 91b1a80650a7dcd7c5bf819618a8cea0fceb37d9 (diff) | |
parent | 106b16b4d5d024543d7ad8c4b4762151e253f3c4 (diff) |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/kernel/ao_task.h')
-rw-r--r-- | src/kernel/ao_task.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/kernel/ao_task.h b/src/kernel/ao_task.h index 9c56b480..c6bec0e3 100644 --- a/src/kernel/ao_task.h +++ b/src/kernel/ao_task.h @@ -68,10 +68,19 @@ extern __data uint8_t ao_task_minimize_latency; /* Reduce IRQ latency */ uint8_t ao_sleep(__xdata void *wchan); +/* Suspend the current task until wchan is awoken or the timeout + * expires. returns: + * 0 on normal wake + * 1 on alarm + */ +uint8_t +ao_sleep_for(__xdata void *wchan, uint16_t timeout); + /* Wake all tasks sleeping on wchan */ void ao_wakeup(__xdata void *wchan) __reentrant; +#if 0 /* set an alarm to go off in 'delay' ticks */ void ao_alarm(uint16_t delay); @@ -79,6 +88,7 @@ ao_alarm(uint16_t delay); /* Clear any pending alarm */ void ao_clear_alarm(void); +#endif /* Yield the processor to another task */ void |