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

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef __LINUX_COMPILER_H
  2. #define __LINUX_COMPILER_H
  3. /* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
  4.    a mechanism by which the user can annotate likely branch directions and
  5.    expect the blocks to be reordered appropriately.  Define __builtin_expect
  6.    to nothing for earlier compilers.  */
  7. #if __GNUC__ == 2 && __GNUC_MINOR__ < 96
  8. #define __builtin_expect(x, expected_value) (x)
  9. #endif
  10. #define likely(x) __builtin_expect((x),1)
  11. #define unlikely(x) __builtin_expect((x),0)
  12. #endif /* __LINUX_COMPILER_H */