unistd.h 829 B

12345678910111213141516171819202122232425262728293031
  1. #include <uapi/asm-generic/unistd.h>
  2. /*
  3. * These are required system calls, we should
  4. * invert the logic eventually and let them
  5. * be selected by default.
  6. */
  7. #if __BITS_PER_LONG == 32
  8. #define __ARCH_WANT_STAT64
  9. #define __ARCH_WANT_SYS_LLSEEK
  10. #endif
  11. #define __ARCH_WANT_SYS_RT_SIGACTION
  12. #define __ARCH_WANT_SYS_RT_SIGSUSPEND
  13. #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
  14. /*
  15. * "Conditional" syscalls
  16. *
  17. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  18. * but it doesn't work on all toolchains, so we just do it by hand
  19. */
  20. #ifndef cond_syscall
  21. #ifdef CONFIG_SYMBOL_PREFIX
  22. #define __SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
  23. #else
  24. #define __SYMBOL_PREFIX
  25. #endif
  26. #define cond_syscall(x) asm(".weak\t" __SYMBOL_PREFIX #x "\n\t" \
  27. ".set\t" __SYMBOL_PREFIX #x "," \
  28. __SYMBOL_PREFIX "sys_ni_syscall")
  29. #endif