dma_buf_fd(9)
π dma_buf_fd(9) π
okay so this is a page from the Kernel API Manual, bestie β it's dma_buf_fd(9), and it's literally the tiniest little function with the biggest "hand you a file descriptor" energy. no cap. π¦
β¨ NAME β¨
dma_buf_fd β returns a file descriptor for the given struct dma_buf π
like, you've got a struct dma_buf sitting there and you're like "girl give me an fd" and she does. iconique.
πΈ SYNOPSIS πΈ
int dma_buf_fd (struct dma_buf *dmabuf , int flags );
that's it. that's the whole vibe check. a struct dma_buf * and an int flags, and you get an int back. π«Ά
π ARGUMENTS π
dmabufβ [in] pointer to thedma_buffor which the fd is required. as in, the buffer that's about to become a file descriptor. main character energy fr fr. πflagsβ [in] the flags to give to the fd. you're passing them straight through, no gatekeeping. β
π§ DESCRIPTION π§
On success, it returns an associated 'fd'. Else, it returns error. π
that's the whole description. not me expecting more. that's it. success = you get the fd you asked for, and if it doesn't work out you get an error instead. periodt. π
π₯ SEE ALSO π₯
okay this is the part where she name-drops literally everyone at the function. the whole dma-buf friend group shows up. π
- Kernel file
./drivers/dma-buf/dma-buf.cβ the source file, the mothership, the birthplace π dma_buf_iter_begin(9)dma_buf_iter_next(9)implicit fence polling(9)dma_buf_set_name(9)dma buf device access(9)dma_buf_export(9)dma_buf_fd_install(9)dma_buf_get(9)dma_buf_put(9)locking convention(9)dma_buf_dynamic_attach(9)dma_buf_attach(9)dma_buf_detach(9)dma_buf_pin(9)dma_buf_unpin(9)dma_buf_map_attachment(9)dma_buf_map_attachment_unlocked(9)dma_buf_unmap_attachment(9)dma_buf_unmap_attachment_unlocked(9)dma_buf_attach_revocable(9)dma_buf_invalidate_mappings(9)cpu access(9)dma_buf_begin_cpu_access(9)dma_buf_end_cpu_access(9)dma_buf_mmap(9)dma_buf_vmap(9)dma_buf_vmap_unlocked(9)dma_buf_vunmap(9)dma_buf_vunmap_unlocked(9)
like i said. the whole group chat. π
and that's the page!! πβ¨ππ¦πΈπ π«Ά
this cutie lives in ./drivers/dma-buf, stamped October 2026, and she answers to dma_buf_fd(9) β go say hi, she's obsessed with you. ππ§ββοΈβ
π¦ 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