mtree_empty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mtree_empty β€” okay bestie, is this tree actually empty or not

Hi hi! Welcome to the mtree_empty(9) page from the Kernel API Manual β€” yes we're in the kernel docs now, and yes we're gonna slay it. Stick around, this one is short and sweet. πŸ“


🌸 NAME

mtree_empty β€” literally just tells you if a tree has any present entries. That's it. That's the whole vibe check. ✨


πŸŽ€ SYNOPSIS

bool mtree_empty (const struct maple_tree *mt );

πŸ¦‹ ARGUMENTS

  • mt β€” the Maple Tree. That's the tree we're asking about. No cap, that's the entire argument list. πŸ’…

πŸ’– CONTEXT

Any context. Any. Context. Doesn't matter where you call it from, she's chill like that. 🧚


⭐ RETURN

Returns true if the tree contains only NULL pointers. So like β€” if everything in there is a NULL pointer, you get true. If there's anything actually present, nope. 🫢


πŸ‘‘ SEE ALSO

  • Kernel file ./include/linux/maple_tree.h 🌈
  • Maple tree flags(9)
  • MTREE_INIT(9)
  • MTREE_INIT_EXT(9)
  • mas_reset(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)

All of those are linked above, fr fr β€” go click around, it's giving maple tree lore. πŸ”₯


πŸ’€ reminder: true means only NULL pointers live in there. Not "kind of empty". Not "empty-ish". Only NULL. Periodt.

And that's the page, bestie! πŸŽ€ This little baddie lives in ./include/linux and was dated October 2026 β€” so mark your calendar, mwah πŸ’œπŸ‘‘

πŸ“¦ where this page comes from