kho_radix_init_tree(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– kho_radix_init_tree(9) β€” like, the radix tree glow-up page πŸ’–

okay so bestie, welcome to the Kernel API Manual entry for kho_radix_init_tree β€” yes it's a kernel function, yes it's important, and yes I'm gonna explain it so you actually get it 🫢


✨ NAME ✨

kho_radix_init_tree β€” initialize the radix tree. that's it, that's the whole vibe ✨


🌸 SYNOPSIS 🌸

int kho_radix_init_tree (struct kho_radix_tree *tree , struct
kho_radix_node *root );

literally just hand it a tree and a root and it does its thing πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • tree β€” the tree to initialize. the main character, the one getting set up πŸ’–
  • root β€” root table of the radix tree. the foundation, the anchor, the roots of the whole situation 🌱

πŸ¦‹ DESCRIPTION πŸ¦‹

so what it does: it initializes the radix tree with the given root node. simple, iconic, no cap ✨

now here's the part you actually need to remember:

  • if root is NULL, an empty root table is allocated for you. free real estate, the function handles it 🎁
  • if root is not NULL, then it's the caller's responsibility to make sure the root is valid and in the correct format. that's on you bestie, not on the function 😭 like it's not gonna double-check your work, so do it right πŸ’€
no cap: passing a bad root isn't a "the function will figure it out" situation. it won't. valid and correct format, or it's giving chaos πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

  • 0 on success β€” slay, we ate πŸ’…
  • -errno on failure β€” it tells you what went wrong, king behavior πŸ‘‘

🌈 SEE ALSO 🌈

kernel file: ./kernel/liveupdate/kexec_handover.c

and the whole friend group πŸ‘―β™€οΈ:

kho_encode_radix_key(9), kho_decode_radix_key(9), kho_radix_add_key(9), kho_radix_del_key(9), kho_radix_destroy_tree(9), kho_radix_walk_tree(9), kho_restore_folio(9), kho_restore_pages(9), kho_reserve_scratch(9), kho_add_subtree(9), kho_preserve_folio(9), kho_unpreserve_folio(9), kho_preserve_pages(9), kho_unpreserve_pages(9), kho_preserve_vmalloc(9), kho_unpreserve_vmalloc(9), kho_restore_vmalloc(9), kho_alloc_preserve(9), kho_unpreserve_free(9), kho_restore_free(9), is_kho_boot(9), kho_retrieve_subtree(9)


and that's the page!! mwah πŸ’‹ this gem comes to you from ./kernel/liveupdate, dated October 2026 β€” go read it again if you need to, i'll wait πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from