linkage.h 969 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _LINUX_LINKAGE_H
  2. #define _LINUX_LINKAGE_H
  3. #include <asm/linkage.h>
  4. #ifdef __cplusplus
  5. #define CPP_ASMLINKAGE extern "C"
  6. #else
  7. #define CPP_ASMLINKAGE
  8. #endif
  9. #ifndef asmlinkage
  10. #define asmlinkage CPP_ASMLINKAGE
  11. #endif
  12. #ifndef prevent_tail_call
  13. # define prevent_tail_call(ret) do { } while (0)
  14. #endif
  15. #ifndef __ALIGN
  16. #define __ALIGN .align 4,0x90
  17. #define __ALIGN_STR ".align 4,0x90"
  18. #endif
  19. #ifdef __ASSEMBLY__
  20. #define ALIGN __ALIGN
  21. #define ALIGN_STR __ALIGN_STR
  22. #ifndef ENTRY
  23. #define ENTRY(name) \
  24. .globl name; \
  25. ALIGN; \
  26. name:
  27. #endif
  28. #define KPROBE_ENTRY(name) \
  29. .section .kprobes.text, "ax"; \
  30. ENTRY(name)
  31. #ifndef END
  32. #define END(name) \
  33. .size name, .-name
  34. #endif
  35. #ifndef ENDPROC
  36. #define ENDPROC(name) \
  37. .type name, @function; \
  38. END(name)
  39. #endif
  40. #endif
  41. #define NORET_TYPE /**/
  42. #define ATTRIB_NORET __attribute__((noreturn))
  43. #define NORET_AND noreturn,
  44. #ifndef FASTCALL
  45. #define FASTCALL(x) x
  46. #define fastcall
  47. #endif
  48. #endif