aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/fdset.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/fdset.go
parentd4f75fb6db22e57577867445a022227e70958931 (diff)
downloadgitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.tar.gz
gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.zip
Delete vendor directory
Diffstat (limited to 'vendor/golang.org/x/sys/unix/fdset.go')
-rw-r--r--vendor/golang.org/x/sys/unix/fdset.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/vendor/golang.org/x/sys/unix/fdset.go b/vendor/golang.org/x/sys/unix/fdset.go
deleted file mode 100644
index 9e83d18..0000000
--- a/vendor/golang.org/x/sys/unix/fdset.go
+++ /dev/null
@@ -1,29 +0,0 @@
1// Copyright 2019 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//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6
7package unix
8
9// Set adds fd to the set fds.
10func (fds *FdSet) Set(fd int) {
11 fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
12}
13
14// Clear removes fd from the set fds.
15func (fds *FdSet) Clear(fd int) {
16 fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
17}
18
19// IsSet returns whether fd is in the set fds.
20func (fds *FdSet) IsSet(fd int) bool {
21 return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
22}
23
24// Zero clears the set fds.
25func (fds *FdSet) Zero() {
26 for i := range fds.Bits {
27 fds.Bits[i] = 0
28 }
29}