assoc_array_find(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ assoc_array_find(9) πŸŽ€

okay so bestie, welcome to the Kernel API Manual page for assoc_array_find. This is the part where we find an object by index key, and honestly it's giving focused-search energy. ✨

πŸ’– NAME πŸ’–

assoc_array_find β€” find an object by index key. periodt. πŸ’…

✨ SYNOPSIS ✨

void * assoc_array_find (const struct assoc_array *array , const struct assoc_array_ops *ops , const void *index_key );

🫢 ARGUMENTS 🫢

  • array β€” the associative array to search. This is the array, bestie. 🫢
  • ops β€” the operations to use. no cap, these are the ops.
  • index_key β€” the key to the object. iykyk.

🌸 DESCRIPTION 🌸

Ngl, the way this works is: you find an object in an associative array by walking through the internal tree to the node that should contain the object, and then searching the leaves there. Literally a tree walk and a leaf search, no cap. If the requested object was not found in the array, NULL is returned. That's the not-found signal, bestie. 🫢

🚨 hard requirement, bestie, and I cannot stress this enough: the caller must hold the RCU read lock or better. No cap, do not skip this. fr fr.

πŸ¦‹ SEE ALSO πŸ¦‹

Peep the kernel file ./lib/assoc_array.c and these sibling pages β€” all of them, not me cherry-picking:


mwah πŸ’‹ this page lives in ./lib, dated October 2026, and it's the assoc_array_find(9) entry β€” bye bestie! 🫢

πŸ“¦ where this page comes from