dma_fence_is_signaled(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the dma_fence_is_signaled(9) page straight out of the Kernel API Manual β€” yes it's a kernel thing, no you don't have to be scared, we're gonna get through it together 🫢✨

🌸 NAME 🌸

dma_fence_is_signaled β€” the little function that tells you whether a fence has been signaled yet. that's it, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

bool dma_fence_is_signaled (struct dma_fence *fence );

like, look at her. one argument. returns a bool. main character energy honestly πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • fence β€” the fence you wanna check. that's the one, bestie, that's who we're asking about πŸ”

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea β˜• β€” this function returns true if the fence was already signaled, and false if it wasn't. simple as that.

BUT β€” and this is the important part, don't skip it β€” because this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback, dma_fence_wait or dma_fence_enable_signaling haven't been called before. so like, if nobody set up the signaling, she might just keep saying false forever. not her fault, she's just reporting what she knows 😭

lowkey this is the one that gets people β€” no cap, check that the signaling machinery is actually running before you trust a false πŸ’€

Also, for seqno fences it's recommended to call dma_fence_signal when the operation is complete. why? because it makes it possible to prevent issues from wraparound</> between time of issue and time of use β€” by checking the return value of this function before calling hardware-specific wait instructions. so you check first, wait second. that's the order. iykyk 🌈

See also dma_fence_is_signaled_locked β€” her locked cousin, iconic in her own right πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

okay this list is long but we're not skipping a single one, we respect every link here 🫑

Kernel file ./include/linux/dma-fence.h:

like, twenty-five whole friends. she's got a whole group chat going on πŸ’…βœ¨


and that's the page, bestie πŸŽ€ this came out of ./include/linux, dated October 2026, and the whole thing is filed under dma_fence_is_signaled(9) β€” go forth, check your fences, slay πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from