assoc_array_find(9)
π 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:
assoc_array_iterate(9)assoc_array_destroy(9)assoc_array_insert(9)assoc_array_insert_set_object(9)assoc_array_delete(9)assoc_array_clear(9)assoc_array_apply_edit(9)assoc_array_cancel_edit(9)assoc_array_gc(9)
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
- 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