assoc_array_delete(9)
π assoc_array_delete(9) π
okay so bestie, this one lives in the Kernel API Manual and it's literally called assoc_array_delete β yes, she's a kernel function, yes she's iconic π
β¨ NAME β¨
assoc_array_delete β script the deletion of an object from an associative array ποΈβ¨
πΈ SYNOPSIS πΈ
struct assoc_array_edit * assoc_array_delete (struct assoc_array *array
, const struct assoc_array_ops *ops , const void *index_key );
like, look at her go π so many parameters but she's serving π«Ά
π ARGUMENTS π
arrayβ the array you're searching, bestie. that's the one. πopsβ the operations to use. the whole vibe of how she works π οΈindex_keyβ the key to the object. iykyk π
π¦ DESCRIPTION π¦
so the whole point: this function precalculates and preallocates a script for the deletion of an object from an associative array. no cap. it hands you back an edit script that you can either apply or cancel β your call, main character π
the function returns a pointer to an edit script if the object was found, NULL if the object was not found or -ENOMEM π (yes, that's a thing it returns, we don't ask questions)
β οΈ okay so real talk: the caller should lock against other modifications, and must continue to hold the lock until assoc_array_apply_edit has been called. do not let go early. periodt π
accesses to the tree may totally take place concurrently with this function, provided they hold the RCU read lock π§β¨
π SEE ALSO π
kernel file ./lib/assoc_array.c π and honestly the whole friend group:
assoc_array_iterate(9)assoc_array_find(9)assoc_array_destroy(9)assoc_array_insert(9)assoc_array_insert_set_object(9)assoc_array_clear(9)assoc_array_apply_edit(9)assoc_array_cancel_edit(9)assoc_array_gc(9)
π and that's the whole page, bestie π this one's from the ./lib source, dated October 2026, and she answers to assoc_array_delete(9) π slay, go lock your stuff before you call assoc_array_apply_edit β¨π«Ά
π¦ 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