KFunc scx_bpf_cid_curr
Return the current task on the CPU at cid.
Definition
cid-addressed equivalent of scx_bpf_cpu_curr. Callers must hold RCU read lock (KF_RCU).
Parameters
cid: cid of interest
Returns
Return the current task on the CPU at cid.
Signature
struct task_struct *scx_bpf_cid_curr(s32 cid)
Note
The pointer returned by the kfunc may be NULL. Hence, it forces the user to do a NULL check on the pointer returned from the kfunc before making use of it (dereferencing or passing to another helper).
Note
This kfunc is RCU protected. This means that the kfunc can be called from RCU read-side critical section.
If a program isn't called from RCU read-side critical section, such as sleepable programs, the
bpf_rcu_read_lock and
bpf_rcu_read_unlock to protect the calls to such KFuncs.
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