task_get_cgroup1(9)
π task_get_cgroup1(9) π
okay so welcome to the Kernel API Manual page for task_get_cgroup1 β bestie, this one is literally about acquiring the cgroup associated with a task inside one specific cgroup1 hierarchy. That cgroup1 hierarchy is identified by its hierarchy ID. no cap β¨
πΈ NAME πΈ
task_get_cgroup1 β acquires the associated cgroup of a task within a specific cgroup1 hierarchy. The cgroup1 hierarchy is identified by its hierarchy ID. π
π¦ SYNOPSIS π¦
struct cgroup * task_get_cgroup1 (struct task_struct *tsk , int hierarchy_id );
π ARGUMENTS π
tskβ the target task (struct task_struct *). it's giving βwhich task are we checking?β energy π«Άhierarchy_idβ the ID of a cgroup1 hierarchy (int). lowkey the key for the hierarchy you're asking about β¨
π₯ DESCRIPTION π₯
On success, the cgroup is returned. π On failure, ERR_PTR is returned β yep, that's the failure value, bestie, so don't sleep on it π We limit it to cgroup1 only. periodt π
π SEE ALSO π
- Kernel file:
./kernel/cgroup/cgroup-v1.cπ cgroup_attach_task_all(9)cgroup_transfer_tasks(9)cgroupstats_build(9)
go peek at these if you're doing the deeper cgroup1 lore, iykyk π¦
mwah π β source ./kernel/cgroup, October 2026, for task_get_cgroup1(9) β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms