sysdep.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * This file is subject to the terms and conditions of the LGPL V2.1
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2018 Kalray Inc.
  7. */
  8. #ifndef _LINUX_KVX_SYSDEP_H
  9. #define _LINUX_KVX_SYSDEP_H 1
  10. #include <common/sysdep.h>
  11. #define SYS_ify(syscall_name) (__NR_##syscall_name)
  12. #ifdef __ASSEMBLER__
  13. # define _ENTRY(name) \
  14. .align 8; \
  15. .globl C_SYMBOL_NAME(name); \
  16. .func C_SYMBOL_NAME(name); \
  17. .type C_SYMBOL_NAME(name), @function; \
  18. C_SYMBOL_NAME(name): \
  19. cfi_startproc;
  20. /* Define an entry point visible from C. */
  21. # ifdef PIC
  22. # define ENTRY(name) \
  23. .pic \
  24. _ENTRY(name)
  25. # else
  26. # define ENTRY(name) _ENTRY(name)
  27. # endif
  28. #endif
  29. /* Local label name for asm code. */
  30. # ifndef L
  31. # define L(name) $L##name
  32. # endif
  33. #undef END
  34. #define END(name) \
  35. cfi_endproc; \
  36. .endfunc; \
  37. .size C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name)
  38. #endif //_LINUX_KVX_SYSDEP_H