css_tryget_online(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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