Documentation ¶
Overview ¶
Package sched implements scheduler related features.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CPUSetSize ¶
CPUSetSize returns the size in bytes of a CPUSet that can contain num cpus.
Types ¶
type CPUSet ¶
type CPUSet []byte
CPUSet contains a bitmap to record CPU information.
Note that this definition is only correct for little-endian architectures, since Linux's cpumask_t uses unsigned long.
func NewCPUSet ¶
NewCPUSet returns a CPUSet for the given number of CPUs which initially contains no CPUs.
func NewFullCPUSet ¶
NewFullCPUSet returns a CPUSet for the given number of CPUs, all of which are present in the set.
func (*CPUSet) ClearAbove ¶
ClearAbove clears bits corresponding to cpu and all higher cpus.
func (CPUSet) ForEachCPU ¶
ForEachCPU iterates over the CPUSet and calls fn with the cpu index if it's set.
Click to show internal directories.
Click to hide internal directories.