fgraph_get_task_var(9)
π fgraph_get_task_var(9) β from the Kernel API Manual, bestie
Okay so real talk, this one lives in section 9 of the Kernel API Manual and it's called fgraph_get_task_var. It's short, it's sweet, and it does literally one thing. Let's get into it β¨
πΈ NAME πΈ
fgraph_get_task_var β retrieve a task specific state variable π
Like, it goes and gets you a per-task variable. That's the whole vibe check.
β¨ SYNOPSIS β¨
unsigned long * fgraph_get_task_var (struct fgraph_ops *gops );
One function, one argument, returns a pointer. Iconic, honestly. No notes. π
π¦ ARGUMENTS π¦
gopsβ theftrace_opsthat owns the task specific variable π. Yes bestie, this is the struct whose variable you're asking about, so don't just hand it any old thing.
π DESCRIPTION π
So here's the tea π: every registered fgraph_ops has a task state variable reserved on the task's ret_stack. Like, it's already there, sitting pretty, minding its own business. This function returns the address to that variable β that's it, that's the job π«Ά
To say it again in a slightly more formal font: it returns the address to the fgraph_ops gops tasks specific unsigned long variable. So what you get back is an unsigned long *, pointing right at that per-task state. Slay. π
Ngl, "returns the address to the fgraph_ops gops tasks specific unsigned long variable" is the whole description β the original doesn't say anything more, so neither will I. No made-up lore here, bestie π
π₯ SEE ALSO π₯
Go check the kernel file ./kernel/trace/fgraph.c β that's the main character π§ β plus these absolute legends:
fgraph_reserve_data(9)fgraph_retrieve_data(9)fgraph_retrieve_parent_data(9)ftrace_graph_stop(9)ftrace_graph_get_ret_stack(9)ftrace_graph_top_ret_addr(9)ftrace_graph_ret_addr(9)
And that's the page, bestie π It ships out of ./kernel/trace, dated October 2026, and it lives under the name fgraph_get_task_var(9) β go forth and grab those task vars, you've got this ππ
π¦ 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