0001
0002 #ifndef __LINUX_COMPILER_TYPES_H
0003 #define __LINUX_COMPILER_TYPES_H
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __has_builtin
0013 #define __has_builtin(x) (0)
0014 #endif
0015
0016 #ifdef __CHECKER__
0017
0018 # define __must_hold(x) __attribute__((context(x,1,1)))
0019 # define __acquires(x) __attribute__((context(x,0,1)))
0020 # define __releases(x) __attribute__((context(x,1,0)))
0021 # define __acquire(x) __context__(x,1)
0022 # define __release(x) __context__(x,-1)
0023 # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
0024 #else
0025
0026 # define __must_hold(x)
0027 # define __acquires(x)
0028 # define __releases(x)
0029 # define __acquire(x) (void)0
0030 # define __release(x) (void)0
0031 # define __cond_lock(x,c) (c)
0032 #endif
0033
0034
0035 #ifdef __GNUC__
0036 #include <linux/compiler-gcc.h>
0037 #endif
0038
0039 #ifndef asm_volatile_goto
0040 #define asm_volatile_goto(x...) asm goto(x)
0041 #endif
0042
0043 #endif