Documentation
¶
Index ¶
- Constants
- type CPUSet
- func (s *CPUSet) Add(cpu uint) bool
- func (s *CPUSet) Clear()
- func (s *CPUSet) Clone() CPUSet
- func (s *CPUSet) Contains(cpu uint) bool
- func (s *CPUSet) Delete(cpu uint) bool
- func (s *CPUSet) Equal(s2 CPUSet) bool
- func (s *CPUSet) Len() int
- func (s *CPUSet) ListString() string
- func (s *CPUSet) MaskString() string
- func (s *CPUSet) String() string
- func (s *CPUSet) UnsortedList() []uint
Constants ¶
const Version = "0.2.3"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUSet ¶
type CPUSet struct {
// contains filtered or unexported fields
}
A CPUSet defines a list of CPUs to restrict processes to. The zero value of a CPUSet is ready to use.
func Difference ¶
Difference returns a new CPUSet containing the CPUs of s1 that are not in s2.
func Intersection ¶
Intersection returns a new CPUSet containing the CPUs of s1 that are in s2.
func ParseList ¶
ParseList decodes s into a CPUSet. It returns an error if s is not a valid list string, as specified in the Linux cpuset(7) man page (see "List Format").
func ParseMask ¶
ParseMask decodes s into a CPUSet. It returns an error if s is not a valid mask string, as specified in the Linux cpuset(7) man page (see "Mask Format").
func (*CPUSet) ListString ¶
ListString encodes s into a list string.
func (*CPUSet) MaskString ¶
MaskString encodes s into a mask string.
func (*CPUSet) UnsortedList ¶
UnsortedList returns a slice of all the CPUs in s, in an unpredictable order.