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