assoc_array_delete(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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:


πŸ’œ 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