rethook_try_get(9)
π rethook_try_get(9) π
okay so bestie, welcome to the Kernel API Manual β yes it's giving official-docs energy but we're gonna make it make sense π«Ά
β¨ NAME β¨
rethook_try_get β grab yourself an unused rethook node, no cap πΈ
β¨ SYNOPSIS β¨
struct rethook_node * rethook_try_get (struct rethook *rh );
like, that's the whole vibe. it returns a struct rethook_node * and it takes exactly one arg. periodt π
β¨ ARGUMENTS β¨
rhβ thestruct rethookthat pools the nodes. think of it as the group chat where all the nodes hang out, and you're about to slide into it and steal one π
β¨ DESCRIPTION β¨
so basically: get an unused rethook node from rh. it's giving "borrow a charger from your bestie" energy π₯
and here's the important part β if the node pool is empty, this will return NULL. not a vibe, but that's the deal π so like, check for NULL, okay? don't just assume you got one.
β οΈ fr fr warning: caller must disable preemption. like actually. not "I'll do it later" β disable it before you call this. no cap π
β¨ SEE ALSO β¨
- Kernel file
./kernel/trace/rethook.c rethook_stop(9)rethook_free(9)rethook_alloc(9)rethook_recycle(9)rethook_hook(9)rethook_find_ret_addr(9)
iykyk β all the rethook girlies in one place ππ
and that's the page, bestie! this iconic little entry lives over at ./kernel/trace and it's dated October 2026 β screenshot it, cite it, live by it πβ¨π¦
π¦ 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