task_get_cgroup1(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 🌈

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