softirq.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef __ASM_SOFTIRQ_H
  2. #define __ASM_SOFTIRQ_H
  3. #include <asm/atomic.h>
  4. #include <asm/hardirq.h>
  5. #define cpu_bh_disable(cpu) do { local_bh_count(cpu)++; barrier(); } while (0)
  6. #define cpu_bh_enable(cpu) do { barrier(); local_bh_count(cpu)--; } while (0)
  7. #define local_bh_disable() cpu_bh_disable(smp_processor_id())
  8. #define __local_bh_enable() local_bh_enable()
  9. #define local_bh_enable() cpu_bh_enable(smp_processor_id())
  10. #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
  11. #endif /* __ASM_SOFTIRQ_H */