Explicit dependancy between CONFIG_KERN_PREEMPT and CONFIG_KERN.
[bertos.git] / bertos / cpu / irq.h
index 6eac70fdea50424752119224ac1165fc794f3a50..153f7861d2ba2d896fa02680c12461562ff853dc 100644 (file)
        }
        #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)                                       \
 
 
 #ifndef IRQ_PREEMPT_HANDLER
-       #if CONFIG_KERN_PREEMPT
+       #if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
                /**
                 * Handle preemptive context switch inside timer IRQ.
                 */