package hostcpu
import "gvisor.dev/gvisor/pkg/sentry/hostcpu"
Package hostcpu provides utilities for working with CPU information provided by a host Linux kernel.
Index ¶
Functions ¶
func GetCPU ¶
func GetCPU() uint32
GetCPU returns the caller's current CPU number, without using the Linux VDSO (which is not available to the sentry) or the getcpu(2) system call (which is relatively slow).
func MaxPossibleCPU ¶
MaxPossibleCPU returns the highest possible CPU number, which is guaranteed not to change for the lifetime of the host kernel.
Source Files ¶
hostcpu.go
- Version
- v0.0.0-20250605235530-a6711d1e1dc6 (latest)
- Published
- Jun 5, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 4 hours ago –
Tools for package owners.