00001
00002
00003 #ifndef std_macros_h
00004 #define std_macros_h
00005
00006
00007
00008
00009
00010
00011 #if (__GNUC__>=3)
00012 # define BUILTIN_EXPECT(exp,c) __builtin_expect((exp),(c))
00013 # define EXPECT_TRUE(exp) __builtin_expect((exp),true)
00014 # define EXPECT_FALSE(exp) __builtin_expect((exp),false)
00015 #else
00016 # define BUILTIN_EXPECT(exp,c) (exp)
00017 # define EXPECT_TRUE(exp) (exp)
00018 # define EXPECT_FALSE(exp) (exp)
00019 #endif
00020
00021 #define barrier() __asm__ __volatile__("": : :"memory")
00022
00023
00024
00025
00026
00027
00028
00029 #define FIASCO_CONST __attribute__ ((const))
00030
00031 #ifdef __i386__
00032 #define FIASCO_FASTCALL __attribute__ ((regparm(3)))
00033 #else
00034 #define FIASCO_FASTCALL
00035 #endif
00036
00037 #if (__GNUC__<3)
00038 # define MARK_AS_DEPRECATED
00039 # define ALWAYS_INLINE
00040 # define FIASCO_NOINLINE
00041 #else
00042 # define MARK_AS_DEPRECATED __attribute__ ((deprecated))
00043 # define ALWAYS_INLINE __attribute__ ((always_inline))
00044 # define FIASCO_NOINLINE __attribute__ ((noinline))
00045 #endif
00046
00047 #define FIASCO_NORETURN __attribute__ ((noreturn))
00048
00049 #endif // std_macros_h