objagg_obj_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… objagg_obj_get(9) β€” the kernel API manual, bestie edition

okay so this is a page straight out of the Kernel API Manual, and it's all about objagg_obj_get β€” the glow-up function that gets you an object within an objagg instance ✨


🌸 NAME 🌸

objagg_obj_get β€” literally gets an object within an objagg instance, that's the whole vibe 🫢


✨ SYNOPSIS ✨

struct objagg_obj * objagg_obj_get (struct objagg *objagg , void *obj );

πŸŽ€ ARGUMENTS πŸŽ€

  • objagg β€” your objagg instance. the main character, the container, the whole situation πŸ’…
  • obj β€” a user-specific private object pointer. yes it's literally just called obj. iconic naming, no notes πŸ”₯

πŸ’€ NOTE πŸ’€

bestie pay attention, this part matters 😭

all locking must be provided by the caller. not the function's job, not its problem β€” you bring the locks, queen πŸ‘‘

Size of the obj memory is specified in objagg->ops.

There are 3 main options this function wraps β€” like a lil choose-your-own-adventure, but make it kernel 🌈

  1. The object according to obj already exists. In that case the reference counter is incremented and the object is returned. ate, no crumbs, done πŸ’–
  2. The object does not exist, but it can be aggregated within another object. In that case, user ops->delta_create is called to obtain delta data, and a new object is created with the returned user-delta private pointer πŸ¦‹
  3. The object does not exist and cannot be aggregated into any of the existing objects. In that case, user ops->root_create is called to create the root, and a new object is created with the returned user-root private pointer 🌱

It returns a pointer to objagg object instance in case of success β€” otherwise it returns pointer error using the ERR_PTR macro 🚨 (so like, check that thing, fr fr πŸ™ˆ)


🧚 SEE ALSO 🧚

Kernel file ./lib/objagg.c, plus these certified baddies that you should absolutely check out:


and that's the whole page, bestie 🫢✨ this one lives down in ./lib, dated October 2026 β€” go forth and get those objects, you've got this πŸ’œπŸŽ€

πŸ“¦ where this page comes from