mas_find_rev(9)
π mas_find_rev(9) β from the Kernel API Manual bestie β¨
Okay so this is mas_find_rev, a kernel API manual page, and I'm gonna walk you through it like we're texting at 2am π«Ά
β¨ NAME β¨
mas_find_rev β on the first call, find the first non-null entry at or below mas->index down to %min. Otherwise (bestie, read carefully π) find the first non-null entry below mas->index down to %min.
Yeah. First call is inclusive ("at or below"), later calls are strictly below. Not me pointing that out twice π
π SYNOPSIS π
void * mas_find_rev (struct ma_state *mas , unsigned long min );
That's it, that's the whole vibe. Returns a void *, takes a struct ma_state * and an unsigned long. Iconic signature tbh β
πΈ ARGUMENTS πΈ
masβ the maple state π this is the main character here.minβ the minimum value to check. Like, the floor. Do not go below the floor bestie π
π DESCRIPTION π
So, ground rules: you must hold rcu_read_lock or the write lock. Not optional, not a vibe suggestion, it's the rule π₯
If an entry exists, last and index are updated accordingly. So the state gets updated behind your back β but like, consensually, that's the whole design π
Heads up: may setmas->statustoma_underflow. Lowkey dramatic but she's allowed π
π¦ RETURN π¦
The entry, or NULL. That's the whole return section, she's short and she ate π
π SEE ALSO π
Grab a snack, this list is long and we're not skipping a single one fr fr π
mas_prealloc_calc(9), mas_wr_preallocate(9), mas_insert(9), mas_alloc_cyclic(9), mas_walk(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_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)
Also, kernel file ./lib/maple_tree.c β that's where she lives π§
All of these are from section 9 of the manual, so like, kernel-API coded. If you're looking for the userspace girlies, wrong section babes π
And that's the page!! Sign-off time: this one comes from ./lib, dated October 2026 πΈ stay hydrated, hold your locks, and go find those entries in reverse 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