cb710_sg_dw...d_next_block(9)
π cb710_sg_dwiter_read_next_block(9) β from the Kernel API Manual, bestie π
okay so real talk, this is a kernel API manual page and it's genuinely kind of a serve once you get what it's doing. grab a strawberry drink π and let's go.
β¨ NAME β¨
cb710_sg_dwiter_read_next_block β the function that grabs the next 32-bit word out of an sg buffer π
π SYNOPSIS π
uint32_t cb710_sg_dwiter_read_next_block (struct sg_mapping_iter *miter
);
π«Ά ARGUMENTS π«Ά
miterβ the sg mapping iterator you're using to read. that's it, that's the whole vibe check β¨
πΈ DESCRIPTION πΈ
so it returns the 32-bit word that starts at the byte your miter is pointing at, and it handles any alignment issues along the way. like, alignment? never heard of her. the function simply takes care of it. π
here's the part where you gotta pay attention though: bytes that live past the buffer's end are not accessed (not read, like at all), but they do come back as zeroes. so no sneaky out-of-bounds reading, no cap. π«Ά
then miter gets advanced by 4 bytes β or to the end of the buffer, whichever is closer. whichever is closer!! it's not gonna yeet itself past the edge π
π¦ CONTEXT π¦
same requirements as in sg_miter_next. no extra lore, just match what that one needs and you're golden π
π₯ RETURN π₯
the 32-bit word you just read. that's it. that's the return. iconic of it honestly π
π SEE ALSO π
- Kernel file
./drivers/misc/cb710/sgbuf2.c cb710_sg_dwiter_write_next_block(9)β the sibling, the other main character β
and that's the whole page bestie! huge thank you to the kernel file ./drivers/misc/cb710 for this one, dated October 2026, from the Kernel API Manual π§π mwah, go read some buffers π
π¦ 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