unistd.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * System calls under the Sparc.
  3. *
  4. * Don't be scared by the ugly clobbers, it is the only way I can
  5. * think of right now to force the arguments into fixed registers
  6. * before the trap into the system call with gcc 'asm' statements.
  7. *
  8. * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
  9. *
  10. * SunOS compatibility based upon preliminary work which is:
  11. *
  12. * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
  13. */
  14. #ifndef _SPARC_UNISTD_H
  15. #define _SPARC_UNISTD_H
  16. #include <uapi/asm/unistd.h>
  17. #ifdef __32bit_syscall_numbers__
  18. #else
  19. #define __NR_time 231 /* Linux sparc32 */
  20. #endif
  21. #define __ARCH_WANT_OLD_READDIR
  22. #define __ARCH_WANT_STAT64
  23. #define __ARCH_WANT_SYS_ALARM
  24. #define __ARCH_WANT_SYS_GETHOSTNAME
  25. #define __ARCH_WANT_SYS_PAUSE
  26. #define __ARCH_WANT_SYS_SGETMASK
  27. #define __ARCH_WANT_SYS_SIGNAL
  28. #define __ARCH_WANT_SYS_TIME
  29. #define __ARCH_WANT_SYS_UTIME
  30. #define __ARCH_WANT_SYS_WAITPID
  31. #define __ARCH_WANT_SYS_SOCKETCALL
  32. #define __ARCH_WANT_SYS_FADVISE64
  33. #define __ARCH_WANT_SYS_GETPGRP
  34. #define __ARCH_WANT_SYS_LLSEEK
  35. #define __ARCH_WANT_SYS_NICE
  36. #define __ARCH_WANT_SYS_OLDUMOUNT
  37. #define __ARCH_WANT_SYS_SIGPENDING
  38. #define __ARCH_WANT_SYS_SIGPROCMASK
  39. #define __ARCH_WANT_SYS_RT_SIGSUSPEND
  40. #ifdef __32bit_syscall_numbers__
  41. #define __ARCH_WANT_SYS_IPC
  42. #else
  43. #define __ARCH_WANT_COMPAT_SYS_TIME
  44. #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
  45. #define __ARCH_WANT_COMPAT_SYS_SENDFILE
  46. #endif
  47. /*
  48. * "Conditional" syscalls
  49. *
  50. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  51. * but it doesn't work on all toolchains, so we just do it by hand
  52. */
  53. #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  54. #endif /* _SPARC_UNISTD_H */