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

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef __ASM_SOFTIRQ_H
  2. #define __ASM_SOFTIRQ_H
  3. /*
  4.  * This program is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU General Public License
  6.  * as published by the Free Software Foundation; either version
  7.  * 2 of the License, or (at your option) any later version.
  8.  */
  9. #include <asm/hardirq.h>
  10. #define local_bh_disable() do { local_bh_count(smp_processor_id())++; barrier(); } while (0)
  11. #define __local_bh_enable() do { barrier(); local_bh_count(smp_processor_id())--; } while (0)
  12. #define local_bh_enable()  
  13. do {                                                    
  14. barrier();
  15.         if (!--local_bh_count(smp_processor_id())       
  16.             && softirq_pending(smp_processor_id())) {   
  17.                 do_softirq();                           
  18.         }                                               
  19. } while (0)
  20. #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
  21. #endif /* __ASM_SOFTIRQ_H */