mas_reset(9)
β¨ mas_reset β the kernel API manual, but make it cute β¨
okay so bestie, you're reading the mas_reset page from the Kernel API Manual (mas_reset(9)), and honestly? it's a little self-care moment for your maple tree. let me tell you everything π
πΈ NAME πΈ
mas_reset β reset a Maple Tree operation state. that's it, that's the whole vibe. it's giving "factory reset but make it maple" π
π¦ SYNOPSIS π¦
void mas_reset (struct ma_state *mas );
literally the whole signature, no notes. void return, one pointer argument, clean and iconic β¨
π ARGUMENTS π
masβ the Maple Tree operation state. that's your little guy. your state. your main character struct π
π₯ DESCRIPTION π₯
okay so here's the tea: mas_reset resets the error or walk state of the mas, so that future walks of the array will start from the root. like, it re-centers the whole thing, back to the top, fresh start, new me π§
use this if you have dropped the lock and want to reuse the ma_state. yes, exactly that. you let go of the lock, so now your state is stale and lowkey unusable until you reset it. this is the reset. periodt π
ngl this is the "log out, log back in" of maple tree state. no cap.
π CONTEXT π
Any context. literally any. do it in a process, do it in an interrupt, do it while you're waiting for your iced coffee β the manpage says any context and the manpage does not lie π«Ά
π SEE ALSO π
Kernel file ./include/linux/maple_tree.h, Maple tree flags(9), MTREE_INIT(9), MTREE_INIT_EXT(9), mtree_empty(9), mas_for_each(9), mas_for_each_rev(9), __mas_set_range(9), mas_set_range(9), mas_set(9), mt_init_flags(9), mt_init(9), mt_clear_in_rcu(9), mt_set_in_rcu(9), mt_for_each(9) β a whole friend group, honestly. go say hi π
so yeah, that's mas_reset from the Kernel API Manual, straight out of ./include/linux, and the page is dated October 2026 πΈ stay safe, keep your locks honest, and reset that state whenever you've dropped one π
ππ slay, and read the source πβ¨
π¦ 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