Skip to main content

getcpu

Function getcpu 

Source
pub fn getcpu() -> Result<usize>
Expand description

Returns the logical CPU currently executing the calling thread.

The value is a point-in-time scheduler observation and may become stale on the next instruction boundary. Linux obtains it through sched_getcpu().