aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/syscall_illumos.go
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-01-02 18:56:31 +0100
committerLibravatar Rutger Broekhoff2024-01-02 18:56:31 +0100
commit8db41da676ac8368ef7c2549d56239a5ff5eedde (patch)
tree09c427fd66de2ec1ebffc8342f5fdbb84b0701b5 /vendor/golang.org/x/sys/unix/syscall_illumos.go
parentd4f75fb6db22e57577867445a022227e70958931 (diff)
downloadgitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.tar.gz
gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.zip
Delete vendor directory
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_illumos.go')
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_illumos.go78
1 files changed, 0 insertions, 78 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_illumos.go b/vendor/golang.org/x/sys/unix/syscall_illumos.go
deleted file mode 100644
index a863f70..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_illumos.go
+++ /dev/null
@@ -1,78 +0,0 @@
1// Copyright 2021 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// illumos system calls not present on Solaris.
6
7//go:build amd64 && illumos
8
9package unix
10
11import (
12 "unsafe"
13)
14
15func bytes2iovec(bs [][]byte) []Iovec {
16 iovecs := make([]Iovec, len(bs))
17 for i, b := range bs {
18 iovecs[i].SetLen(len(b))
19 if len(b) > 0 {
20 iovecs[i].Base = &b[0]
21 } else {
22 iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero))
23 }
24 }
25 return iovecs
26}
27
28//sys readv(fd int, iovs []Iovec) (n int, err error)
29
30func Readv(fd int, iovs [][]byte) (n int, err error) {
31 iovecs := bytes2iovec(iovs)
32 n, err = readv(fd, iovecs)
33 return n, err
34}
35
36//sys preadv(fd int, iovs []Iovec, off int64) (n int, err error)
37
38func Preadv(fd int, iovs [][]byte, off int64) (n int, err error) {
39 iovecs := bytes2iovec(iovs)
40 n, err = preadv(fd, iovecs, off)
41 return n, err
42}
43
44//sys writev(fd int, iovs []Iovec) (n int, err error)
45
46func Writev(fd int, iovs [][]byte) (n int, err error) {
47 iovecs := bytes2iovec(iovs)
48 n, err = writev(fd, iovecs)
49 return n, err
50}
51
52//sys pwritev(fd int, iovs []Iovec, off int64) (n int, err error)
53
54func Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) {
55 iovecs := bytes2iovec(iovs)
56 n, err = pwritev(fd, iovecs, off)
57 return n, err
58}
59
60//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = libsocket.accept4
61
62func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
63 var rsa RawSockaddrAny
64 var len _Socklen = SizeofSockaddrAny
65 nfd, err = accept4(fd, &rsa, &len, flags)
66 if err != nil {
67 return
68 }
69 if len > SizeofSockaddrAny {
70 panic("RawSockaddrAny too small")
71 }
72 sa, err = anyToSockaddr(fd, &rsa)
73 if err != nil {
74 Close(nfd)
75 nfd = 0
76 }
77 return
78}