sg_miter_stop(9)
π« sg_miter_stop(9) β the kernel API manual, bestie edition π
okay so this is sg_miter_stop from the kernel API manual (section 9, yes the dev one) and honestly? she's a little function with big main-character energy. let's get into it π
β¨ NAME β¨
sg_miter_stop β stop mapping iteration. that's it. that's the whole vibe. she stops the iteration. periodt π«Ά
πΈ SYNOPSIS πΈ
void sg_miter_stop (struct sg_mapping_iter *miter );
yes bestie, it returns void β nothing comes back out, she just does the thing and leaves β¨
π ARGUMENTS π
miterβ the sg mapping iter that's getting stopped. that's the one. the target. the moment π―
π¦ DESCRIPTION π¦
okay so here's the tea β β sg_miter_stop stops the mapping iterator miter.
important detail before you go wild: miter should have been started using sg_miter_start. like, you can't stop something that was never started, that's not how any of this works π
and here's the cute part β a stopped iteration can be resumed by calling sg_miter_next on it. slay! π this is genuinely useful when resources (kmap) need to be released during iteration. so you stop, you free your stuff, you come back, you keep iterating. iconic behaviour honestly π
π CONTEXT π
"Don't care otherwise." β literally the most relaxed line in the whole kernel, she said no thoughts, head empty π
π₯ SEE ALSO π₯
kernel file ./lib/scatterlist.c plus the whole scatterlist friend group, all of them, no one left out (we don't do exclusion here π«Ά):
sg_nents(9)sg_nents_for_len(9)sg_nents_for_dma(9)sg_last(9)sg_init_table(9)sg_init_one(9)__sg_free_table(9)sg_free_append_table(9)sg_free_table(9)__sg_alloc_table(9)sg_alloc_table(9)sg_alloc_append_table_from_pages(9)sg_alloc_table_from_pages_segment(9)sgl_alloc_order(9)sgl_alloc(9)sgl_free_n_order(9)sgl_free_order(9)sgl_free(9)sg_miter_start(9)sg_miter_skip(9)sg_miter_next(9)sg_copy_buffer(9)sg_copy_from_buffer(9)sg_copy_to_buffer(9)sg_pcopy_from_buffer(9)sg_pcopy_to_buffer(9)sg_zero_buffer(9)extract_iter_to_sg(9)
reminder bestie:miterhas to be one that was started withsg_miter_startβ and if you stopped it and wanna keep going,sg_miter_nextis your girl π
β that's the whole page!! brought to you by ./lib, dated October 2026, and filed under sg_miter_stop(9) β mwah, go stop some iterators responsibly ππ§
π¦ 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