sg_mark_end(9)
π sg_mark_end(9) β like, the Kernel API Manual, bestie π
okay so picture this: you're reading the Kernel API Manual, section 9, and the page you've landed on is all about sg_mark_end. yes it's a scatterlist thing. yes you're gonna get it. let's go π
β¨ NAME β¨
sg_mark_end β the little function that says "this is the end, bestie, no more entries after this one" π
πΈ SYNOPSIS πΈ
void sg_mark_end (struct scatterlist *sg );
that's it. that's the whole signature. one function, one pointer, zero drama π«Ά
π¦ ARGUMENTS π¦
sgβ the SG entry (aScatterlist, literally) you're about to flag as the last one. this is the girl. the main character of the operation π
π DESCRIPTION π
So what does it actually do? It marks the sg entry you passed in as the termination point for the sg table. Basically you're putting a little "the end βοΈ" sticker on it so everyone knows the list stops here.
And the receipts? If you hit this entry with a call to sg_next, it'll come back with NULL. no more entries, no cap. that's the whole vibe check π₯
ngl it's a tiny function, but it's iconic β without it your scatterlist would just keep going forever like a group chat with no one leaving π
β SEE ALSO β
- Kernel file
./tools/virtio/linux/scatterlist.h sg_assign_page(9)sg_set_page(9)sg_chain(9)sg_unmark_end(9)β the one that takes the sticker back off, iykyk π
and that's the page!! π this lil gem lives in ./tools/virtio/linux, and the version we're looking at is dated October 2026 β so go forth, mark your ends, and slay your scatterlists, bestie ππ§π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms