zsyscall_illumos_amd64.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // go run mksyscall_solaris.go -illumos -tags illumos,amd64 syscall_illumos.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build illumos,amd64
  4. package unix
  5. import (
  6. "unsafe"
  7. )
  8. //go:cgo_import_dynamic libc_readv readv "libc.so"
  9. //go:cgo_import_dynamic libc_preadv preadv "libc.so"
  10. //go:cgo_import_dynamic libc_writev writev "libc.so"
  11. //go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
  12. //go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
  13. //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
  14. //go:linkname procreadv libc_readv
  15. //go:linkname procpreadv libc_preadv
  16. //go:linkname procwritev libc_writev
  17. //go:linkname procpwritev libc_pwritev
  18. //go:linkname procaccept4 libc_accept4
  19. //go:linkname procpipe2 libc_pipe2
  20. var (
  21. procreadv,
  22. procpreadv,
  23. procwritev,
  24. procpwritev,
  25. procaccept4,
  26. procpipe2 syscallFunc
  27. )
  28. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  29. func readv(fd int, iovs []Iovec) (n int, err error) {
  30. var _p0 *Iovec
  31. if len(iovs) > 0 {
  32. _p0 = &iovs[0]
  33. }
  34. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procreadv)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
  35. n = int(r0)
  36. if e1 != 0 {
  37. err = e1
  38. }
  39. return
  40. }
  41. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  42. func preadv(fd int, iovs []Iovec, off int64) (n int, err error) {
  43. var _p0 *Iovec
  44. if len(iovs) > 0 {
  45. _p0 = &iovs[0]
  46. }
  47. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpreadv)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
  48. n = int(r0)
  49. if e1 != 0 {
  50. err = e1
  51. }
  52. return
  53. }
  54. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  55. func writev(fd int, iovs []Iovec) (n int, err error) {
  56. var _p0 *Iovec
  57. if len(iovs) > 0 {
  58. _p0 = &iovs[0]
  59. }
  60. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwritev)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
  61. n = int(r0)
  62. if e1 != 0 {
  63. err = e1
  64. }
  65. return
  66. }
  67. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  68. func pwritev(fd int, iovs []Iovec, off int64) (n int, err error) {
  69. var _p0 *Iovec
  70. if len(iovs) > 0 {
  71. _p0 = &iovs[0]
  72. }
  73. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwritev)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
  74. n = int(r0)
  75. if e1 != 0 {
  76. err = e1
  77. }
  78. return
  79. }
  80. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  81. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  82. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept4)), 4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  83. fd = int(r0)
  84. if e1 != 0 {
  85. err = e1
  86. }
  87. return
  88. }
  89. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  90. func pipe2(p *[2]_C_int, flags int) (err error) {
  91. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)
  92. if e1 != 0 {
  93. err = e1
  94. }
  95. return
  96. }