Commit | Line | Data |
---|---|---|
17bb07b4 PMF |
1 | /* |
2 | * compiler.h | |
3 | * | |
4 | * Copyright (C) 2009 - Pierre-Marc Fournier (pierre-marc dot fournier at polymtl dot ca) | |
5 | * | |
6 | * This library is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU Lesser General Public | |
8 | * License as published by the Free Software Foundation; either | |
9 | * version 2.1 of the License, or (at your option) any later version. | |
10 | * | |
11 | * This library is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | * Lesser General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU Lesser General Public | |
17 | * License along with this library; if not, write to the Free Software | |
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
19 | */ | |
20 | ||
21 | #ifndef KCOMPAT_COMPILER_H | |
22 | #define KCOMPAT_COMPILER_H | |
23 | ||
24 | # define inline inline __attribute__((always_inline)) | |
25 | # define __inline__ __inline__ __attribute__((always_inline)) | |
26 | # define __inline __inline __attribute__((always_inline)) | |
27 | ||
28 | #ifndef __always_inline | |
29 | #define __always_inline inline | |
30 | #endif | |
31 | ||
32 | #define __pure __attribute__((pure)) | |
33 | #define __aligned(x) __attribute__((aligned(x))) | |
34 | #define __printf(a,b) __attribute__((format(printf,a,b))) | |
35 | #define noinline __attribute__((noinline)) | |
36 | #define __attribute_const__ __attribute__((__const__)) | |
22d72948 | 37 | #define __used __attribute__((used)) |
17bb07b4 PMF |
38 | #define __maybe_unused __attribute__((unused)) |
39 | ||
40 | #define notrace __attribute__((no_instrument_function)) | |
41 | ||
42 | #endif /* KCOMPAT_COMPILER_H */ |