Skip to main content

Module affinity

Module affinity 

Source
Expand description

CPU affinity API. Platform routing by target_os.

On Linux this module delegates to the internal syscalls::pin_to_cpus / syscalls::get_cpus. On other targets every function returns Unsupported.

Functionsยง

current_thread_cpus
Returns the CPUs on which the calling thread is allowed to run.
pin_current_thread_to_cpus
Pins the calling thread to the given CPU indices.