sigismember(&sigs__, SIGALRM) ? false : true; \
})
- #if CONFIG_KERN_PREEMPT
+ #if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
#define DECLARE_ISR_CONTEXT_SWITCH(vect) \
void vect(UNUSED_ARG(int, arg)); \
INLINE void __isr_##vect(void); \
/* Initialize IRQ vector table in RAM */
sysirq_init();
-#if CONFIG_KERN_PREEMPT
+#if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
/*
* Voluntary context switch handler.
*
}
#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.
*/
#define DC_MOTOR_SET_STATUS_DIR(status, dir) \
(dir == POS_DIR ? DC_MOTOR_POS_DIR(status) : DC_MOTOR_NEG_DIR(status))
-#if CONFIG_KERN_PREEMPT
+#if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
#if CONFIG_DC_MOTOR_USE_SEM
#include <kern/sem.h>
void monitor_rename(Process *proc, const char *name);
#endif /* CONFIG_KERN_MONITOR */
-#if CONFIG_KERN_PREEMPT
+/*
+ * Quantum related macros are used in the
+ * timer module and must be empty when
+ * kernel is disabled.
+ */
+#if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
INLINE int preempt_quantum(void)
{
extern int _proc_quantum;
extern int _proc_quantum;
_proc_quantum = CONFIG_KERN_QUANTUM;
}
-#else /* !CONFIG_KERN_PREEMPT */
+#else /* !(CONFIG_KERN && CONFIG_KERN_PREEMPT) */
INLINE int preempt_quantum(void)
{
return 0;
INLINE void preempt_reset_quantum(void)
{
}
-#endif /* CONFIG_KERN_PREEMPT */
+#endif /* (CONFIG_KERN && CONFIG_KERN_PREEMPT) */
#endif /* KERN_PROC_P_H */