sg_miter_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sg_miter_next(9) β€” like, the actual manual page, bestie

Ok so first things first: this is a page from the Kernel API Manual, and today's main character is sg_miter_next. Buckle up, it's short but it matters. πŸŽ€


✨ NAME ✨

sg_miter_next β€” proceed mapping iterator to the next mapping

🌸 SYNOPSIS 🌸

bool sg_miter_next (struct sg_mapping_iter *miter );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • miter β€” the sg mapping iter you want to proceed, bestie. that's the whole vibe of this function tbh.

πŸ’– DESCRIPTION πŸ’–

Ok so here's the tea: sg_miter_next proceeds miter to the next mapping. ✨

Now, important detail, don't skip this β€” miter should have been started using sg_miter_start. Like, it needs to already exist and be set up properly, no cap. πŸ™ˆ

On successful return, three things point to the current mapping:

  • miter->page
  • miter->addr
  • miter->length

All three, together, pointing right at the current mapping. Gorgeous. Literally it's giving "the whole squad showed up." πŸ‘‘

🌈 CONTEXT 🌈

May sleep if !SG_MITER_ATOMIC && !SG_MITER_LOCAL.

So like… only under those exact conditions, and nowhere else. Read those flags twice, fr fr. 🫢

⭐ RETURN ⭐

  • true β€” if miter contains the next mapping. slay. πŸ’…
  • false β€” if end of sg list is reached. that's it, we're done, no more mappings, the era has ended. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./lib/scatterlist.c β€” and like, the entire scatterlist extended family, honestly:

That's the whole group chat, every single one of them, no one left on read. πŸ’œ


and yeah β€” ./lib, October 2026. that's where this page lives and when it was dated. 🧚 consider that the cute lil sign-off, mwah πŸ’‹
πŸ“¦ where this page comes from