mas_pause(9)
Hiii bestie! Welcome to the mas_pause(9) page from the Kernel API Manual β we're in kernel-land with maple trees, and this one is literally about pausing a walk so you can drop the lock. π§β¨
πΈ NAME πΈ
mas_pause β pause a mas_find/mas_for_each to drop the lock. Periodt. π
β¨ SYNOPSIS β¨
void mas_pause (struct ma_state *mas );
π ARGUMENTS π
masβ the maple state to pause, bestie. It's yourstruct ma_state *mas.
π DESCRIPTION π
Okay so picture this: some users need to pause a walk and drop the lock they're holding in order to yield to a higher priority thread or carry out an operation on an entry. π«Ά Those users should call this function before they drop the lock. No cap.
It resets the mas to be suitable for the next iteration of the loop after the user has reacquired the lock. So you drop the lock, do your little side quest, reacquire, and the loop is ready for its next iteration. β¨
If most entries found during a walk require you to call mas_pause, the mt_for_each iterator may be more appropriate. That's the whole vibe check. π¦
Bestie note: callmas_pausebefore dropping the lock, and remember it resetsmasfor the next loop iteration after you've reacquired the lock. π
π¦ SEE ALSO π¦
Kernel file ./lib/maple_tree.c, plus the whole reference squad: 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_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).
xoxo, from source ./lib, dated October 2026, page mas_pause(9) π
β¨
π¦ 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