linkage.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. .pushsection .kprobes.text, "ax"; \
  30. ENTRY(name)
  31. #define KPROBE_END(name) \
  32. END(name); \
  33. .popsection
  34. #ifndef END
  35. #define END(name) \
  36. .size name, .-name
  37. #endif
  38. #ifndef ENDPROC
  39. #define ENDPROC(name) \
  40. .type name, @function; \
  41. END(name)
  42. #endif
  43. #endif
  44. #define NORET_TYPE /**/
  45. #define ATTRIB_NORET __attribute__((noreturn))
  46. #define NORET_AND noreturn,
  47. #ifndef FASTCALL
  48. #define FASTCALL(x) x
  49. #define fastcall
  50. #endif
  51. #endif