Skip to content

KFunc scx_bpf_cpu_to_cid

v7.2

Return the cid for cpu.

Definition

Parameters

cpu: cpu to look up

Returns

Return the cid for cpu. Trigger scx_error and return -EINVAL if cpu is invalid. The cid<->cpu mapping is static for the lifetime of the loaded scheduler, so the BPF side can cache the result to avoid repeated kfunc invocations.

Signature

s32 scx_bpf_cpu_to_cid(s32 cpu)

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome