diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:18:59 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:18:59 -0800 |
| commit | dfc52b82fee5bc6713ecce3f81767a8565c4f874 (patch) | |
| tree | d48688e5ffd92742e5556791c1c8f086317203d5 /include/linux/compiler.h | |
| parent | a880f45a48be2956d2c78a839c472287d54435c1 (diff) | |
v2.4.9.11 -> v2.4.9.12
- Alan Cox: much more merging
- Pete Zaitcev: ymfpci race fixes
- Andrea Arkangeli: VM race fix and OOM tweak.
- Arjan Van de Ven: merge RH kernel fixes
- Andi Kleen: use more readable 'likely()/unlikely()' instead of __builtin_expect()
- Keith Owens: fix 64-bit ELF types
- Gerd Knorr: mark more broken PCI bridges, update btaudio driver
- Paul Mackerras: powermac driver update
- me: clean up PTRACE_DETACH to use common infrastructure
Diffstat (limited to 'include/linux/compiler.h')
| -rw-r--r-- | include/linux/compiler.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h new file mode 100644 index 000000000000..05205c74bc4c --- /dev/null +++ b/include/linux/compiler.h @@ -0,0 +1,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 */ |
