package sched
import "gvisor.dev/gvisor/pkg/sentry/kernel/sched"
Package sched implements scheduler related features.
Index ¶
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) Copy ¶
Copy returns a copy of the CPUSet.
func (CPUSet) ForEachCPU ¶
ForEachCPU iterates over the CPUSet and calls fn with the cpu index if it's set.
func (CPUSet) NumCPUs ¶
NumCPUs returns how many cpus are set in the CPUSet.
func (*CPUSet) Set ¶
Set sets the bit corresponding to cpu.
func (CPUSet) Size ¶
Size returns the size of 'c' in bytes.
Source Files ¶
cpuset.go sched.go
- Version
- v0.0.0-20250605235530-a6711d1e1dc6 (latest)
- Published
- Jun 5, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 4 hours ago –
Tools for package owners.