assoc_array_insert(9)
π assoc_array_insert(9) β Kernel API Manual π
πΈ NAME πΈ
Script insertion of an object into an associative array. Bestie, that is literally the whole plot. β¨
π¦ SYNOPSIS π¦
struct assoc_array_edit * assoc_array_insert (struct assoc_array *array
, const struct assoc_array_ops *ops , const void *index_key , void
*object );
π ARGUMENTS π
arrayβ the array to insert into, bestie.opsβ the operations to use.index_keyβ the key to insert at.objectβ the object to insert.
β¨ DESCRIPTION β¨
Okay so this function precalculates and preallocates a script for inserting or replacing an object in an associative array. The result is an edit script that can either be applied or cancelled. π
The function returns a pointer to an edit script or -ENOMEM. No cap. π
The caller should lock against other modifications, and must continue to hold that lock until assoc_array_apply_edit has been called. Like, do not let go early β the lock stays held until that call happens. π
Accesses to the tree may take place concurrently with this function, provided they hold the RCU read lock. π¦
π SEE ALSO π
- Kernel file
./lib/assoc_array.c assoc_array_iterate(9)assoc_array_find(9)assoc_array_destroy(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)
π source/version: ./lib Β· date: October 2026 Β· page: assoc_array_insert(9) β mwah! π
π¦ 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