Skip to content

File queue.h

FileList > FreeRTOS > include > queue.h

Go to the source code of this file.

  • #include "task.h"

Public Types

Type Name
typedef struct QueueDefinition * QueueHandle_t
typedef struct QueueDefinition * QueueSetHandle_t
typedef struct QueueDefinition * QueueSetMemberHandle_t

Public Functions

Type Name
uint8_t ucQueueGetQueueType (QueueHandle_t xQueue)
UBaseType_t uxQueueGetQueueNumber (QueueHandle_t xQueue)
UBaseType_t uxQueueMessagesWaiting (const QueueHandle_t xQueue)
UBaseType_t uxQueueMessagesWaitingFromISR (const QueueHandle_t xQueue)
UBaseType_t uxQueueSpacesAvailable (const QueueHandle_t xQueue)
void vQueueDelete (QueueHandle_t xQueue)
void vQueueSetQueueNumber (QueueHandle_t xQueue, UBaseType_t uxQueueNumber)
void vQueueWaitForMessageRestricted (QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely)
BaseType_t xQueueAddToSet (QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet)
BaseType_t xQueueCRReceive (QueueHandle_t xQueue, void * pvBuffer, TickType_t xTicksToWait)
BaseType_t xQueueCRReceiveFromISR (QueueHandle_t xQueue, void * pvBuffer, BaseType_t * pxTaskWoken)
BaseType_t xQueueCRSend (QueueHandle_t xQueue, const void * pvItemToQueue, TickType_t xTicksToWait)
BaseType_t xQueueCRSendFromISR (QueueHandle_t xQueue, const void * pvItemToQueue, BaseType_t xCoRoutinePreviouslyWoken)
QueueHandle_t xQueueCreateCountingSemaphore (const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount)
QueueHandle_t xQueueCreateCountingSemaphoreStatic (const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t * pxStaticQueue)
QueueHandle_t xQueueCreateMutex (const uint8_t ucQueueType)
QueueHandle_t xQueueCreateMutexStatic (const uint8_t ucQueueType, StaticQueue_t * pxStaticQueue)
QueueSetHandle_t xQueueCreateSet (const UBaseType_t uxEventQueueLength)
BaseType_t xQueueGenericReset (QueueHandle_t xQueue, BaseType_t xNewQueue)
BaseType_t xQueueGenericSend (QueueHandle_t xQueue, const void *const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition)
BaseType_t xQueueGenericSendFromISR (QueueHandle_t xQueue, const void *const pvItemToQueue, BaseType_t *const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition)
TaskHandle_t xQueueGetMutexHolder (QueueHandle_t xSemaphore)
TaskHandle_t xQueueGetMutexHolderFromISR (QueueHandle_t xSemaphore)
BaseType_t xQueueGiveFromISR (QueueHandle_t xQueue, BaseType_t *const pxHigherPriorityTaskWoken)
BaseType_t xQueueGiveMutexRecursive (QueueHandle_t xMutex)
BaseType_t xQueueIsQueueEmptyFromISR (const QueueHandle_t xQueue)
BaseType_t xQueueIsQueueFullFromISR (const QueueHandle_t xQueue)
BaseType_t xQueuePeek (QueueHandle_t xQueue, void *const pvBuffer, TickType_t xTicksToWait)
BaseType_t xQueuePeekFromISR (QueueHandle_t xQueue, void *const pvBuffer)
BaseType_t xQueueReceive (QueueHandle_t xQueue, void *const pvBuffer, TickType_t xTicksToWait)
BaseType_t xQueueReceiveFromISR (QueueHandle_t xQueue, void *const pvBuffer, BaseType_t *const pxHigherPriorityTaskWoken)
BaseType_t xQueueRemoveFromSet (QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet)
QueueSetMemberHandle_t xQueueSelectFromSet (QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait)
QueueSetMemberHandle_t xQueueSelectFromSetFromISR (QueueSetHandle_t xQueueSet)
BaseType_t xQueueSemaphoreTake (QueueHandle_t xQueue, TickType_t xTicksToWait)
BaseType_t xQueueTakeMutexRecursive (QueueHandle_t xMutex, TickType_t xTicksToWait)

Macros

Type Name
define queueOVERWRITE ( ( BaseType_t ) 2 )
define queueQUEUE_TYPE_BASE ( ( uint8_t ) 0U )
define queueQUEUE_TYPE_BINARY_SEMAPHORE ( ( uint8_t ) 3U )
define queueQUEUE_TYPE_COUNTING_SEMAPHORE ( ( uint8_t ) 2U )
define queueQUEUE_TYPE_MUTEX ( ( uint8_t ) 1U )
define queueQUEUE_TYPE_RECURSIVE_MUTEX ( ( uint8_t ) 4U )
define queueQUEUE_TYPE_SET ( ( uint8_t ) 0U )
define queueSEND_TO_BACK ( ( BaseType_t ) 0 )
define queueSEND_TO_FRONT ( ( BaseType_t ) 1 )
define xQueueOverwrite (xQueue, pvItemToQueue) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), 0, queueOVERWRITE )
define xQueueOverwriteFromISR (xQueue, pvItemToQueue, pxHigherPriorityTaskWoken) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueOVERWRITE )
define xQueueReset (xQueue) xQueueGenericReset( xQueue, pdFALSE )
define xQueueSend (xQueue, pvItemToQueue, xTicksToWait) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
define xQueueSendFromISR (xQueue, pvItemToQueue, pxHigherPriorityTaskWoken) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
define xQueueSendToBack (xQueue, pvItemToQueue, xTicksToWait) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
define xQueueSendToBackFromISR (xQueue, pvItemToQueue, pxHigherPriorityTaskWoken) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
define xQueueSendToFront (xQueue, pvItemToQueue, xTicksToWait) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
define xQueueSendToFrontFromISR (xQueue, pvItemToQueue, pxHigherPriorityTaskWoken) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )

Public Types Documentation

typedef QueueHandle_t

typedef struct QueueDefinition* QueueHandle_t;

typedef QueueSetHandle_t

typedef struct QueueDefinition* QueueSetHandle_t;

Type by which queue sets are referenced. For example, a call to xQueueCreateSet() returns an xQueueSet variable that can then be used as a parameter to xQueueSelectFromSet(), xQueueAddToSet(), etc.

typedef QueueSetMemberHandle_t

typedef struct QueueDefinition* QueueSetMemberHandle_t;

Queue sets can contain both queues and semaphores, so the QueueSetMemberHandle_t is defined as a type to be used where a parameter or return value can be either an QueueHandle_t or an SemaphoreHandle_t.

Public Functions Documentation

function ucQueueGetQueueType

uint8_t ucQueueGetQueueType (
    QueueHandle_t xQueue
) 

function uxQueueGetQueueNumber

UBaseType_t uxQueueGetQueueNumber (
    QueueHandle_t xQueue
) 

function uxQueueMessagesWaiting

UBaseType_t uxQueueMessagesWaiting (
    const QueueHandle_t xQueue
) 

function uxQueueMessagesWaitingFromISR

UBaseType_t uxQueueMessagesWaitingFromISR (
    const QueueHandle_t xQueue
) 

function uxQueueSpacesAvailable

UBaseType_t uxQueueSpacesAvailable (
    const QueueHandle_t xQueue
) 

function vQueueDelete

void vQueueDelete (
    QueueHandle_t xQueue
) 

function vQueueSetQueueNumber

void vQueueSetQueueNumber (
    QueueHandle_t xQueue,
    UBaseType_t uxQueueNumber
) 

function vQueueWaitForMessageRestricted

void vQueueWaitForMessageRestricted (
    QueueHandle_t xQueue,
    TickType_t xTicksToWait,
    const BaseType_t xWaitIndefinitely
) 

function xQueueAddToSet

BaseType_t xQueueAddToSet (
    QueueSetMemberHandle_t xQueueOrSemaphore,
    QueueSetHandle_t xQueueSet
) 

function xQueueCRReceive

BaseType_t xQueueCRReceive (
    QueueHandle_t xQueue,
    void * pvBuffer,
    TickType_t xTicksToWait
) 

function xQueueCRReceiveFromISR

BaseType_t xQueueCRReceiveFromISR (
    QueueHandle_t xQueue,
    void * pvBuffer,
    BaseType_t * pxTaskWoken
) 

function xQueueCRSend

BaseType_t xQueueCRSend (
    QueueHandle_t xQueue,
    const void * pvItemToQueue,
    TickType_t xTicksToWait
) 

function xQueueCRSendFromISR

BaseType_t xQueueCRSendFromISR (
    QueueHandle_t xQueue,
    const void * pvItemToQueue,
    BaseType_t xCoRoutinePreviouslyWoken
) 

function xQueueCreateCountingSemaphore

QueueHandle_t xQueueCreateCountingSemaphore (
    const UBaseType_t uxMaxCount,
    const UBaseType_t uxInitialCount
) 

function xQueueCreateCountingSemaphoreStatic

QueueHandle_t xQueueCreateCountingSemaphoreStatic (
    const UBaseType_t uxMaxCount,
    const UBaseType_t uxInitialCount,
    StaticQueue_t * pxStaticQueue
) 

function xQueueCreateMutex

QueueHandle_t xQueueCreateMutex (
    const uint8_t ucQueueType
) 

function xQueueCreateMutexStatic

QueueHandle_t xQueueCreateMutexStatic (
    const uint8_t ucQueueType,
    StaticQueue_t * pxStaticQueue
) 

function xQueueCreateSet

QueueSetHandle_t xQueueCreateSet (
    const UBaseType_t uxEventQueueLength
) 

function xQueueGenericReset

BaseType_t xQueueGenericReset (
    QueueHandle_t xQueue,
    BaseType_t xNewQueue
) 

function xQueueGenericSend

BaseType_t xQueueGenericSend (
    QueueHandle_t xQueue,
    const void *const pvItemToQueue,
    TickType_t xTicksToWait,
    const BaseType_t xCopyPosition
) 

function xQueueGenericSendFromISR

BaseType_t xQueueGenericSendFromISR (
    QueueHandle_t xQueue,
    const void *const pvItemToQueue,
    BaseType_t *const pxHigherPriorityTaskWoken,
    const BaseType_t xCopyPosition
) 

function xQueueGetMutexHolder

TaskHandle_t xQueueGetMutexHolder (
    QueueHandle_t xSemaphore
) 

function xQueueGetMutexHolderFromISR

TaskHandle_t xQueueGetMutexHolderFromISR (
    QueueHandle_t xSemaphore
) 

function xQueueGiveFromISR

BaseType_t xQueueGiveFromISR (
    QueueHandle_t xQueue,
    BaseType_t *const pxHigherPriorityTaskWoken
) 

function xQueueGiveMutexRecursive

BaseType_t xQueueGiveMutexRecursive (
    QueueHandle_t xMutex
) 

function xQueueIsQueueEmptyFromISR

BaseType_t xQueueIsQueueEmptyFromISR (
    const QueueHandle_t xQueue
) 

function xQueueIsQueueFullFromISR

BaseType_t xQueueIsQueueFullFromISR (
    const QueueHandle_t xQueue
) 

function xQueuePeek

BaseType_t xQueuePeek (
    QueueHandle_t xQueue,
    void *const pvBuffer,
    TickType_t xTicksToWait
) 

function xQueuePeekFromISR

BaseType_t xQueuePeekFromISR (
    QueueHandle_t xQueue,
    void *const pvBuffer
) 

function xQueueReceive

BaseType_t xQueueReceive (
    QueueHandle_t xQueue,
    void *const pvBuffer,
    TickType_t xTicksToWait
) 

function xQueueReceiveFromISR

BaseType_t xQueueReceiveFromISR (
    QueueHandle_t xQueue,
    void *const pvBuffer,
    BaseType_t *const pxHigherPriorityTaskWoken
) 

function xQueueRemoveFromSet

BaseType_t xQueueRemoveFromSet (
    QueueSetMemberHandle_t xQueueOrSemaphore,
    QueueSetHandle_t xQueueSet
) 

function xQueueSelectFromSet

QueueSetMemberHandle_t xQueueSelectFromSet (
    QueueSetHandle_t xQueueSet,
    const TickType_t xTicksToWait
) 

function xQueueSelectFromSetFromISR

QueueSetMemberHandle_t xQueueSelectFromSetFromISR (
    QueueSetHandle_t xQueueSet
) 

function xQueueSemaphoreTake

BaseType_t xQueueSemaphoreTake (
    QueueHandle_t xQueue,
    TickType_t xTicksToWait
) 

function xQueueTakeMutexRecursive

BaseType_t xQueueTakeMutexRecursive (
    QueueHandle_t xMutex,
    TickType_t xTicksToWait
) 

Macro Definition Documentation

define queueOVERWRITE

#define queueOVERWRITE ( ( BaseType_t ) 2 )

define queueQUEUE_TYPE_BASE

#define queueQUEUE_TYPE_BASE ( ( uint8_t ) 0U )

define queueQUEUE_TYPE_BINARY_SEMAPHORE

#define queueQUEUE_TYPE_BINARY_SEMAPHORE ( ( uint8_t ) 3U )

define queueQUEUE_TYPE_COUNTING_SEMAPHORE

#define queueQUEUE_TYPE_COUNTING_SEMAPHORE ( ( uint8_t ) 2U )

define queueQUEUE_TYPE_MUTEX

#define queueQUEUE_TYPE_MUTEX ( ( uint8_t ) 1U )

define queueQUEUE_TYPE_RECURSIVE_MUTEX

#define queueQUEUE_TYPE_RECURSIVE_MUTEX ( ( uint8_t ) 4U )

define queueQUEUE_TYPE_SET

#define queueQUEUE_TYPE_SET ( ( uint8_t ) 0U )

define queueSEND_TO_BACK

#define queueSEND_TO_BACK ( ( BaseType_t ) 0 )

define queueSEND_TO_FRONT

#define queueSEND_TO_FRONT ( ( BaseType_t ) 1 )

define xQueueOverwrite

#define xQueueOverwrite (
    xQueue,
    pvItemToQueue
) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), 0, queueOVERWRITE )

define xQueueOverwriteFromISR

#define xQueueOverwriteFromISR (
    xQueue,
    pvItemToQueue,
    pxHigherPriorityTaskWoken
) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueOVERWRITE )

define xQueueReset

#define xQueueReset (
    xQueue
) xQueueGenericReset( xQueue, pdFALSE )

define xQueueSend

#define xQueueSend (
    xQueue,
    pvItemToQueue,
    xTicksToWait
) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )

define xQueueSendFromISR

#define xQueueSendFromISR (
    xQueue,
    pvItemToQueue,
    pxHigherPriorityTaskWoken
) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )

define xQueueSendToBack

#define xQueueSendToBack (
    xQueue,
    pvItemToQueue,
    xTicksToWait
) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )

define xQueueSendToBackFromISR

#define xQueueSendToBackFromISR (
    xQueue,
    pvItemToQueue,
    pxHigherPriorityTaskWoken
) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )

define xQueueSendToFront

#define xQueueSendToFront (
    xQueue,
    pvItemToQueue,
    xTicksToWait
) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )

define xQueueSendToFrontFromISR

#define xQueueSendToFrontFromISR (
    xQueue,
    pvItemToQueue,
    pxHigherPriorityTaskWoken
) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )

The documentation for this class was generated from the following file fw/rbcx-coprocessor/lib/FreeRTOS/include/queue.h