altos: Make ao_wakeup reentrant
authorKeith Packard <keithp@keithp.com>
Tue, 27 Aug 2013 01:44:23 +0000 (18:44 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 27 Aug 2013 01:47:27 +0000 (18:47 -0700)
In case we end up invoking it from two places at once.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_task.c
src/core/ao_task.h

index 0aad650898d9c54dddca6d53e6fa2c799aec89d8..18315b1fddcd625a0cde0de9e6a48156b4d8be2d 100644 (file)
@@ -420,7 +420,7 @@ ao_sleep(__xdata void *wchan)
 }
 
 void
-ao_wakeup(__xdata void *wchan)
+ao_wakeup(__xdata void *wchan) __reentrant
 {
 #if HAS_TASK_QUEUE
        struct ao_task  *sleep, *next;
index e3a311ed1c187f2eb8defda23998375d3661ead6..9c56b48021d6dd4ebe83c69f44aa04c5ade023c3 100644 (file)
@@ -70,7 +70,7 @@ ao_sleep(__xdata void *wchan);
 
 /* Wake all tasks sleeping on wchan */
 void
-ao_wakeup(__xdata void *wchan);
+ao_wakeup(__xdata void *wchan) __reentrant;
 
 /* set an alarm to go off in 'delay' ticks */
 void