Skip to content

KFunc scx_bpf_cid_to_cpu

v7.2

Return the raw CPU id for cid.

Definition

Parameters

cid: cid to look up

Returns

Return the raw CPU id for cid. Trigger scx_error and return -EINVAL if cid 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_cid_to_cpu(s32 cid)

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