Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mpipe_queue.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
16
17#ifndef ZEPHYR_INCLUDE_MPIPE_BASE_MPIPE_QUEUE_H_
18#define ZEPHYR_INCLUDE_MPIPE_BASE_MPIPE_QUEUE_H_
19
26
27#include <zephyr/kernel.h>
28#include <zephyr/sys/atomic.h>
29
33
37enum {
44};
45
62
84 struct k_msgq msgq;
89 char msgq_buffer[(CONFIG_MPIPE_BASE_QUEUE_MAX_SIZE + 2) * sizeof(void *)];
104};
105
114int mpipe_queue_init(struct mpipe_queue *queue, uint8_t id);
115
117
118#endif /* ZEPHYR_INCLUDE_MPIPE_BASE_MPIPE_QUEUE_H_ */
long atomic_t
Atomic integer variable.
Definition atomic_types.h:31
mpipe_base_queue_leak
What a full queue does with a new buffer.
Definition mpipe_queue.h:54
int mpipe_queue_init(struct mpipe_queue *queue, uint8_t id)
Initialize a queue element.
@ MPIPE_BASE_QUEUE_LEAK_NONE
Block the producer until a slot is free.
Definition mpipe_queue.h:56
@ MPIPE_BASE_QUEUE_LEAK_OLDEST
Drop the oldest queued buffer: the consumer always gets the freshest.
Definition mpipe_queue.h:58
@ MPIPE_BASE_QUEUE_LEAK_NEWEST
Drop the arriving buffer: the queued ones are delivered in order.
Definition mpipe_queue.h:60
@ MPIPE_PROP_BASE_QUEUE_LEAK
What a full queue does with a new buffer, an mpipe_base_queue_leak.
Definition mpipe_queue.h:43
@ MPIPE_PROP_BASE_QUEUE_SIZE
Number of buffers the queue can hold.
Definition mpipe_queue.h:39
@ MPIPE_PROP_BASE_QUEUE_THREAD_PRIORITY
Scheduling priority of the queue's thread.
Definition mpipe_queue.h:41
@ MPIPE_PROP_TRANSFORM_LAST
Last transform property marker (for validation/iteration).
Definition mpipe_transform.h:70
Public kernel APIs.
Element: the unit a pipeline is built from.
Simple wrapper of k_thread to reuse a thread's stack after its termination.
Transform: an element that turns input buffers into output buffers.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Message Queue Structure.
Definition kernel.h:5265
Queue Element Structure.
Definition mpipe_queue.h:70
atomic_t flushing
Flushing flag.
Definition mpipe_queue.h:103
struct k_msgq msgq
Queue for storing incoming buffer pointers.
Definition mpipe_queue.h:84
uint8_t size
Number of buffers the queue can hold, bounded by CONFIG_MPIPE_BASE_QUEUE_MAX_SIZE and applied on READ...
Definition mpipe_queue.h:94
struct mpipe_thread thread
Dedicated thread for downstream processing.
Definition mpipe_queue.h:74
struct mpipe_transform transform
Base transform element.
Definition mpipe_queue.h:72
uint8_t leak
Leak policy of a full queue, an mpipe_base_queue_leak.
Definition mpipe_queue.h:96
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.
Definition mpipe_queue.h:89
Simple wrapper around k_thread.
Definition mpipe_thread.h:54
Transform element structure.
Definition mpipe_transform.h:94
Header file for the Atomic operations API.