dma_resv_ite...rst_unlocked(9)
π dma_resv_ite...rst_unlocked(9) β Kernel API Manual, bestie edition π
okay so you found the kernel API manual, and the page you're on is dma_resv_ite...rst_unlocked(9) β yes the name is truncated with dots like that, that's just how it's printed, don't come for me π. It lives in the Kernel API Manual, and we're gonna get through it together. grab a lil snack π
β¨ NAME β¨
dma_resv_iter_first_unlocked β literally just the first fence in an unlocked dma_resv obj. that's the whole vibe. π
πΈ SYNOPSIS πΈ
struct dma_fence * dma_resv_iter_first_unlocked (struct dma_resv_iter
*cursor );
like, it hands you back a struct dma_fence * and takes one cursor. slay. β¨
π¦ ARGUMENTS π¦
cursorβ the cursor with the current position. yes bestie it's exactly what it sounds like, it's holding your place in the iteration π«Ά
π DESCRIPTION π
so after you call this, the rest of the fences get iterated with dma_resv_iter_next_unlocked. that's your next move, no cap.
β οΈ okay now the important part, listen up: beware that the iterator can be restarted. not me warning you about the plot twist π
so if your code is out here accumulating statistics or similar, you need to check for that restart with dma_resv_iter_is_restarted. like, actually check. fr fr.
and for this exact reason β the whole restart possibility β prefer the locked dma_resv_iter_first whenever possible. it's giving "the safe one is right there, bestie". π
and what does it return? the first fence from an unlocked dma_resv obj. iconic. returns the first fence, that's the whole job, periodt. π
π SEE ALSO π
- Kernel file
./drivers/dma-buf/dma-resv.c Reservation Object Overview(9)dma_resv_init(9)dma_resv_fini(9)dma_resv_reserve_fences(9)dma_resv_reset_max_fences(9)dma_resv_add_fence(9)dma_resv_replace_fences(9)dma_resv_iter_next_unlocked(9)dma_resv_iter_first(9)dma_resv_iter_next(9)dma_resv_copy_fences(9)dma_resv_get_fences(9)dma_resv_get_singleton(9)dma_resv_wait_timeout(9)dma_resv_set_deadline(9)dma_resv_test_signaled(9)dma_resv_describe(9)
like, that's the whole friend group right there π§ iykyk π
and that's the page!! it came from ./drivers/dma-buf, dated October 2026, and it goes by dma_resv_ite...rst_unlocked(9) β mwah, go read the safe locked one, ily, bye πππΈ
π¦ 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