css_tryget_online(9)
π css_tryget_online(9) β a Kernel API Manual moment
okay so bestie, we're in the Kernel API Manual today and the main character is literally css_tryget_online β¨ like that's the whole vibe, that's the function, no cap.
πΈ NAME
css_tryget_online β try to obtain a reference on the specified css if online π
π¦ SYNOPSIS
CGROUP_REF_FN_ATTRS bool css_tryget_online (struct cgroup_subsys_state
*css );
π ARGUMENTS
cssβ the target css π (yes that's it, that's the whole argument, she's lowkey simple like that)
π₯ DESCRIPTION
Obtain a reference on css if it's online. periodt.
The caller naturally needs to make sure that css is accessible, but β and this is the slay part β the caller doesn't have to be holding a reference on it already. IOW, RCU protected access is good enough for this function π
iykyk.
Returns true if a reference count was successfully obtained; false otherwise. iconic behavior honestly π«Ά
ngl, keep that "accessible but not necessarily referenced" distinction in your head, bestie β it's literally the whole point of this one π
β SEE ALSO
Kernel file ./include/linux/cgroup_refcnt.h β css_get(9), css_get_many(9), css_tryget(9), css_put(9), css_put_many(9) πΈ the whole friend group fr fr
and that's a wrap, bestie π this page lives in ./include/linux, brought to you by the October 2026 era, and it's called css_tryget_online(9) β go get that reference (if she's online) πβ¨
π¦ 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