compiler-gcc.h 937 B

1234567891011121314151617181920212223242526
  1. /* Never include this file directly. Include <linux/compiler.h> instead. */
  2. /*
  3. * Common definitions for all gcc versions go here.
  4. */
  5. /* Optimization barrier */
  6. /* The "volatile" is due to gcc bugs */
  7. #define barrier() __asm__ __volatile__("": : :"memory")
  8. /* This macro obfuscates arithmetic on a variable address so that gcc
  9. shouldn't recognize the original var, and make assumptions about it */
  10. #define RELOC_HIDE(ptr, off) \
  11. ({ unsigned long __ptr; \
  12. __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \
  13. (typeof(ptr)) (__ptr + (off)); })
  14. #define inline inline __attribute__((always_inline))
  15. #define __inline__ __inline__ __attribute__((always_inline))
  16. #define __inline __inline __attribute__((always_inline))
  17. #define __deprecated __attribute__((deprecated))
  18. #define noinline __attribute__((noinline))
  19. #define __attribute_pure__ __attribute__((pure))
  20. #define __attribute_const__ __attribute__((__const__))