17#define errQUEUE_EMPTY pdFALSE
18#define errQUEUE_FULL pdFALSE
38 struct Timeout timeout = {0, waitTicks};
43 return errQUEUE_EMPTY;
58 struct Timeout timeout = {0, waitTicks};
59 int rv =
queue_send(&timeout, queueHandle, buffer);
79 *pxHigherPriorityTaskWoken =
pdFALSE;
83#ifndef CHERIOT_NO_AMBIENT_MALLOC
94 &timeout, MALLOC_CAPABILITY, &ret, uxItemSize, uxQueueLength);
FreeRTOS queue compatibility APIs.
static void vQueueDelete(QueueHandle_t xQueue)
Delete a queue.
static BaseType_t xQueueReceive(QueueHandle_t queueHandle, void *buffer, TickType_t waitTicks)
Receive a message on a queue.
struct MessageQueue * QueueHandle_t
Queue handle.
static BaseType_t xQueueSendToBack(QueueHandle_t queueHandle, const void *buffer, TickType_t waitTicks)
Send a message to the queue.
static UBaseType_t uxQueueMessagesWaiting(const QueueHandle_t xQueue)
Return the number of messages waiting in a queue.
static QueueHandle_t xQueueCreate(UBaseType_t uxQueueLength, UBaseType_t uxItemSize)
Create a queue that can store uxQueueLength messages of size uxItemSize.
static BaseType_t xQueueSendToBackFromISR(QueueHandle_t queueHandle, const void *buffer, BaseType_t *pxHigherPriorityTaskWoken)
Send a message to the queue from an ISR.
#define pdPASS
FreeRTOS definition indicating success.
int32_t BaseType_t
FreeRTOS default signed integer type.
Ticks TickType_t
FreeRTOS type for durations expressed in ticks.
#define pdFALSE
FreeRTOS definition of false.
uint32_t UBaseType_t
FreeRTOS default unsigned integer type.
int __cheri_libcall queue_send(TimeoutArgument timeout, struct MessageQueue *handle, const void *src)
Send a message to the queue specified by handle.
int __cheri_libcall queue_destroy(AllocatorCapability heapCapability, struct MessageQueue *handle)
Destroys a queue.
int __cheri_libcall queue_create(TimeoutArgument timeout, AllocatorCapability heapCapability, struct MessageQueue **outQueue, size_t elementSize, size_t elementCount)
Allocates space for a queue using heapCapability and stores a handle to it via outQueue.
int __cheri_libcall queue_items_remaining(struct MessageQueue *handle, size_t *items)
Returns the number of items in the queue specified by handle via items.
int __cheri_libcall queue_receive(TimeoutArgument timeout, struct MessageQueue *handle, void *dst)
Receive a message over a queue specified by handle.
Structure representing a queue.
Structure representing a timeout.
static const Ticks UnlimitedTimeout
Value indicating an unbounded timeout for use with Timeout.