Skip to content

File queue.c

FileList > FreeRTOS > src > queue.c

Go to the source code of this file.

  • #include <stdlib.h>
  • #include <string.h>
  • #include "FreeRTOS.h"
  • #include "task.h"
  • #include "queue.h"

Classes

Type Name
struct QueueDefinition
struct QueuePointers
struct SemaphoreData

Public Types

Type Name
typedef struct QueuePointers QueuePointers_t
typedef xQUEUE Queue_t
typedef struct SemaphoreData SemaphoreData_t
typedef struct QueueDefinition xQUEUE

Public Functions

Type Name
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)
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)
BaseType_t xQueueGiveFromISR (QueueHandle_t xQueue, BaseType_t *const pxHigherPriorityTaskWoken)
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 xQueueSemaphoreTake (QueueHandle_t xQueue, TickType_t xTicksToWait)

Public Static Functions

Type Name
void prvCopyDataFromQueue (Queue_t *const pxQueue, void *const pvBuffer)
BaseType_t prvCopyDataToQueue (Queue_t *const pxQueue, const void * pvItemToQueue, const BaseType_t xPosition)
void prvInitialiseNewQueue (const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t * pucQueueStorage, const uint8_t ucQueueType, Queue_t * pxNewQueue)
BaseType_t prvIsQueueEmpty (const Queue_t * pxQueue)
BaseType_t prvIsQueueFull (const Queue_t * pxQueue)
void prvUnlockQueue (Queue_t *const pxQueue)

Macros

Type Name
define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
define prvLockQueue (pxQueue)
define queueLOCKED_UNMODIFIED ( ( int8_t ) 0 )
define queueMUTEX_GIVE_BLOCK_TIME ( ( TickType_t ) 0U )
define queueQUEUE_IS_MUTEX NULL
define queueSEMAPHORE_QUEUE_ITEM_LENGTH ( ( UBaseType_t ) 0 )
define queueUNLOCKED ( ( int8_t ) -1 )
define queueYIELD_IF_USING_PREEMPTION ()
define uxQueueType pcHead

Public Types Documentation

typedef QueuePointers_t

typedef struct QueuePointers QueuePointers_t;

typedef Queue_t

typedef xQUEUE Queue_t;

typedef SemaphoreData_t

typedef struct SemaphoreData SemaphoreData_t;

typedef xQUEUE

typedef struct QueueDefinition xQUEUE;

Public Functions Documentation

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 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 xQueueGiveFromISR

BaseType_t xQueueGiveFromISR (
    QueueHandle_t xQueue,
    BaseType_t *const pxHigherPriorityTaskWoken
) 

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 xQueueSemaphoreTake

BaseType_t xQueueSemaphoreTake (
    QueueHandle_t xQueue,
    TickType_t xTicksToWait
) 

Public Static Functions Documentation

function prvCopyDataFromQueue

static void prvCopyDataFromQueue (
    Queue_t *const pxQueue,
    void *const pvBuffer
) 

function prvCopyDataToQueue

static BaseType_t prvCopyDataToQueue (
    Queue_t *const pxQueue,
    const void * pvItemToQueue,
    const BaseType_t xPosition
) 

function prvInitialiseNewQueue

static void prvInitialiseNewQueue (
    const UBaseType_t uxQueueLength,
    const UBaseType_t uxItemSize,
    uint8_t * pucQueueStorage,
    const uint8_t ucQueueType,
    Queue_t * pxNewQueue
) 

function prvIsQueueEmpty

static BaseType_t prvIsQueueEmpty (
    const Queue_t * pxQueue
) 

function prvIsQueueFull

static BaseType_t prvIsQueueFull (
    const Queue_t * pxQueue
) 

function prvUnlockQueue

static void prvUnlockQueue (
    Queue_t *const pxQueue
) 

Macro Definition Documentation

define MPU_WRAPPERS_INCLUDED_FROM_API_FILE

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 

define prvLockQueue

#define prvLockQueue (
    pxQueue
) taskENTER_CRITICAL();                                 \
    {                                                       \
        if( ( pxQueue )->cRxLock == queueUNLOCKED )         \
        {                                                   \
            ( pxQueue )->cRxLock = queueLOCKED_UNMODIFIED;  \
        }                                                   \
        if( ( pxQueue )->cTxLock == queueUNLOCKED )         \
        {                                                   \
            ( pxQueue )->cTxLock = queueLOCKED_UNMODIFIED;  \
        }                                                   \
    }                                                       \
    taskEXIT_CRITICAL()

define queueLOCKED_UNMODIFIED

#define queueLOCKED_UNMODIFIED ( ( int8_t ) 0 )

define queueMUTEX_GIVE_BLOCK_TIME

#define queueMUTEX_GIVE_BLOCK_TIME ( ( TickType_t ) 0U )

define queueQUEUE_IS_MUTEX

#define queueQUEUE_IS_MUTEX NULL

define queueSEMAPHORE_QUEUE_ITEM_LENGTH

#define queueSEMAPHORE_QUEUE_ITEM_LENGTH ( ( UBaseType_t ) 0 )

define queueUNLOCKED

#define queueUNLOCKED ( ( int8_t ) -1 )

define queueYIELD_IF_USING_PREEMPTION

#define queueYIELD_IF_USING_PREEMPTION (

) 

define uxQueueType

#define uxQueueType pcHead

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