1 /* Public domain. */ 2 3 #ifndef _LINUX_PREEMPT_H 4 #define _LINUX_PREEMPT_H 5 6 #define preempt_enable() 7 #define preempt_disable() 8 9 static inline bool 10 in_irq(void) 11 { 12 #if defined(__amd64__) || defined(__arm__) || defined(__arm64__) || \ 13 defined(__i386__) 14 return (curcpu()->ci_idepth > 0); 15 #else 16 return false; 17 #endif 18 } 19 20 #define in_interrupt() in_irq() 21 #define in_task() (!in_irq()) 22 23 #endif 24