dma_resv_get_singleton(9)
π
dma_resv_get_singleton β the dma_resv_get_singleton(9) page, bestie edition
okay so real talk, this is a kernel API manual page, and it's literally about getting one fence to rule them all β¨
π NAME π
dma_resv_get_singleton β Get a single fence for all the fences. that's it, that's the whole vibe π«Ά
β SYNOPSIS β
int dma_resv_get_singleton (struct dma_resv *obj , enum dma_resv_usage
usage , struct dma_fence **fence );
not me putting the whole signature in a code block so nothing gets mistyped π keep it exactly like that, every pointer and comma, fr fr.
πΈ ARGUMENTS πΈ
objβ the reservation object. your main character struct πusageβ controls which fences to include, seeenum dma_resv_usage. so like, it's the vibe check for which fences get invited to the party πfenceβ the resulting fence. the one (1) fence that comes out the other side π¦
β¨ DESCRIPTION β¨
So what does it actually do? It gets a single fence representing all the fences inside the resv object. like a group photo but make it a fence πΈ
Returns either 0 for success or -ENOMEM. that's the whole return menu, no hidden items π
β οΈ Warning: This can't be used like this when adding the fence back to theresvobject, since that can lead to stack corruption when finalizing thedma_fence_array. like, seriously, do NOT do that. this is the "danger, do not touch" part of the page, and I'm not being dramatic, it's literally in the manual ππ₯
Returns 0 on success and negative error values on failure. yes, it says the success/failure thing twice, and yes, I'm keeping both because you don't skip details in this house π
π 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_first_unlocked(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_wait_timeout(9)dma_resv_set_deadline(9)dma_resv_test_signaled(9)dma_resv_describe(9)
every single one of them, in the exact order, because that's the whole squad π«Άβ¨
okay that's the page!! mwah π this icon came from ./drivers/dma-buf, dated October 2026, and it's filed under dma_resv_get_singleton(9) β slay, go read a fence, 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