X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Firq.h;h=8e8abe20802dd85f1a93efe69bba000172bd765e;hb=a3ffb42b8a665abcbc54d8cfd290c368ab5f083c;hp=6eac70fdea50424752119224ac1165fc794f3a50;hpb=9792a2d2230d9e4e8bd3dec96e37e4107a6d8a37;p=bertos.git diff --git a/bertos/cpu/irq.h b/bertos/cpu/irq.h index 6eac70fd..8e8abe20 100644 --- a/bertos/cpu/irq.h +++ b/bertos/cpu/irq.h @@ -148,7 +148,7 @@ } #define IRQ_RUNNING() irq_running() - #if CONFIG_KERN_PREEMPT + #if (CONFIG_KERN && CONFIG_KERN_PREEMPT) #define DECLARE_ISR_CONTEXT_SWITCH(func) \ void func(void); \ @@ -288,7 +288,7 @@ #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); /** @@ -482,7 +482,7 @@ ); \ (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) \ @@ -527,6 +527,13 @@ #define ISR_PROTO_CONTEXT_SWITCH(vect) ISR(vect) #endif +#elif CPU_MSP430 + + /* Get the compiler defined macros */ + #include + #define IRQ_DISABLE dint() + #define IRQ_ENABLE eint() + #else #error No CPU_... defined. #endif @@ -556,7 +563,7 @@ #ifndef IRQ_PREEMPT_HANDLER - #if CONFIG_KERN_PREEMPT + #if (CONFIG_KERN && CONFIG_KERN_PREEMPT) /** * Handle preemptive context switch inside timer IRQ. */