altos/stm: Don't define task macros when not tasking
authorKeith Packard <keithp@keithp.com>
Tue, 23 Apr 2013 01:29:56 +0000 (20:29 -0500)
committerKeith Packard <keithp@keithp.com>
Tue, 23 Apr 2013 01:29:56 +0000 (20:29 -0500)
The necessary data structures aren't defined in this case.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/ao_arch_funcs.h

index a45b6ab3fab7cde4b0fadd3b150baa75b0c39460..e152440adf82b9c7386c431bbd1396a77a1543b2 100644 (file)
@@ -267,6 +267,7 @@ ao_arch_memory_barrier() {
        asm volatile("" ::: "memory");
 }
 
+#if HAS_TASK
 static inline void
 ao_arch_init_stack(struct ao_task *task, void *start)
 {
@@ -333,6 +334,7 @@ static inline void ao_arch_restore_stack(void) {
        /* Return to calling function */
        asm("bx lr");
 }
+#endif
 
 #define ao_arch_isr_stack()