File: compiler.h

package info (click to toggle)
kernel-source-2.4.10 2.4.10-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 137,328 kB
  • ctags: 423,898
  • sloc: ansic: 2,403,930; asm: 140,471; makefile: 8,170; sh: 3,099; perl: 2,077; yacc: 1,177; cpp: 755; tcl: 577; lex: 343; awk: 251; lisp: 218; sed: 72
file content (16 lines) | stat: -rw-r--r-- 542 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef __LINUX_COMPILER_H
#define __LINUX_COMPILER_H

/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
   a mechanism by which the user can annotate likely branch directions and
   expect the blocks to be reordered appropriately.  Define __builtin_expect
   to nothing for earlier compilers.  */

#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
#define __builtin_expect(x, expected_value) (x)
#endif

#define likely(x)	__builtin_expect((x),1)
#define unlikely(x)	__builtin_expect((x),0)

#endif /* __LINUX_COMPILER_H */