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 local_bh_disable()                      
  6. do {                                            
  7.         local_bh_count(smp_processor_id())++;   
  8.         barrier();                              
  9. } while (0)
  10. #define __local_bh_enable()                     
  11. do {                                            
  12.         barrier();                              
  13.         local_bh_count(smp_processor_id())--;   
  14. } while (0)
  15. #define local_bh_enable()                               
  16. do {                                                    
  17.         if (!--local_bh_count(smp_processor_id())       
  18.             && softirq_pending(smp_processor_id())) {   
  19.                 do_softirq();                           
  20.                 __sti();                                
  21.         }                                               
  22. } while (0)
  23. #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
  24. #endif /* __ASM_SOFTIRQ_H */