mas_walk(9)
β¨ mas_walk(9) β the maple state glow-up walk π
okay so bestie, you're looking at mas_walk from the Kernel API Manual, and honestly? it's giving "just go find the thing" energy. no cap. let's get into it π«Ά
πΈ NAME πΈ
mas_walk β Search for @mas->index in the tree.
like literally, it walks the tree hunting for @mas->index. that's the whole vibe. π
β SYNOPSIS β
void * mas_walk (struct ma_state *mas );
π¦ ARGUMENTS π¦
masβ The maple state. yes queen, that's your state struct and she's the main character here π
π DESCRIPTION π
so here's the tea β: mas->index and mas->last will be set to the range if there is a value. that's it, that's the assignment. β¨
and if mas->status is ma_none, it resets to ma_start. little reset moment, we love a fresh start π§
π RETURN π
the entry at the location or NULL.
(so like... either you get your entry, or you get nothing. NULL. it's a vibe check and sometimes you fail it π)
π₯ SEE ALSO π₯
bestie there are SO many of these and i'm not skipping a single one, we're doing the full tour π
mas_prealloc_calc(9)mas_wr_preallocate(9)mas_insert(9)mas_alloc_cyclic(9)mte_dead_walk(9)mt_free_walk(9)mas_store(9)mas_store_gfp(9)mas_store_prealloc(9)mas_preallocate(9)mas_next(9)mas_next_range(9)mt_next(9)mas_prev(9)mas_prev_range(9)mt_prev(9)mas_pause(9)mas_find_setup(9)mas_find(9)mas_find_range(9)mas_find_rev_setup(9)mas_find_rev(9)mas_find_range_rev(9)mas_erase(9)mas_nomem(9)mas_nomem_nofail(9)mtree_load(9)mtree_store_range(9)mtree_store(9)mtree_insert_range(9)mtree_insert(9)mtree_alloc_cyclic(9)mtree_erase(9)__mt_dup(9)mtree_dup(9)__mt_destroy(9)mtree_destroy(9)mt_find(9)mt_find_after(9)
and the Kernel file to go peek at: ./lib/maple_tree.c π β that's where all the lore lives, iykyk.
k that's the whole page, mwah π stay hydrated, read your kernel source, and remember: mas_walk is literally just searching for @mas->index in the tree. periodt. πΈ
sign-off cuteness π: this served from the ./lib directory, dated October 2026, and it's mas_walk(9) forever and always. bye 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