softirq.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:1k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  *  include/asm-s390/softirq.h
  3.  *
  4.  *  S390 version
  5.  *
  6.  *  Derived from "include/asm-i386/softirq.h"
  7.  */
  8. #ifndef __ASM_SOFTIRQ_H
  9. #define __ASM_SOFTIRQ_H
  10. #ifndef __LINUX_SMP_H
  11. #include <linux/smp.h>
  12. #endif
  13. #include <asm/atomic.h>
  14. #include <asm/hardirq.h>
  15. #include <asm/lowcore.h>
  16. #define __cpu_bh_enable(cpu) 
  17.                 do { barrier(); local_bh_count(cpu)--; } while (0)
  18. #define cpu_bh_disable(cpu) 
  19.                 do { local_bh_count(cpu)++; barrier(); } while (0)
  20. #define local_bh_disable()      cpu_bh_disable(smp_processor_id())
  21. #define __local_bh_enable()     __cpu_bh_enable(smp_processor_id())
  22. #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
  23. extern void do_call_softirq(void);
  24. #define local_bh_enable()                    
  25. do {                 
  26.         unsigned int *ptr = &local_bh_count(smp_processor_id());        
  27.         barrier();                                                      
  28.         if (!--*ptr)
  29. if (softirq_pending(smp_processor_id()))
  30. /* Use the async. stack for softirq */
  31. do_call_softirq();
  32. } while (0)
  33. #endif /* __ASM_SOFTIRQ_H */