dma_fence_wait_timeout(9)
β¨ dma_fence_wait_timeout(9) β¨
okay so this is a page from the Kernel API Manual β yes, the actual kernel docs, we're fancy now π
β and it's about dma_fence_wait_timeout, which is literally the "just sit there and chill until the fence gets signaled" function. bestie, it's giving waiting room energy but make it kernel π₯
π NAME π
dma_fence_wait_timeout β sleep until the fence gets signaled, or until the timeout elapses π΄β°
πΈ SYNOPSIS πΈ
signed long dma_fence_wait_timeout (struct dma_fence *fence , bool intr , signed long timeout );
that's the whole vibe check, no cap β¨
π ARGUMENTS π
fenceβ the fence we're waiting on π¦ the main character of this whole situation, honestly.intrβ if true, do an interruptible wait π meaning you can be woken up early, bestie.timeoutβ the timeout value in jiffies, orMAX_SCHEDULE_TIMEOUTβ³ (iykyk β that one means "basically forever").
π DESCRIPTION π
So here's the tea π: this returns -ERESTARTSYS if it gets interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. Other error values may also be returned on custom implementations β so like, don't assume it's only those three, mmkay? π
It performs a synchronous wait on this fence. Like, it's not doing anything cute in the background, it is literally waiting. periodt.
β οΈ ok this part is important, no skipping π: it is assumed the caller directly or indirectly (buf-mgr between reservation and committing) holds a reference to the fence. Otherwise the fence might be freed before return, resulting in undefined behavior. that's the "do not do this, I'm so serious" warning π«Ά please hold your reference, bestie, the fence deserves to stay alive until you're done.
Also see also dma_fence_wait and dma_fence_wait_any_timeout π β the little family of wait functions, they're all icons in their own right.
β SEE ALSO β
- Kernel file
./drivers/dma-buf/dma-fence.cπ DMA fences overview(9)fence cross-driver contract(9)dma_fence_get_stub(9)dma_fence_allocate_private_stub(9)dma_fence_context_alloc(9)fence signalling annotation(9)dma_fence_begin_signalling(9)dma_fence_end_signalling(9)dma_fence_signal_timestamp_locked(9)dma_fence_signal_timestamp(9)dma_fence_signal_locked(9)dma_fence_check_and_signal_locked(9)dma_fence_check_and_signal(9)dma_fence_signal(9)dma_fence_release(9)dma_fence_free(9)dma_fence_enable_signaling(9)dma_fence_add_callback(9)dma_fence_get_status(9)dma_fence_remove_callback(9)dma_fence_default_wait(9)dma_fence_wait_any_timeout(9)deadline hints(9)dma_fence_set_deadline(9)dma_fence_describe(9)dma_fence_init(9)dma_fence_init64(9)dma_fence_driver_name(9)dma_fence_timeline_name(9)
that's a whole friend group right there, obsessed π β¨
π« and that's the page!! π« source: ./drivers/dma-buf, dated October 2026 β mwah, sending you all the love and the correct fence references ππ«Άπ
π¦ 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