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

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef _ALPHA_SOFTIRQ_H
  2. #define _ALPHA_SOFTIRQ_H
  3. #include <linux/stddef.h>
  4. #include <asm/atomic.h>
  5. #include <asm/hardirq.h>
  6. extern inline void cpu_bh_disable(int cpu)
  7. {
  8. local_bh_count(cpu)++;
  9. barrier();
  10. }
  11. extern inline void __cpu_bh_enable(int cpu)
  12. {
  13. barrier();
  14. local_bh_count(cpu)--;
  15. }
  16. #define __local_bh_enable() __cpu_bh_enable(smp_processor_id())
  17. #define local_bh_disable() cpu_bh_disable(smp_processor_id())
  18. #define local_bh_enable()
  19. do {
  20. int cpu;
  21. barrier();
  22. cpu = smp_processor_id();
  23. if (!--local_bh_count(cpu) && softirq_pending(cpu))
  24. do_softirq();
  25. } while (0)
  26. #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
  27. #endif /* _ALPHA_SOFTIRQ_H */