STRUCT RETHOOK(9)
π struct rethook(9) β the kernel API manual, but make it make sense
okay so bestie, this is struct rethook from the Kernel API Manual β¨ it's literally the rethook management data structure, and we're gonna get into it π«Ά
πΈ NAME πΈ
struct rethook β The rethook management data structure. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
struct rethook {
void *data;
void (*handler) (struct rethook_node *, void *, unsigned long,
struct pt_regs *);
struct objpool_head pool;
struct rcu_head rcu;
};
like, look at her. she's gorgeous. she's a handful. let's go member by member π
π Members π
dataβ the user-defined data storage. ur lil spot to keep ur own stuff, no questions asked πhandlerβ the user-defined return hook handler. this is the callback that actually does the thing when the hook fires π₯poolβ the pool ofstruct rethook_node. where all the node girlies hang out πΈrcuβ thercu_headfor deferred freeing. freeing, but make it delayed, courtesy of RCU π
π¦ Description π¦
real talk: don't embed this into another data structure. ngl, this is a self-destructive data structure once all rethook_node are freed π like it will absolutely take itself out, so keep it standalone, okay? no cap.
bestie pls. not embedded. i'm begging π this one is literally self-destructive when all rethook_node are freed β that's the whole reason, fr fr.
π SEE ALSO π
- Kernel file
./include/linux/rethook.hβstruct rethook_node(9),is_rethook_trampoline(9)π
aaaand that's the page, main character energy from start to finish π mwah π this one shipped out of ./include/linux, dated October 2026 β so yeah, mark ur calendars, bestie πβ¨
π¦ 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