STRUCT IIO_DMA_BUFFER_QUEUE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct iio_dma_buffer_queue(9) πŸ¦‹

okay so bestie, you're reading the Kernel API Manual, section 9, and today's main character is this struct. buckle up πŸ’…

✨ NAME ✨

struct iio_dma_buffer_queue β€” the DMA buffer base structure, aka the whole vibe foundation for everything DMA-buffer-y in IIO πŸ”₯

🌸 SYNOPSIS 🌸

struct iio_dma_buffer_queue {
    struct iio_buffer buffer;
    struct device *dev;
    const struct iio_dma_buffer_ops *ops;
    struct mutex lock;
    spinlock_t list_lock;
    struct list_head incoming;
    bool active;
    atomic_t num_dmabufs;
    struct iio_dma_buffer_queue_fileio fileio;
 };

ngl, just look at it. it's giving "everything you need, nothing you don't" 😌


πŸŽ€ Members πŸŽ€

  • buffer β€” the IIO buffer base structure, the parent-buffer energy this whole thing is built on top of πŸ’–
  • dev β€” the parent device, literally the device this queue belongs to 🫢
  • ops β€” the DMA buffer callbacks, i.e. where all the actual function pointers live ⭐
  • lock β€” this mutex protects the incoming list, active, and the fields inside the fileio substruct. respect the lock bestie, it's holding a lot together πŸ”’
  • list_lock β€” the spinlock for the lists that contain blocks which can be modified in atomic context, plus the blocks on those lists. specifically that's the outgoing queue list and typically also a list of active blocks in the part that handles the DMA controller. yes, it's a lot of responsibility, and yes, she's slaying it ✨
  • incoming β€” the list of buffers chillin' on the incoming queue, like the waiting room but for buffers πŸ’…
  • active β€” a bool that tells you whether the buffer is currently active. is she on or is she off? this field knows πŸ‘‘
  • num_dmabufs β€” the total number of DMABUFs attached to this queue, an atomic_t so it stays correct no matter what 😀
  • fileio β€” the FileIO state, keeping all that file I/O business cozy in its little substruct πŸ“

πŸ‘€ SEE ALSO πŸ‘€

  • Kernel file ./include/linux/iio/buffer-dma.h
  • enum iio_block_state(9)
  • struct iio_dma_buffer_block(9)
  • struct iio_dma_buffer_queue_fileio(9)
  • struct iio_dma_buffer_ops(9)

go read those too, iykyk 🌈


and that's the whole page, bestie!! no cap, you ate this one 🧚 this lore came straight out of ./include/linux/iio, dated October 2026 β€” mwah, catch you in the next manpage πŸ’œπŸŽ€

πŸ“¦ where this page comes from