You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

103 line
2.6 KiB

  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. //go:build illumos && amd64
  4. // +build illumos,amd64
  5. package unix
  6. import (
  7. "unsafe"
  8. )
  9. //go:cgo_import_dynamic libc_readv readv "libc.so"
  10. //go:cgo_import_dynamic libc_preadv preadv "libc.so"
  11. //go:cgo_import_dynamic libc_writev writev "libc.so"
  12. //go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
  13. //go:cgo_import_dynamic libc_accept4 accept4 "libsocket.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. var (
  20. procreadv,
  21. procpreadv,
  22. procwritev,
  23. procpwritev,
  24. procaccept4 syscallFunc
  25. )
  26. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  27. func readv(fd int, iovs []Iovec) (n int, err error) {
  28. var _p0 *Iovec
  29. if len(iovs) > 0 {
  30. _p0 = &iovs[0]
  31. }
  32. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procreadv)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
  33. n = int(r0)
  34. if e1 != 0 {
  35. err = e1
  36. }
  37. return
  38. }
  39. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  40. func preadv(fd int, iovs []Iovec, off int64) (n int, err error) {
  41. var _p0 *Iovec
  42. if len(iovs) > 0 {
  43. _p0 = &iovs[0]
  44. }
  45. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpreadv)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
  46. n = int(r0)
  47. if e1 != 0 {
  48. err = e1
  49. }
  50. return
  51. }
  52. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  53. func writev(fd int, iovs []Iovec) (n int, err error) {
  54. var _p0 *Iovec
  55. if len(iovs) > 0 {
  56. _p0 = &iovs[0]
  57. }
  58. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwritev)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
  59. n = int(r0)
  60. if e1 != 0 {
  61. err = e1
  62. }
  63. return
  64. }
  65. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  66. func pwritev(fd int, iovs []Iovec, off int64) (n int, err error) {
  67. var _p0 *Iovec
  68. if len(iovs) > 0 {
  69. _p0 = &iovs[0]
  70. }
  71. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwritev)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
  72. n = int(r0)
  73. if e1 != 0 {
  74. err = e1
  75. }
  76. return
  77. }
  78. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  79. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  80. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept4)), 4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  81. fd = int(r0)
  82. if e1 != 0 {
  83. err = e1
  84. }
  85. return
  86. }