unistd.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef _ASM_X86_UNISTD_H
  2. #define _ASM_X86_UNISTD_H 1
  3. /* x32 syscall flag bit */
  4. #define __X32_SYSCALL_BIT 0x40000000
  5. #ifdef __KERNEL__
  6. # ifdef CONFIG_X86_32
  7. # include <asm/unistd_32.h>
  8. # define __ARCH_WANT_IPC_PARSE_VERSION
  9. # define __ARCH_WANT_STAT64
  10. # define __ARCH_WANT_SYS_IPC
  11. # define __ARCH_WANT_SYS_OLD_MMAP
  12. # define __ARCH_WANT_SYS_OLD_SELECT
  13. # else
  14. # include <asm/unistd_64.h>
  15. # define __ARCH_WANT_COMPAT_SYS_TIME
  16. # endif
  17. # define __ARCH_WANT_OLD_READDIR
  18. # define __ARCH_WANT_OLD_STAT
  19. # define __ARCH_WANT_SYS_ALARM
  20. # define __ARCH_WANT_SYS_FADVISE64
  21. # define __ARCH_WANT_SYS_GETHOSTNAME
  22. # define __ARCH_WANT_SYS_GETPGRP
  23. # define __ARCH_WANT_SYS_LLSEEK
  24. # define __ARCH_WANT_SYS_NICE
  25. # define __ARCH_WANT_SYS_OLDUMOUNT
  26. # define __ARCH_WANT_SYS_OLD_GETRLIMIT
  27. # define __ARCH_WANT_SYS_OLD_UNAME
  28. # define __ARCH_WANT_SYS_PAUSE
  29. # define __ARCH_WANT_SYS_RT_SIGACTION
  30. # define __ARCH_WANT_SYS_RT_SIGSUSPEND
  31. # define __ARCH_WANT_SYS_SGETMASK
  32. # define __ARCH_WANT_SYS_SIGNAL
  33. # define __ARCH_WANT_SYS_SIGPENDING
  34. # define __ARCH_WANT_SYS_SIGPROCMASK
  35. # define __ARCH_WANT_SYS_SOCKETCALL
  36. # define __ARCH_WANT_SYS_TIME
  37. # define __ARCH_WANT_SYS_UTIME
  38. # define __ARCH_WANT_SYS_WAITPID
  39. /*
  40. * "Conditional" syscalls
  41. *
  42. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  43. * but it doesn't work on all toolchains, so we just do it by hand
  44. */
  45. # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  46. #else
  47. # ifdef __i386__
  48. # include <asm/unistd_32.h>
  49. # elif defined(__LP64__)
  50. # include <asm/unistd_64.h>
  51. # else
  52. # include <asm/unistd_x32.h>
  53. # endif
  54. #endif
  55. #endif /* _ASM_X86_UNISTD_H */