Subversion Repositories Kolibri OS

Rev

Rev 3243 | Rev 4065 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3243 Rev 3480
Line 2... Line 2...
2
#error "Please don't include  directly, include  instead."
2
#error "Please don't include  directly, include  instead."
3
#endif
3
#endif
Line 4... Line 4...
4
 
4
 
5
/* GCC 4.1.[01] miscompiles __weak */
5
/* GCC 4.1.[01] miscompiles __weak */
6
#ifdef __KERNEL__
6
#ifdef __KERNEL__
7
# if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1
7
# if GCC_VERSION >= 40100 &&  GCC_VERSION <= 40101
8
#  error Your version of gcc miscompiles the __weak directive
8
#  error Your version of gcc miscompiles the __weak directive
9
# endif
9
# endif
Line 10... Line 10...
10
#endif
10
#endif
11
 
11
 
12
#define __used			__attribute__((__used__))
12
#define __used			__attribute__((__used__))
Line -... Line 13...
-
 
13
#define __must_check 		__attribute__((warn_unused_result))
-
 
14
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
-
 
15
 
-
 
16
#if GCC_VERSION >= 40100
13
#define __must_check 		__attribute__((warn_unused_result))
17
# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
14
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
18
#endif
15
 
19
 
16
#if __GNUC_MINOR__ >= 3
20
#if GCC_VERSION >= 40300
17
/* Mark functions as cold. gcc will assume any path leading to a call
21
/* Mark functions as cold. gcc will assume any path leading to a call
18
   to them will be unlikely.  This means a lot of manual unlikely()s
22
   to them will be unlikely.  This means a lot of manual unlikely()s
Line 27... Line 31...
27
   gcc also has a __attribute__((__hot__)) to move hot functions into
31
   gcc also has a __attribute__((__hot__)) to move hot functions into
28
   a special section, but I don't see any sense in this right now in
32
   a special section, but I don't see any sense in this right now in
29
   the kernel context */
33
   the kernel context */
30
#define __cold			__attribute__((__cold__))
34
#define __cold			__attribute__((__cold__))
Line 31... Line 35...
31
 
35
 
Line -... Line 36...
-
 
36
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
-
 
37
 
-
 
38
#ifndef __CHECKER__
-
 
39
# define __compiletime_warning(message) __attribute__((warning(message)))
-
 
40
# define __compiletime_error(message) __attribute__((error(message)))
-
 
41
#endif /* __CHECKER__ */
32
#define __linktime_error(message) __attribute__((__error__(message)))
42
#endif /* GCC_VERSION >= 40300 */
33
 
43
 
34
#if __GNUC_MINOR__ >= 5
44
#if GCC_VERSION >= 40500
35
/*
45
/*
36
 * Mark a position in code as unreachable.  This can be used to
46
 * Mark a position in code as unreachable.  This can be used to
37
 * suppress control flow warnings after asm blocks that transfer
47
 * suppress control flow warnings after asm blocks that transfer
Line 44... Line 54...
44
#define unreachable() __builtin_unreachable()
54
#define unreachable() __builtin_unreachable()
Line 45... Line 55...
45
 
55
 
46
/* Mark a function definition as prohibited from being cloned. */
56
/* Mark a function definition as prohibited from being cloned. */
Line 47... Line -...
47
#define __noclone	__attribute__((__noclone__))
-
 
48
 
57
#define __noclone	__attribute__((__noclone__))
Line 49... Line 58...
49
#endif
58
 
50
#endif
59
#endif /* GCC_VERSION >= 40500 */
51
 
60
 
52
#if __GNUC_MINOR__ >= 6
61
#if GCC_VERSION >= 40600
53
/*
62
/*
54
 * Tell the optimizer that something else uses this function or variable.
63
 * Tell the optimizer that something else uses this function or variable.
Line 55... Line -...
55
 */
-
 
56
#define __visible __attribute__((externally_visible))
-
 
57
#endif
-
 
58
 
-
 
59
#if __GNUC_MINOR__ > 0
-
 
60
#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
-
 
61
#endif
-
 
Line 62... Line 64...
62
#if __GNUC_MINOR__ >= 3 && !defined(__CHECKER__)
64
 */
63
#define __compiletime_warning(message) __attribute__((warning(message)))
65
#define __visible __attribute__((externally_visible))
64
#define __compiletime_error(message) __attribute__((error(message)))
66
#endif
65
#endif
67
 
66
 
68
 
67
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
69
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
68
#if __GNUC_MINOR__ >= 4
70
#if GCC_VERSION >= 40400
69
#define __HAVE_BUILTIN_BSWAP32__
71
#define __HAVE_BUILTIN_BSWAP32__
70
#define __HAVE_BUILTIN_BSWAP64__
72
#define __HAVE_BUILTIN_BSWAP64__