}
#define IRQ_RUNNING() irq_running()
- #if CONFIG_KERN_PREEMPT
+ #if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
#define DECLARE_ISR_CONTEXT_SWITCH(func) \
void func(void); \
#define IRQ_ENABLED() ((CPU_READ_FLAGS() & 0xc0) != 0xc0)
- #if CONFIG_KERN_PREEMPT
+ #if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
EXTERN_C void asm_irq_switch_context(void);
/**
); \
(bool)(sreg & 0x80); \
})
- #if CONFIG_KERN_PREEMPT
+ #if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
#define DECLARE_ISR_CONTEXT_SWITCH(vect) \
INLINE void __isr_##vect(void); \
ISR(vect) \
#define ISR_PROTO_CONTEXT_SWITCH(vect) ISR(vect)
#endif
+#elif CPU_MSP430
+
+ /* Get the compiler defined macros */
+ #include <signal.h>
+ #define IRQ_DISABLE dint()
+ #define IRQ_ENABLE eint()
+
#else
#error No CPU_... defined.
#endif
#ifndef IRQ_PREEMPT_HANDLER
- #if CONFIG_KERN_PREEMPT
+ #if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
/**
* Handle preemptive context switch inside timer IRQ.
*/