mas_reset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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