linkage.h 849 B

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