Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Queue Element Structure. More...

#include <zephyr/mpipe/base/mpipe_queue.h>

Data Fields

struct mpipe_transform transform
 Base transform element.
struct mpipe_thread thread
 Dedicated thread for downstream processing.
struct k_msgq msgq
 Queue for storing incoming buffer pointers.
char msgq_buffer [(CONFIG_MPIPE_BASE_QUEUE_MAX_SIZE+2) *sizeof(void *)]
 Backing storage for the message queue, sized for the largest queue plus the EOS and pause sentinels.
uint8_t size
 Number of buffers the queue can hold, bounded by CONFIG_MPIPE_BASE_QUEUE_MAX_SIZE and applied on READY -> PAUSED.
uint8_t leak
 Leak policy of a full queue, an mpipe_base_queue_leak.
atomic_t flushing
 Flushing flag.

Detailed Description

Queue Element Structure.

The queue element acts as a thread boundary in a pipeline. Its chain_fn enqueues buffers into an internal buffer queue. A dedicated thread then dequeues buffers and drives downstream elements.

Field Documentation

◆ flushing

atomic_t mpipe_queue::flushing

Flushing flag.

When set (on PAUSED -> READY), the chain_fn drops incoming buffers instead of enqueuing them. This releases any upstream producer blocked in k_msgq_put() during teardown and prevents a late buffer from leaking into an already-drained queue (e.g. behind a tee).

◆ leak

uint8_t mpipe_queue::leak

Leak policy of a full queue, an mpipe_base_queue_leak.

◆ msgq

struct k_msgq mpipe_queue::msgq

Queue for storing incoming buffer pointers.

A k_fifo would not do here as it keeps no storage of its own: it chains its items through a link field inside each item, so a given buffer can be on one fifo at a time. A tee pushes the same buffer to every branch, and a branch may start with a queue, so one buffer must be able to wait in several queues at once. The k_msgq stores its own copy of the pointer which makes that possible.

◆ msgq_buffer

char mpipe_queue::msgq_buffer[(CONFIG_MPIPE_BASE_QUEUE_MAX_SIZE+2) *sizeof(void *)]

Backing storage for the message queue, sized for the largest queue plus the EOS and pause sentinels.

◆ size

uint8_t mpipe_queue::size

Number of buffers the queue can hold, bounded by CONFIG_MPIPE_BASE_QUEUE_MAX_SIZE and applied on READY -> PAUSED.

◆ thread

struct mpipe_thread mpipe_queue::thread

Dedicated thread for downstream processing.

◆ transform

struct mpipe_transform mpipe_queue::transform

Base transform element.


The documentation for this struct was generated from the following file: