Documentation
  • Coverage
  • 2.56%
    1 out of 39 items documented0 out of 13 items with examples
  • Size
  • Source code size: 34.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 42s Average build duration of successful builds.
  • all releases: 28s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ax-x2/cpu
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ax-x2

cpu

cpu utility

features

  • thread affinity for current or selected linux thread ids
  • online cpu counting and iteration
  • physical core counting
  • cache line padding
  • atomic cursor helpers
  • cpu pause, fences, and prefetch helpers
  • spin, yield, and backoff wait strategies

affinity

use set_current_thread_affinity when a worker pins itself during startup.

use current_thread_id and set_cpu_affinity when the caller owns the target thread id.

hot path

cursor, fence, prefetch, cache padding, and wait strategy operations avoid heap allocation.

affinity and topology calls are cold path setup operations and may read sysfs or call the kernel.