rethook_alloc(9)
π NAME π
Okay bestie, welcome to the Kernel API Manual page for rethook_alloc(9) β this one allocates a struct rethook. That's the whole name vibe. β¨
rethook_allocβ allocates astruct rethook.
π SYNOPSIS π
Here's the exact signature, no cap:
struct rethook * rethook_alloc (void *data , rethook_handler_t handler ,
int size , int num );
πΈ ARGUMENTS πΈ
dataβ the data you pass along to the handler when the return is hooked. π«Άhandlerβ the return-hook callback function, and it must NOT beNULL. This is not a drill, bestie.sizeβ node size: the rethook node and additional data.numβ the number of rethook nodes to be preallocated.
π¦ DESCRIPTION π¦
This function allocates and initializes a new rethook using data and handler. It returns a pointer to the new rethook, or error codes for failures. Literally that's the deal. π
Heads up: handler == NULL means this rethook is going to be freed. That's the note. Don't skip it. π
π SEE ALSO π
- Kernel file
./kernel/trace/rethook.c rethook_stop(9)rethook_free(9)rethook_recycle(9)rethook_try_get(9)rethook_hook(9)rethook_find_ret_addr(9)
Signed, sealed, slayed: source/version ./kernel/trace, dated October 2026 β all about rethook_alloc(9). π
π
π¦ 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