STRUCT ITERATE_SPECIAL_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct iterate_special_ctx(9) β€” bestie edition πŸŽ€

okay so this is a page from the Kernel API Manual and honestly? it's a tiny little struct but she's iconic in her own way. say hi to struct iterate_special_ctx β€” the HW module special block iterator ✨


🌸 NAME 🌸

struct iterate_special_ctx β€” HW module special block iterator. that's it, that's the whole vibe. she iterates. over special blocks. in HW modules. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct iterate_special_ctx {
    int (*fn)(struct hl_device *hdev, u32 block_id, u32 major, u32
minor, u32 sub_minor, void *data);
    void *data;
 };

ngl bestie, look at that function pointer. she's gorgeous. πŸ”₯


πŸŽ€ Members πŸŽ€

  • fn β€” the function you're gonna apply to each HW module special block instance. like, every single one. she gets applied everywhere, no skipping, no "not me" energy. 🫢
  • data β€” optional internal data that gets handed off to the function iterator. optional, so like... bring it or don't, your call bestie πŸ™ˆ

⭐ SEE ALSO ⭐

  • Kernel file ./drivers/accel/habanalabs/common/security.h β€” go read it, iykyk πŸ‘‘

okay and for the cute little sign-off: this whole thing lives under ./drivers/accel/habanalabs/common, she's dated October 2026, and she's filed as struct iterate_special_ctx(9). periodt. πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from