Skip to content

KFunc scx_bpf_task_cid

v7.2

Get the cid a task is currently associated with.

Definition

cid-addressed equivalent of scx_bpf_task_cpu. task_cpu(p) is always a valid cpu, so this is just a table lookup.

Parameters

p: task of interest

Returns

the cid a task is currently associated with. Return -EINVAL if called from a non-SCX program before any scheduler has ever been enabled.

Signature

s32 scx_bpf_task_cid(const struct task_struct *p)

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