~ubuntu-branches/ubuntu/lucid/skyeye/lucid-proposed

« back to all changes in this revision

Viewing changes to arch/ppc/common/compiler_extensions.h

  • Committer: Bazaar Package Importer
  • Author(s): Yu Guanghui
  • Date: 2007-02-09 20:24:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070209202429-jknfb98t9ggaoz02
Tags: 1.2.1-2
Disable DBCT again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * ---------------------------------------------------
 
3
 * Use compiler builtins for better compilation
 
4
 * results. Taken from the linux kernel source
 
5
 * ---------------------------------------------------
 
6
 */
 
7
#ifndef COMPILER_EXTENSIONS_H
 
8
#define COMPILER_EXTENSIONS_H
 
9
 
 
10
#if __GNUC__ > 2
 
11
#define likely(x)       __builtin_expect(!!(x), 1)
 
12
#define unlikely(x)     __builtin_expect(!!(x), 0)
 
13
#else
 
14
#define likely(x)       x 
 
15
#define unlikely(x)     x 
 
16
#endif
 
17
#ifdef __GNUC__
 
18
#define UNUSED __attribute__((unused))
 
19
#else
 
20
#define UNUSED
 
21
#endif
 
22
 
 
23
#endif