mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
Into tools/include/linux/compiler.h header. Acked-by: Arnaldo Carvalho de Melo <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Corey Ashford <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Jiri Olsa <[email protected]>
41 lines
734 B
C
41 lines
734 B
C
#ifndef _TOOLS_LINUX_COMPILER_H_
|
|
#define _TOOLS_LINUX_COMPILER_H_
|
|
|
|
#ifndef __always_inline
|
|
# define __always_inline inline __attribute__((always_inline))
|
|
#endif
|
|
|
|
#define __user
|
|
|
|
#ifndef __attribute_const__
|
|
# define __attribute_const__
|
|
#endif
|
|
|
|
#ifndef __maybe_unused
|
|
# define __maybe_unused __attribute__((unused))
|
|
#endif
|
|
|
|
#ifndef __packed
|
|
# define __packed __attribute__((__packed__))
|
|
#endif
|
|
|
|
#ifndef __force
|
|
# define __force
|
|
#endif
|
|
|
|
#ifndef __weak
|
|
# define __weak __attribute__((weak))
|
|
#endif
|
|
|
|
#ifndef likely
|
|
# define likely(x) __builtin_expect(!!(x), 1)
|
|
#endif
|
|
|
|
#ifndef unlikely
|
|
# define unlikely(x) __builtin_expect(!!(x), 0)
|
|
#endif
|
|
|
|
#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
|
|
|
|
#endif /* _TOOLS_LINUX_COMPILER_H */
|