dma_fence_wait(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’€ NAME πŸ’€

okay so bestie, this is dma_fence_wait β€” the function that will sleep until the fence gets signaled 😴✨. We're in the Kernel API Manual, and this one is short but important, so pay attention πŸ’….


🌸 SYNOPSIS 🌸

signed long dma_fence_wait (struct dma_fence *fence , bool intr );

πŸŽ€ ARGUMENTS πŸŽ€

  • fence β€” the fence to wait on πŸ’–
  • intr β€” if true, do an interruptible wait ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

This function will return -ERESTARTSYS if interrupted by a signal, or 0 if the fence was signaled. Other error values may be returned on custom implementations. 🫢

It performs a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior. ⚠️

bestie, this is the part where you do not skip the reference check. If the caller doesn't directly or indirectly hold a reference to the fence, the fence might be freed before return, and that's undefined behavior β€” the scary kind πŸ˜­πŸ’€.

See also dma_fence_wait_timeout and dma_fence_wait_any_timeout. πŸ‘€


πŸ‘‘ SEE ALSO πŸ‘‘

the whole fence friend group showed up, periodt:


mwah πŸ’‹ that's the page! source path ./include/linux, date October 2026, manual page dma_fence_wait(9) β€” slay and wait responsibly πŸ’–

πŸ“¦ where this page comes from