STRUCT DMA_FENCE_CHAIN(9)
π struct dma_fence_chain(9) π
okay so bestie, welcome to the Kernel API Manual β this is the tea on struct dma_fence_chain(9), and it is literally the blueprint for one single node in a fence chain. yes, one. it's giving "small but mighty" energy fr fr π
β¨ NAME β¨
struct dma_fence_chain β a fence that represents a node of a fence chain πΈ
β¨ SYNOPSIS β¨
struct dma_fence_chain {
struct dma_fence base;
struct dma_fence *prev;
u64 prev_seqno;
struct dma_fence *fence;
union {
struct dma_fence_cb cb;
struct irq_work work;
};
};
β¨ Members β¨
baseβ the fence base class, the whole foundation of the vibe π«Άprevβ the previous fence in the chain, aka the one that came before, holding it down πprev_seqnoβ the original previous seqno from before garbage collection happened. yeah, it remembers the pre-glow-up version π¦fenceβ the encapsulated fence, wrapped up cute like a little gift π{unnamed_union}β anonymous. no name, just vibes β¨cbβ the callback for signaling. this is what's used to add the callback for signaling the completion of the fence chain. Never used at the same time as the irq work β they do not share the aux cord, periodt πworkβ the irq work item for signaling. it's the irq work structure that lets us add the callback without running into lock inversion, which is lowkey iconic problem-solving. also never used at the same time as the callback β one or the other, no cap π«
bestie pls note:cbandworkare mutually exclusive. they live in the same anonymous union and they are NOT meant to be used together. do not try to make them coexist, i'm begging π
π SEE ALSO π
peep the Kernel file ./include/linux/dma-fence-chain.h for the whole friend group π
to_dma_fence_chain(9)dma_fence_chain_contained(9)dma_fence_chain_alloc(9)dma_fence_chain_free(9)dma_fence_chain_for_each(9)
and that's the whole page bestie!! π§β¨ this one came straight out of <purple>./include/linux</purple>, dated October 2026, section 9 of the Kernel API Manual β go forth and slay your fence chains ππ₯π
π¦ 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