tld_object_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ tld_object_init(9) β€” Kernel API Manual, but make it a group chat πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for tld_object_init(9) β€” yes that "(9)" is the section number, she's a kernel-level icon, we stan. ✨


🌸 NAME 🌸

tld_object_init β€” literally just Initialize a tld_object. That's the whole vibe. No cap. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

 int tld_object_init (struct task_struct *task , struct tld_object
*tld_obj );

like, look at her. two params. she's serving function signature realness. 🫢


πŸ’– ARGUMENTS πŸ’–

  • task β€” the task_struct of the target task πŸ‘€ like, which task are we doing this for? That one. Her.
  • tld_obj β€” a pointer to a tld_object that's about to be initialized ✨ she's the main character here, give her a glow-up

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea β˜• β€” this is what you get back:

  • Return 0 on success πŸŽ‰ slay, it worked, we love a clean zero
  • -ENODATA if user space did not initialize task local data for the current task through tld_get_data 😭 like bestie the data isn't there, there is no data, it's giving empty
  • -ENOMEM if the creation of tld_key_map fails πŸ’€ out of memory moment, the key map said "not today"
lowkey important: those error codes are the whole story of whether this call ate or flopped, so check your return value fr fr πŸ™ˆ

🌈 SEE ALSO 🌈

  • Kernel file ./tools/testing/selftests/bpf/progs/task_local_data.bpf.h πŸ“ go read the source, iykyk
  • tld_get_data(9) β€” the other half of this saga, the one that actually gets you the data 🧚

and that's the whole page, bestie πŸ’œ this little gem comes to you from ./tools/testing/selftests/bpf/... dated October 2026 β€” so like, future vibes, periodt. πŸ‘‘πŸŒΊπŸ“

πŸ“¦ where this page comes from