Skip to main content

Module cpu

Module cpu 

Source
Expand description

Core enumeration and thread pinning — the helpers you need to stand up your own thread-per-core runtime around a Pool.

Structs§

CoreId
This represents a CPU core.

Functions§

affinity_mask
The /proc/irq/<n>/smp_affinity mask that names exactly cpu: comma-separated 32-bit hex words, most significant first.
cores
The cores this process may run on, sorted by id, with duplicates removed.
pin_current
Pin the calling thread to core. Returns whether the kernel accepted it.