mas_next_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mas_next_range(9) β€” Advance the maple state to the next range

okay so bestie, welcome to the mas_next_range(9) page from the Kernel API Manual ✨ this one is short but it still has lore, so let’s get into it 🍁

🌸 NAME 🌸

mas_next_range β€” advance the maple state to the next range. periodt πŸ’…

✨ SYNOPSIS ✨

void * mas_next_range (struct ma_state *mas , unsigned long max );

πŸŽ€ ARGUMENTS πŸŽ€

  • mas β€” the maple state 🍁 yes, that’s the whole description, and honestly iconic.
  • max β€” the maximum index to check. that’s your limit, bestie.

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, mas_next_range sets mas->index and mas->last to the range, fr fr.

⚠️ you must hold rcu_read_lock or the write lock β€” no cap, this is mandatory, do not skip the lock vibe check 😭

and yes, it can return the zero entry. not me warning you about the zero entry πŸ’€ it’s literally allowed.

πŸ’– RETURN πŸ’–

returns the next entry, or NULL 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./lib/maple_tree.c, plus all these maple-tree-adjacent besties:


mwah πŸ’‹ β€” source: ./lib, dated October 2026 🌈

πŸ“¦ where this page comes from