forked from toolshed/abra
chore: make deps
This commit is contained in:
9
vendor/golang.org/x/sys/unix/affinity_linux.go
generated
vendored
9
vendor/golang.org/x/sys/unix/affinity_linux.go
generated
vendored
@ -41,6 +41,15 @@ func (s *CPUSet) Zero() {
|
||||
clear(s[:])
|
||||
}
|
||||
|
||||
// Fill adds all possible CPU bits to the set s. On Linux, [SchedSetaffinity]
|
||||
// will silently ignore any invalid CPU bits in [CPUSet] so this is an
|
||||
// efficient way of resetting the CPU affinity of a process.
|
||||
func (s *CPUSet) Fill() {
|
||||
for i := range s {
|
||||
s[i] = ^cpuMask(0)
|
||||
}
|
||||
}
|
||||
|
||||
func cpuBitsIndex(cpu int) int {
|
||||
return cpu / _NCPUBITS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user