mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Feature/fixing clang gnu compiler warnings (#620)
* Adding in ability to support a library for freertos_config and a custom freertos_kernel_port (#558) * Using single name definition for libraries everywhere. (#558) * Supporting backwards compatibility with FREERTOS_CONFIG_FILE_DIRECTORY (#571) * Removing compiler warnings for GNU and Clang. (#571) * Added in documentation on how to consume from a main project. Added default PORT selection for native POSIX and MINGW platforms. * Only adding freertos_config if it exists. Removing auto generation of it from a FREERTOS_CONFIG_FILE_DIRECTORY. * Fixing clang and gnu compiler warnings. * Adding in project information and how to compile for GNU/clang * Fixing compiler issue with unused variable - no need to declare variable. * Adding in compile warnings for linux builds that kernel is okay with using. * Fixing more extra-semi-stmt clang warnings. * Moving definition of hooks into header files if features are enabled. * Fixing formatting with uncrustify. * Fixing merge conflicts with main merge. * Fixing compiler errors due to merge issues and formatting. * Fixing Line feeds. * Adding 'portNORETURN' into portmacros.h. Other Updates based on PR request * Further clean-up of clang and clang-tidy issues. * Removing compiler specific pragmas from common c files. * Fixing missing lexicon entry and uncrustify formatting changes. * Resolving merge issue multiple defnitions of proto for prvIdleTask * Fixing formatting issues that are not covered by uncrustify. Use clang-tidy instead if you want this level of control. * More uncrustify formatting issues. * Fixing extra bracket in #if statement. --------- Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
parent
5d05601045
commit
8cd5451ad5
1
.github/lexicon.txt
vendored
1
.github/lexicon.txt
vendored
|
@ -2458,6 +2458,7 @@ vaninterruptserviceroutine
|
||||||
vanisr
|
vanisr
|
||||||
vanothertask
|
vanothertask
|
||||||
vapplicationcleartimerinterrupt
|
vapplicationcleartimerinterrupt
|
||||||
|
vapplicationdaemontaskstartuphook
|
||||||
vapplicationexceptionregisterdump
|
vapplicationexceptionregisterdump
|
||||||
vapplicationfpusafeirqhandler
|
vapplicationfpusafeirqhandler
|
||||||
vapplicationgetidletaskmemory
|
vapplicationgetidletaskmemory
|
||||||
|
|
|
@ -222,6 +222,47 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_
|
||||||
" freertos_kernel)")
|
" freertos_kernel)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Requirements
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Overall Compile Options
|
||||||
|
# Note the compile option strategy is to error on everything and then
|
||||||
|
# Per library opt-out of things that are warnings/errors.
|
||||||
|
# This ensures that no matter what strategy for compilation you take, the
|
||||||
|
# builds will still occur.
|
||||||
|
#
|
||||||
|
# Only tested with GNU and Clang.
|
||||||
|
# Other options are https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html#variable:CMAKE_%3CLANG%3E_COMPILER_ID
|
||||||
|
# Naming of compilers translation map:
|
||||||
|
#
|
||||||
|
# FreeRTOS | CMake
|
||||||
|
# -------------------
|
||||||
|
# CCS | ?TBD?
|
||||||
|
# GCC | GNU, Clang, *Clang Others?
|
||||||
|
# IAR | IAR
|
||||||
|
# Keil | ARMCC
|
||||||
|
# MSVC | MSVC # Note only for MinGW?
|
||||||
|
# Renesas | ?TBD?
|
||||||
|
|
||||||
|
add_compile_options(
|
||||||
|
### Gnu/Clang C Options
|
||||||
|
$<$<COMPILE_LANG_AND_ID:C,GNU>:-fdiagnostics-color=always>
|
||||||
|
$<$<COMPILE_LANG_AND_ID:C,Clang>:-fcolor-diagnostics>
|
||||||
|
|
||||||
|
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wall>
|
||||||
|
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra>
|
||||||
|
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wpedantic>
|
||||||
|
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
|
||||||
|
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Weverything>
|
||||||
|
|
||||||
|
# TODO: Add in other Compilers here.
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
########################################################################
|
||||||
add_subdirectory(portable)
|
add_subdirectory(portable)
|
||||||
|
|
||||||
add_library(freertos_kernel STATIC
|
add_library(freertos_kernel STATIC
|
||||||
|
|
|
@ -69,14 +69,14 @@
|
||||||
typedef struct EventGroupDef_t
|
typedef struct EventGroupDef_t
|
||||||
{
|
{
|
||||||
EventBits_t uxEventBits;
|
EventBits_t uxEventBits;
|
||||||
List_t xTasksWaitingForBits; /*< List of tasks waiting for a bit to be set. */
|
List_t xTasksWaitingForBits; /**< List of tasks waiting for a bit to be set. */
|
||||||
|
|
||||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||||
UBaseType_t uxEventGroupNumber;
|
UBaseType_t uxEventGroupNumber;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
||||||
uint8_t ucStaticallyAllocated; /*< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
|
uint8_t ucStaticallyAllocated; /**< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
|
||||||
#endif
|
#endif
|
||||||
} EventGroup_t;
|
} EventGroup_t;
|
||||||
|
|
||||||
|
@ -521,15 +521,15 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
|
||||||
|
|
||||||
EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
|
EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
|
||||||
{
|
{
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
EventGroup_t const * const pxEventBits = xEventGroup;
|
EventGroup_t const * const pxEventBits = xEventGroup;
|
||||||
EventBits_t uxReturn;
|
EventBits_t uxReturn;
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
uxReturn = pxEventBits->uxEventBits;
|
uxReturn = pxEventBits->uxEventBits;
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return uxReturn;
|
return uxReturn;
|
||||||
} /*lint !e818 EventGroupHandle_t is a typedef used in other functions to so can't be pointer to const. */
|
} /*lint !e818 EventGroupHandle_t is a typedef used in other functions to so can't be pointer to const. */
|
||||||
|
|
|
@ -904,6 +904,10 @@
|
||||||
#define portDONT_DISCARD
|
#define portDONT_DISCARD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef portNORETURN
|
||||||
|
#define portNORETURN
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef configUSE_TIME_SLICING
|
#ifndef configUSE_TIME_SLICING
|
||||||
#define configUSE_TIME_SLICING 1
|
#define configUSE_TIME_SLICING 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -143,20 +143,20 @@
|
||||||
struct xLIST;
|
struct xLIST;
|
||||||
struct xLIST_ITEM
|
struct xLIST_ITEM
|
||||||
{
|
{
|
||||||
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
||||||
configLIST_VOLATILE TickType_t xItemValue; /*< The value being listed. In most cases this is used to sort the list in ascending order. */
|
configLIST_VOLATILE TickType_t xItemValue; /**< The value being listed. In most cases this is used to sort the list in ascending order. */
|
||||||
struct xLIST_ITEM * configLIST_VOLATILE pxNext; /*< Pointer to the next ListItem_t in the list. */
|
struct xLIST_ITEM * configLIST_VOLATILE pxNext; /**< Pointer to the next ListItem_t in the list. */
|
||||||
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; /*< Pointer to the previous ListItem_t in the list. */
|
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; /**< Pointer to the previous ListItem_t in the list. */
|
||||||
void * pvOwner; /*< Pointer to the object (normally a TCB) that contains the list item. There is therefore a two way link between the object containing the list item and the list item itself. */
|
void * pvOwner; /**< Pointer to the object (normally a TCB) that contains the list item. There is therefore a two way link between the object containing the list item and the list item itself. */
|
||||||
struct xLIST * configLIST_VOLATILE pxContainer; /*< Pointer to the list in which this list item is placed (if any). */
|
struct xLIST * configLIST_VOLATILE pxContainer; /**< Pointer to the list in which this list item is placed (if any). */
|
||||||
listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
||||||
};
|
};
|
||||||
typedef struct xLIST_ITEM ListItem_t; /* For some reason lint wants this as two separate definitions. */
|
typedef struct xLIST_ITEM ListItem_t; /* For some reason lint wants this as two separate definitions. */
|
||||||
|
|
||||||
#if ( configUSE_MINI_LIST_ITEM == 1 )
|
#if ( configUSE_MINI_LIST_ITEM == 1 )
|
||||||
struct xMINI_LIST_ITEM
|
struct xMINI_LIST_ITEM
|
||||||
{
|
{
|
||||||
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
||||||
configLIST_VOLATILE TickType_t xItemValue;
|
configLIST_VOLATILE TickType_t xItemValue;
|
||||||
struct xLIST_ITEM * configLIST_VOLATILE pxNext;
|
struct xLIST_ITEM * configLIST_VOLATILE pxNext;
|
||||||
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;
|
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;
|
||||||
|
@ -171,11 +171,11 @@ typedef struct xLIST_ITEM ListItem_t; /* For some reason lint
|
||||||
*/
|
*/
|
||||||
typedef struct xLIST
|
typedef struct xLIST
|
||||||
{
|
{
|
||||||
listFIRST_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
listFIRST_LIST_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
||||||
volatile UBaseType_t uxNumberOfItems;
|
volatile UBaseType_t uxNumberOfItems;
|
||||||
ListItem_t * configLIST_VOLATILE pxIndex; /*< Used to walk through the list. Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */
|
ListItem_t * configLIST_VOLATILE pxIndex; /**< Used to walk through the list. Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */
|
||||||
MiniListItem_t xListEnd; /*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */
|
MiniListItem_t xListEnd; /**< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */
|
||||||
listSECOND_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
listSECOND_LIST_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
|
||||||
} List_t;
|
} List_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -283,7 +283,7 @@ typedef struct xLIST
|
||||||
* \ingroup LinkedList
|
* \ingroup LinkedList
|
||||||
*/
|
*/
|
||||||
#define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \
|
#define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \
|
||||||
{ \
|
do { \
|
||||||
List_t * const pxConstList = ( pxList ); \
|
List_t * const pxConstList = ( pxList ); \
|
||||||
/* Increment the index to the next item and return the item, ensuring */ \
|
/* Increment the index to the next item and return the item, ensuring */ \
|
||||||
/* we don't return the marker used at the end of the list. */ \
|
/* we don't return the marker used at the end of the list. */ \
|
||||||
|
@ -293,7 +293,7 @@ typedef struct xLIST
|
||||||
( pxConstList )->pxIndex = ( pxConstList )->xListEnd.pxNext; \
|
( pxConstList )->pxIndex = ( pxConstList )->xListEnd.pxNext; \
|
||||||
} \
|
} \
|
||||||
( pxTCB ) = ( pxConstList )->pxIndex->pvOwner; \
|
( pxTCB ) = ( pxConstList )->pxIndex->pvOwner; \
|
||||||
}
|
} while( 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Version of uxListRemove() that does not return a value. Provided as a slight
|
* Version of uxListRemove() that does not return a value. Provided as a slight
|
||||||
|
@ -312,7 +312,7 @@ typedef struct xLIST
|
||||||
* \ingroup LinkedList
|
* \ingroup LinkedList
|
||||||
*/
|
*/
|
||||||
#define listREMOVE_ITEM( pxItemToRemove ) \
|
#define listREMOVE_ITEM( pxItemToRemove ) \
|
||||||
{ \
|
do { \
|
||||||
/* The list item knows which list it is in. Obtain the list from the list \
|
/* The list item knows which list it is in. Obtain the list from the list \
|
||||||
* item. */ \
|
* item. */ \
|
||||||
List_t * const pxList = ( pxItemToRemove )->pxContainer; \
|
List_t * const pxList = ( pxItemToRemove )->pxContainer; \
|
||||||
|
@ -327,7 +327,7 @@ typedef struct xLIST
|
||||||
\
|
\
|
||||||
( pxItemToRemove )->pxContainer = NULL; \
|
( pxItemToRemove )->pxContainer = NULL; \
|
||||||
( pxList->uxNumberOfItems )--; \
|
( pxList->uxNumberOfItems )--; \
|
||||||
}
|
} while( 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inline version of vListInsertEnd() to provide slight optimisation for
|
* Inline version of vListInsertEnd() to provide slight optimisation for
|
||||||
|
@ -352,7 +352,7 @@ typedef struct xLIST
|
||||||
* \ingroup LinkedList
|
* \ingroup LinkedList
|
||||||
*/
|
*/
|
||||||
#define listINSERT_END( pxList, pxNewListItem ) \
|
#define listINSERT_END( pxList, pxNewListItem ) \
|
||||||
{ \
|
do { \
|
||||||
ListItem_t * const pxIndex = ( pxList )->pxIndex; \
|
ListItem_t * const pxIndex = ( pxList )->pxIndex; \
|
||||||
\
|
\
|
||||||
/* Only effective when configASSERT() is also defined, these tests may catch \
|
/* Only effective when configASSERT() is also defined, these tests may catch \
|
||||||
|
@ -374,7 +374,7 @@ typedef struct xLIST
|
||||||
( pxNewListItem )->pxContainer = ( pxList ); \
|
( pxNewListItem )->pxContainer = ( pxList ); \
|
||||||
\
|
\
|
||||||
( ( pxList )->uxNumberOfItems )++; \
|
( ( pxList )->uxNumberOfItems )++; \
|
||||||
}
|
} while( 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Access function to obtain the owner of the first entry in a list. Lists
|
* Access function to obtain the owner of the first entry in a list. Lists
|
||||||
|
|
|
@ -1346,9 +1346,9 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
||||||
* @param pvBuffer Pointer to the buffer into which the received item will
|
* @param pvBuffer Pointer to the buffer into which the received item will
|
||||||
* be copied.
|
* be copied.
|
||||||
*
|
*
|
||||||
* @param pxTaskWoken A task may be blocked waiting for space to become
|
* @param pxHigherPriorityTaskWoken A task may be blocked waiting for space to
|
||||||
* available on the queue. If xQueueReceiveFromISR causes such a task to
|
* become available on the queue. If xQueueReceiveFromISR causes such a task
|
||||||
* unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will
|
* to unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will
|
||||||
* remain unchanged.
|
* remain unchanged.
|
||||||
*
|
*
|
||||||
* @return pdTRUE if an item was successfully received from the queue,
|
* @return pdTRUE if an item was successfully received from the queue,
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
|
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
|
||||||
|
|
||||||
#define taskCHECK_FOR_STACK_OVERFLOW() \
|
#define taskCHECK_FOR_STACK_OVERFLOW() \
|
||||||
{ \
|
do { \
|
||||||
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
|
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
|
||||||
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
|
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
|
||||||
\
|
\
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
{ \
|
{ \
|
||||||
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
|
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
|
||||||
} \
|
} \
|
||||||
}
|
} while( 0 )
|
||||||
|
|
||||||
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
|
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -658,7 +658,7 @@ typedef enum
|
||||||
*
|
*
|
||||||
* @param xTask The handle of the task being updated.
|
* @param xTask The handle of the task being updated.
|
||||||
*
|
*
|
||||||
* @param xRegions A pointer to a MemoryRegion_t structure that contains the
|
* @param[in] pxRegions A pointer to a MemoryRegion_t structure that contains the
|
||||||
* new memory region definitions.
|
* new memory region definitions.
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
|
@ -1667,7 +1667,7 @@ configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) PRIVIL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if ( configUSE_TICK_HOOK > 0 )
|
#if ( configUSE_TICK_HOOK != 0 )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* task.h
|
* task.h
|
||||||
|
|
|
@ -1361,6 +1361,20 @@ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ( configUSE_DAEMON_TASK_STARTUP_HOOK != 0 )
|
||||||
|
|
||||||
|
/**
|
||||||
|
* timers.h
|
||||||
|
* @code{c}
|
||||||
|
* void vApplicationDaemonTaskStartupHook( void );
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* This hook function is called form the timer task once when the task starts running.
|
||||||
|
*/
|
||||||
|
void vApplicationDaemonTaskStartupHook( void );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M23"
|
#define portARCH_NAME "Cortex-M23"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if( configTOTAL_MPU_REGIONS == 16 )
|
#if( configTOTAL_MPU_REGIONS == 16 )
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M23"
|
#define portARCH_NAME "Cortex-M23"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if( configTOTAL_MPU_REGIONS == 16 )
|
#if( configTOTAL_MPU_REGIONS == 16 )
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M33"
|
#define portARCH_NAME "Cortex-M33"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M33"
|
#define portARCH_NAME "Cortex-M33"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M55"
|
#define portARCH_NAME "Cortex-M55"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M85"
|
#define portARCH_NAME "Cortex-M85"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M23"
|
#define portARCH_NAME "Cortex-M23"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if( configTOTAL_MPU_REGIONS == 16 )
|
#if( configTOTAL_MPU_REGIONS == 16 )
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M23"
|
#define portARCH_NAME "Cortex-M23"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if( configTOTAL_MPU_REGIONS == 16 )
|
#if( configTOTAL_MPU_REGIONS == 16 )
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Scheduler utilities. */
|
/* Scheduler utilities. */
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M33"
|
#define portARCH_NAME "Cortex-M33"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M33"
|
#define portARCH_NAME "Cortex-M33"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* SVC numbers for various services. */
|
/* SVC numbers for various services. */
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Scheduler utilities. */
|
/* Scheduler utilities. */
|
||||||
|
|
|
@ -203,6 +203,7 @@ typedef struct MPU_SETTINGS
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* SVC numbers for various services. */
|
/* SVC numbers for various services. */
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M55"
|
#define portARCH_NAME "Cortex-M55"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M55"
|
#define portARCH_NAME "Cortex-M55"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Scheduler utilities. */
|
/* Scheduler utilities. */
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M85"
|
#define portARCH_NAME "Cortex-M85"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
*/
|
*/
|
||||||
#define portARCH_NAME "Cortex-M85"
|
#define portARCH_NAME "Cortex-M85"
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -96,8 +96,8 @@
|
||||||
* of their memory address. */
|
* of their memory address. */
|
||||||
typedef struct A_BLOCK_LINK
|
typedef struct A_BLOCK_LINK
|
||||||
{
|
{
|
||||||
struct A_BLOCK_LINK * pxNextFreeBlock; /*<< The next free block in the list. */
|
struct A_BLOCK_LINK * pxNextFreeBlock; /**< The next free block in the list. */
|
||||||
size_t xBlockSize; /*<< The size of the free block. */
|
size_t xBlockSize; /**< The size of the free block. */
|
||||||
} BlockLink_t;
|
} BlockLink_t;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -390,7 +390,7 @@ static void prvHeapInit( void ) /* PRIVILEGED_FUNCTION */
|
||||||
{
|
{
|
||||||
uxAddress += ( portBYTE_ALIGNMENT - 1 );
|
uxAddress += ( portBYTE_ALIGNMENT - 1 );
|
||||||
uxAddress &= ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK );
|
uxAddress &= ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK );
|
||||||
xTotalHeapSize -= uxAddress - ( portPOINTER_SIZE_TYPE ) ucHeap;
|
xTotalHeapSize -= ( size_t ) ( uxAddress - ( portPOINTER_SIZE_TYPE ) ucHeap );
|
||||||
}
|
}
|
||||||
|
|
||||||
pucAlignedHeap = ( uint8_t * ) uxAddress;
|
pucAlignedHeap = ( uint8_t * ) uxAddress;
|
||||||
|
@ -402,7 +402,7 @@ static void prvHeapInit( void ) /* PRIVILEGED_FUNCTION */
|
||||||
|
|
||||||
/* pxEnd is used to mark the end of the list of free blocks and is inserted
|
/* pxEnd is used to mark the end of the list of free blocks and is inserted
|
||||||
* at the end of the heap space. */
|
* at the end of the heap space. */
|
||||||
uxAddress = ( ( portPOINTER_SIZE_TYPE ) pucAlignedHeap ) + xTotalHeapSize;
|
uxAddress = ( portPOINTER_SIZE_TYPE ) ( pucAlignedHeap + xTotalHeapSize );
|
||||||
uxAddress -= xHeapStructSize;
|
uxAddress -= xHeapStructSize;
|
||||||
uxAddress &= ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK );
|
uxAddress &= ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK );
|
||||||
pxEnd = ( BlockLink_t * ) uxAddress;
|
pxEnd = ( BlockLink_t * ) uxAddress;
|
||||||
|
|
7
portable/ThirdParty/GCC/Posix/port.c
vendored
7
portable/ThirdParty/GCC/Posix/port.c
vendored
|
@ -115,6 +115,9 @@ static void prvPortYieldFromISR( void );
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
static void prvFatalError( const char * pcCall,
|
static void prvFatalError( const char * pcCall,
|
||||||
|
int iErrno ) __attribute__ ((__noreturn__));
|
||||||
|
|
||||||
|
void prvFatalError( const char * pcCall,
|
||||||
int iErrno )
|
int iErrno )
|
||||||
{
|
{
|
||||||
fprintf( stderr, "%s: %s\n", pcCall, strerror( iErrno ) );
|
fprintf( stderr, "%s: %s\n", pcCall, strerror( iErrno ) );
|
||||||
|
@ -141,7 +144,7 @@ portSTACK_TYPE * pxPortInitialiseStack( portSTACK_TYPE * pxTopOfStack,
|
||||||
*/
|
*/
|
||||||
thread = ( Thread_t * ) ( pxTopOfStack + 1 ) - 1;
|
thread = ( Thread_t * ) ( pxTopOfStack + 1 ) - 1;
|
||||||
pxTopOfStack = ( portSTACK_TYPE * ) thread - 1;
|
pxTopOfStack = ( portSTACK_TYPE * ) thread - 1;
|
||||||
ulStackSize = ( pxTopOfStack + 1 - pxEndOfStack ) * sizeof( *pxTopOfStack );
|
ulStackSize = ( size_t )( pxTopOfStack + 1 - pxEndOfStack ) * sizeof( *pxTopOfStack );
|
||||||
|
|
||||||
thread->pxCode = pxCode;
|
thread->pxCode = pxCode;
|
||||||
thread->pvParams = pvParameters;
|
thread->pvParams = pvParameters;
|
||||||
|
@ -340,7 +343,7 @@ static uint64_t prvGetTimeNs( void )
|
||||||
|
|
||||||
clock_gettime( CLOCK_MONOTONIC, &t );
|
clock_gettime( CLOCK_MONOTONIC, &t );
|
||||||
|
|
||||||
return t.tv_sec * 1000000000ULL + t.tv_nsec;
|
return ( uint64_t )t.tv_sec * 1000000000ULL + ( uint64_t )t.tv_nsec;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t prvStartTimeNs;
|
static uint64_t prvStartTimeNs;
|
||||||
|
|
2
portable/ThirdParty/GCC/Posix/portmacro.h
vendored
2
portable/ThirdParty/GCC/Posix/portmacro.h
vendored
|
@ -68,6 +68,8 @@ typedef unsigned long TickType_t;
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Architecture specifics. */
|
/* Architecture specifics. */
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
|
|
||||||
#define portSTACK_GROWTH ( -1 )
|
#define portSTACK_GROWTH ( -1 )
|
||||||
#define portHAS_STACK_OVERFLOW_CHECKING ( 1 )
|
#define portHAS_STACK_OVERFLOW_CHECKING ( 1 )
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
|
|
|
@ -78,6 +78,7 @@
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portDONT_DISCARD __attribute__( ( used ) )
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
/* We have to use PICO_DIVIDER_DISABLE_INTERRUPTS as the source of truth rathern than our config,
|
/* We have to use PICO_DIVIDER_DISABLE_INTERRUPTS as the source of truth rathern than our config,
|
||||||
* as our FreeRTOSConfig.h header cannot be included by ASM code - which is what this affects in the SDK */
|
* as our FreeRTOSConfig.h header cannot be included by ASM code - which is what this affects in the SDK */
|
||||||
#define portUSE_DIVIDER_SAVE_RESTORE !PICO_DIVIDER_DISABLE_INTERRUPTS
|
#define portUSE_DIVIDER_SAVE_RESTORE !PICO_DIVIDER_DISABLE_INTERRUPTS
|
||||||
|
|
|
@ -335,6 +335,8 @@
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Architecture specifics. */
|
/* Architecture specifics. */
|
||||||
|
#define portNORETURN __attribute__( ( noreturn ) )
|
||||||
|
|
||||||
#define portSTACK_GROWTH ( -1 )
|
#define portSTACK_GROWTH ( -1 )
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 4
|
#define portBYTE_ALIGNMENT 4
|
||||||
|
|
64
queue.c
64
queue.c
|
@ -64,14 +64,14 @@
|
||||||
|
|
||||||
typedef struct QueuePointers
|
typedef struct QueuePointers
|
||||||
{
|
{
|
||||||
int8_t * pcTail; /*< Points to the byte at the end of the queue storage area. Once more byte is allocated than necessary to store the queue items, this is used as a marker. */
|
int8_t * pcTail; /**< Points to the byte at the end of the queue storage area. Once more byte is allocated than necessary to store the queue items, this is used as a marker. */
|
||||||
int8_t * pcReadFrom; /*< Points to the last place that a queued item was read from when the structure is used as a queue. */
|
int8_t * pcReadFrom; /**< Points to the last place that a queued item was read from when the structure is used as a queue. */
|
||||||
} QueuePointers_t;
|
} QueuePointers_t;
|
||||||
|
|
||||||
typedef struct SemaphoreData
|
typedef struct SemaphoreData
|
||||||
{
|
{
|
||||||
TaskHandle_t xMutexHolder; /*< The handle of the task that holds the mutex. */
|
TaskHandle_t xMutexHolder; /**< The handle of the task that holds the mutex. */
|
||||||
UBaseType_t uxRecursiveCallCount; /*< Maintains a count of the number of times a recursive mutex has been recursively 'taken' when the structure is used as a mutex. */
|
UBaseType_t uxRecursiveCallCount; /**< Maintains a count of the number of times a recursive mutex has been recursively 'taken' when the structure is used as a mutex. */
|
||||||
} SemaphoreData_t;
|
} SemaphoreData_t;
|
||||||
|
|
||||||
/* Semaphores do not actually store or copy data, so have an item size of
|
/* Semaphores do not actually store or copy data, so have an item size of
|
||||||
|
@ -95,27 +95,27 @@ typedef struct SemaphoreData
|
||||||
*/
|
*/
|
||||||
typedef struct QueueDefinition /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
typedef struct QueueDefinition /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
||||||
{
|
{
|
||||||
int8_t * pcHead; /*< Points to the beginning of the queue storage area. */
|
int8_t * pcHead; /**< Points to the beginning of the queue storage area. */
|
||||||
int8_t * pcWriteTo; /*< Points to the free next place in the storage area. */
|
int8_t * pcWriteTo; /**< Points to the free next place in the storage area. */
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
QueuePointers_t xQueue; /*< Data required exclusively when this structure is used as a queue. */
|
QueuePointers_t xQueue; /**< Data required exclusively when this structure is used as a queue. */
|
||||||
SemaphoreData_t xSemaphore; /*< Data required exclusively when this structure is used as a semaphore. */
|
SemaphoreData_t xSemaphore; /**< Data required exclusively when this structure is used as a semaphore. */
|
||||||
} u;
|
} u;
|
||||||
|
|
||||||
List_t xTasksWaitingToSend; /*< List of tasks that are blocked waiting to post onto this queue. Stored in priority order. */
|
List_t xTasksWaitingToSend; /**< List of tasks that are blocked waiting to post onto this queue. Stored in priority order. */
|
||||||
List_t xTasksWaitingToReceive; /*< List of tasks that are blocked waiting to read from this queue. Stored in priority order. */
|
List_t xTasksWaitingToReceive; /**< List of tasks that are blocked waiting to read from this queue. Stored in priority order. */
|
||||||
|
|
||||||
volatile UBaseType_t uxMessagesWaiting; /*< The number of items currently in the queue. */
|
volatile UBaseType_t uxMessagesWaiting; /**< The number of items currently in the queue. */
|
||||||
UBaseType_t uxLength; /*< The length of the queue defined as the number of items it will hold, not the number of bytes. */
|
UBaseType_t uxLength; /**< The length of the queue defined as the number of items it will hold, not the number of bytes. */
|
||||||
UBaseType_t uxItemSize; /*< The size of each items that the queue will hold. */
|
UBaseType_t uxItemSize; /**< The size of each items that the queue will hold. */
|
||||||
|
|
||||||
volatile int8_t cRxLock; /*< Stores the number of items received from the queue (removed from the queue) while the queue was locked. Set to queueUNLOCKED when the queue is not locked. */
|
volatile int8_t cRxLock; /**< Stores the number of items received from the queue (removed from the queue) while the queue was locked. Set to queueUNLOCKED when the queue is not locked. */
|
||||||
volatile int8_t cTxLock; /*< Stores the number of items transmitted to the queue (added to the queue) while the queue was locked. Set to queueUNLOCKED when the queue is not locked. */
|
volatile int8_t cTxLock; /**< Stores the number of items transmitted to the queue (added to the queue) while the queue was locked. Set to queueUNLOCKED when the queue is not locked. */
|
||||||
|
|
||||||
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
||||||
uint8_t ucStaticallyAllocated; /*< Set to pdTRUE if the memory used by the queue was statically allocated to ensure no attempt is made to free the memory. */
|
uint8_t ucStaticallyAllocated; /**< Set to pdTRUE if the memory used by the queue was statically allocated to ensure no attempt is made to free the memory. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( configUSE_QUEUE_SETS == 1 )
|
#if ( configUSE_QUEUE_SETS == 1 )
|
||||||
|
@ -264,14 +264,14 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
||||||
* tasks than the number of tasks in the system.
|
* tasks than the number of tasks in the system.
|
||||||
*/
|
*/
|
||||||
#define prvIncrementQueueTxLock( pxQueue, cTxLock ) \
|
#define prvIncrementQueueTxLock( pxQueue, cTxLock ) \
|
||||||
{ \
|
do { \
|
||||||
const UBaseType_t uxNumberOfTasks = uxTaskGetNumberOfTasks(); \
|
const UBaseType_t uxNumberOfTasks = uxTaskGetNumberOfTasks(); \
|
||||||
if( ( UBaseType_t ) ( cTxLock ) < uxNumberOfTasks ) \
|
if( ( UBaseType_t ) ( cTxLock ) < uxNumberOfTasks ) \
|
||||||
{ \
|
{ \
|
||||||
configASSERT( ( cTxLock ) != queueINT8_MAX ); \
|
configASSERT( ( cTxLock ) != queueINT8_MAX ); \
|
||||||
( pxQueue )->cTxLock = ( int8_t ) ( ( cTxLock ) + ( int8_t ) 1 ); \
|
( pxQueue )->cTxLock = ( int8_t ) ( ( cTxLock ) + ( int8_t ) 1 ); \
|
||||||
} \
|
} \
|
||||||
}
|
} while( 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macro to increment cRxLock member of the queue data structure. It is
|
* Macro to increment cRxLock member of the queue data structure. It is
|
||||||
|
@ -279,14 +279,14 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
||||||
* tasks than the number of tasks in the system.
|
* tasks than the number of tasks in the system.
|
||||||
*/
|
*/
|
||||||
#define prvIncrementQueueRxLock( pxQueue, cRxLock ) \
|
#define prvIncrementQueueRxLock( pxQueue, cRxLock ) \
|
||||||
{ \
|
do { \
|
||||||
const UBaseType_t uxNumberOfTasks = uxTaskGetNumberOfTasks(); \
|
const UBaseType_t uxNumberOfTasks = uxTaskGetNumberOfTasks(); \
|
||||||
if( ( UBaseType_t ) ( cRxLock ) < uxNumberOfTasks ) \
|
if( ( UBaseType_t ) ( cRxLock ) < uxNumberOfTasks ) \
|
||||||
{ \
|
{ \
|
||||||
configASSERT( ( cRxLock ) != queueINT8_MAX ); \
|
configASSERT( ( cRxLock ) != queueINT8_MAX ); \
|
||||||
( pxQueue )->cRxLock = ( int8_t ) ( ( cRxLock ) + ( int8_t ) 1 ); \
|
( pxQueue )->cRxLock = ( int8_t ) ( ( cRxLock ) + ( int8_t ) 1 ); \
|
||||||
} \
|
} \
|
||||||
}
|
} while( 0 )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
||||||
|
@ -1046,7 +1046,7 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
||||||
const BaseType_t xCopyPosition )
|
const BaseType_t xCopyPosition )
|
||||||
{
|
{
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
Queue_t * const pxQueue = xQueue;
|
Queue_t * const pxQueue = xQueue;
|
||||||
|
|
||||||
configASSERT( pxQueue );
|
configASSERT( pxQueue );
|
||||||
|
@ -1074,7 +1074,7 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
||||||
* read, instead return a flag to say whether a context switch is required or
|
* read, instead return a flag to say whether a context switch is required or
|
||||||
* not (i.e. has a task with a higher priority than us been woken by this
|
* not (i.e. has a task with a higher priority than us been woken by this
|
||||||
* post). */
|
* post). */
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
||||||
{
|
{
|
||||||
|
@ -1199,7 +1199,7 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
||||||
xReturn = errQUEUE_FULL;
|
xReturn = errQUEUE_FULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -1209,7 +1209,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
||||||
BaseType_t * const pxHigherPriorityTaskWoken )
|
BaseType_t * const pxHigherPriorityTaskWoken )
|
||||||
{
|
{
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
Queue_t * const pxQueue = xQueue;
|
Queue_t * const pxQueue = xQueue;
|
||||||
|
|
||||||
/* Similar to xQueueGenericSendFromISR() but used with semaphores where the
|
/* Similar to xQueueGenericSendFromISR() but used with semaphores where the
|
||||||
|
@ -1245,7 +1245,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
||||||
* link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
* link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
|
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
|
||||||
|
|
||||||
|
@ -1365,7 +1365,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
||||||
xReturn = errQUEUE_FULL;
|
xReturn = errQUEUE_FULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -1880,7 +1880,7 @@ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue,
|
||||||
BaseType_t * const pxHigherPriorityTaskWoken )
|
BaseType_t * const pxHigherPriorityTaskWoken )
|
||||||
{
|
{
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
Queue_t * const pxQueue = xQueue;
|
Queue_t * const pxQueue = xQueue;
|
||||||
|
|
||||||
configASSERT( pxQueue );
|
configASSERT( pxQueue );
|
||||||
|
@ -1902,7 +1902,7 @@ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue,
|
||||||
* link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
* link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
|
const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
|
||||||
|
|
||||||
|
@ -1962,7 +1962,7 @@ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue,
|
||||||
traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );
|
traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -1972,7 +1972,7 @@ BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue,
|
||||||
void * const pvBuffer )
|
void * const pvBuffer )
|
||||||
{
|
{
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
int8_t * pcOriginalReadPosition;
|
int8_t * pcOriginalReadPosition;
|
||||||
Queue_t * const pxQueue = xQueue;
|
Queue_t * const pxQueue = xQueue;
|
||||||
|
|
||||||
|
@ -1996,7 +1996,7 @@ BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue,
|
||||||
* link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
* link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
/* Cannot block in an ISR, so check there is data available. */
|
/* Cannot block in an ISR, so check there is data available. */
|
||||||
if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 )
|
if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 )
|
||||||
|
@ -2017,7 +2017,7 @@ BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue,
|
||||||
traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue );
|
traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
( pxStreamBuffer )->xTaskWaitingToSend = NULL; \
|
( pxStreamBuffer )->xTaskWaitingToSend = NULL; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll()
|
||||||
#endif /* sbRECEIVE_COMPLETED */
|
#endif /* sbRECEIVE_COMPLETED */
|
||||||
|
|
||||||
/* If user has provided a per-instance receive complete callback, then
|
/* If user has provided a per-instance receive complete callback, then
|
||||||
|
@ -95,10 +95,10 @@
|
||||||
#ifndef sbRECEIVE_COMPLETED_FROM_ISR
|
#ifndef sbRECEIVE_COMPLETED_FROM_ISR
|
||||||
#define sbRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, \
|
#define sbRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, \
|
||||||
pxHigherPriorityTaskWoken ) \
|
pxHigherPriorityTaskWoken ) \
|
||||||
{ \
|
do { \
|
||||||
UBaseType_t uxSavedInterruptStatus; \
|
portBASE_TYPE xSavedInterruptStatus; \
|
||||||
\
|
\
|
||||||
uxSavedInterruptStatus = ( UBaseType_t ) portSET_INTERRUPT_MASK_FROM_ISR(); \
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); \
|
||||||
{ \
|
{ \
|
||||||
if( ( pxStreamBuffer )->xTaskWaitingToSend != NULL ) \
|
if( ( pxStreamBuffer )->xTaskWaitingToSend != NULL ) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -109,8 +109,8 @@
|
||||||
( pxStreamBuffer )->xTaskWaitingToSend = NULL; \
|
( pxStreamBuffer )->xTaskWaitingToSend = NULL; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); \
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus ); \
|
||||||
}
|
} while( 0 )
|
||||||
#endif /* sbRECEIVE_COMPLETED_FROM_ISR */
|
#endif /* sbRECEIVE_COMPLETED_FROM_ISR */
|
||||||
|
|
||||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
( pxStreamBuffer )->xTaskWaitingToReceive = NULL; \
|
( pxStreamBuffer )->xTaskWaitingToReceive = NULL; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll()
|
||||||
#endif /* sbSEND_COMPLETED */
|
#endif /* sbSEND_COMPLETED */
|
||||||
|
|
||||||
/* If user has provided a per-instance send completed callback, then
|
/* If user has provided a per-instance send completed callback, then
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
*/
|
*/
|
||||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||||
#define prvSEND_COMPLETED( pxStreamBuffer ) \
|
#define prvSEND_COMPLETED( pxStreamBuffer ) \
|
||||||
{ \
|
do { \
|
||||||
if( ( pxStreamBuffer )->pxSendCompletedCallback != NULL ) \
|
if( ( pxStreamBuffer )->pxSendCompletedCallback != NULL ) \
|
||||||
{ \
|
{ \
|
||||||
pxStreamBuffer->pxSendCompletedCallback( ( pxStreamBuffer ), pdFALSE, NULL ); \
|
pxStreamBuffer->pxSendCompletedCallback( ( pxStreamBuffer ), pdFALSE, NULL ); \
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
{ \
|
{ \
|
||||||
sbSEND_COMPLETED( ( pxStreamBuffer ) ); \
|
sbSEND_COMPLETED( ( pxStreamBuffer ) ); \
|
||||||
} \
|
} \
|
||||||
}
|
} while( 0 )
|
||||||
#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||||
#define prvSEND_COMPLETED( pxStreamBuffer ) sbSEND_COMPLETED( ( pxStreamBuffer ) )
|
#define prvSEND_COMPLETED( pxStreamBuffer ) sbSEND_COMPLETED( ( pxStreamBuffer ) )
|
||||||
#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||||
|
@ -172,10 +172,10 @@
|
||||||
|
|
||||||
#ifndef sbSEND_COMPLETE_FROM_ISR
|
#ifndef sbSEND_COMPLETE_FROM_ISR
|
||||||
#define sbSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
#define sbSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
||||||
{ \
|
do { \
|
||||||
UBaseType_t uxSavedInterruptStatus; \
|
portBASE_TYPE xSavedInterruptStatus; \
|
||||||
\
|
\
|
||||||
uxSavedInterruptStatus = ( UBaseType_t ) portSET_INTERRUPT_MASK_FROM_ISR(); \
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); \
|
||||||
{ \
|
{ \
|
||||||
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL ) \
|
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL ) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -186,14 +186,14 @@
|
||||||
( pxStreamBuffer )->xTaskWaitingToReceive = NULL; \
|
( pxStreamBuffer )->xTaskWaitingToReceive = NULL; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); \
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus ); \
|
||||||
}
|
} while( 0 )
|
||||||
#endif /* sbSEND_COMPLETE_FROM_ISR */
|
#endif /* sbSEND_COMPLETE_FROM_ISR */
|
||||||
|
|
||||||
|
|
||||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||||
#define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
#define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
||||||
{ \
|
do { \
|
||||||
if( ( pxStreamBuffer )->pxSendCompletedCallback != NULL ) \
|
if( ( pxStreamBuffer )->pxSendCompletedCallback != NULL ) \
|
||||||
{ \
|
{ \
|
||||||
( pxStreamBuffer )->pxSendCompletedCallback( ( pxStreamBuffer ), pdTRUE, ( pxHigherPriorityTaskWoken ) ); \
|
( pxStreamBuffer )->pxSendCompletedCallback( ( pxStreamBuffer ), pdTRUE, ( pxHigherPriorityTaskWoken ) ); \
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
{ \
|
{ \
|
||||||
sbSEND_COMPLETE_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) ); \
|
sbSEND_COMPLETE_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) ); \
|
||||||
} \
|
} \
|
||||||
}
|
} while( 0 )
|
||||||
#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||||
#define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
#define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
||||||
sbSEND_COMPLETE_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) )
|
sbSEND_COMPLETE_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) )
|
||||||
|
@ -436,13 +436,11 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
||||||
configASSERT( xBufferSizeBytes > sbBYTES_TO_STORE_MESSAGE_LENGTH );
|
configASSERT( xBufferSizeBytes > sbBYTES_TO_STORE_MESSAGE_LENGTH );
|
||||||
|
|
||||||
#if ( configASSERT_DEFINED == 1 )
|
#if ( configASSERT_DEFINED == 1 )
|
||||||
{
|
|
||||||
/* Sanity check that the size of the structure used to declare a
|
/* Sanity check that the size of the structure used to declare a
|
||||||
* variable of type StaticStreamBuffer_t equals the size of the real
|
* variable of type StaticStreamBuffer_t equals the size of the real
|
||||||
* message buffer structure. */
|
* message buffer structure. */
|
||||||
volatile size_t xSize = sizeof( StaticStreamBuffer_t );
|
configASSERT( sizeof( StaticStreamBuffer_t ) == sizeof( StreamBuffer_t ) );
|
||||||
configASSERT( xSize == sizeof( StreamBuffer_t ) );
|
|
||||||
} /*lint !e529 xSize is referenced is configASSERT() is defined. */
|
|
||||||
#endif /* configASSERT_DEFINED */
|
#endif /* configASSERT_DEFINED */
|
||||||
|
|
||||||
if( ( pucStreamBufferStorageArea != NULL ) && ( pxStaticStreamBuffer != NULL ) )
|
if( ( pucStreamBufferStorageArea != NULL ) && ( pxStaticStreamBuffer != NULL ) )
|
||||||
|
@ -1188,11 +1186,11 @@ BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer
|
||||||
{
|
{
|
||||||
StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
|
|
||||||
configASSERT( pxStreamBuffer );
|
configASSERT( pxStreamBuffer );
|
||||||
|
|
||||||
uxSavedInterruptStatus = ( UBaseType_t ) portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL )
|
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL )
|
||||||
{
|
{
|
||||||
|
@ -1208,7 +1206,7 @@ BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -1219,11 +1217,11 @@ BaseType_t xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuf
|
||||||
{
|
{
|
||||||
StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
StreamBuffer_t * const pxStreamBuffer = xStreamBuffer;
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
|
|
||||||
configASSERT( pxStreamBuffer );
|
configASSERT( pxStreamBuffer );
|
||||||
|
|
||||||
uxSavedInterruptStatus = ( UBaseType_t ) portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
if( ( pxStreamBuffer )->xTaskWaitingToSend != NULL )
|
if( ( pxStreamBuffer )->xTaskWaitingToSend != NULL )
|
||||||
{
|
{
|
||||||
|
@ -1239,7 +1237,7 @@ BaseType_t xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuf
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -1372,9 +1370,9 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
||||||
/* The value written just has to be identifiable when looking at the
|
/* The value written just has to be identifiable when looking at the
|
||||||
* memory. Don't use 0xA5 as that is the stack fill value and could
|
* memory. Don't use 0xA5 as that is the stack fill value and could
|
||||||
* result in confusion as to what is actually being observed. */
|
* result in confusion as to what is actually being observed. */
|
||||||
const BaseType_t xWriteValue = 0x55;
|
#define STREAM_BUFFER_BUFFER_WRITE_VALUE ( 0x55 )
|
||||||
configASSERT( memset( pucBuffer, ( int ) xWriteValue, xBufferSizeBytes ) == pucBuffer );
|
configASSERT( memset( pucBuffer, ( int ) STREAM_BUFFER_BUFFER_WRITE_VALUE, xBufferSizeBytes ) == pucBuffer );
|
||||||
} /*lint !e529 !e438 xWriteValue is only used if configASSERT() is defined. */
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
( void ) memset( ( void * ) pxStreamBuffer, 0x00, sizeof( StreamBuffer_t ) ); /*lint !e9087 memset() requires void *. */
|
( void ) memset( ( void * ) pxStreamBuffer, 0x00, sizeof( StreamBuffer_t ) ); /*lint !e9087 memset() requires void *. */
|
||||||
|
|
128
tasks.c
128
tasks.c
|
@ -134,7 +134,7 @@
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#define taskSELECT_HIGHEST_PRIORITY_TASK() \
|
#define taskSELECT_HIGHEST_PRIORITY_TASK() \
|
||||||
{ \
|
do { \
|
||||||
UBaseType_t uxTopPriority = uxTopReadyPriority; \
|
UBaseType_t uxTopPriority = uxTopReadyPriority; \
|
||||||
\
|
\
|
||||||
/* Find the highest priority queue that contains ready tasks. */ \
|
/* Find the highest priority queue that contains ready tasks. */ \
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
* the same priority get an equal share of the processor time. */ \
|
* the same priority get an equal share of the processor time. */ \
|
||||||
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopPriority ] ) ); \
|
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopPriority ] ) ); \
|
||||||
uxTopReadyPriority = uxTopPriority; \
|
uxTopReadyPriority = uxTopPriority; \
|
||||||
} /* taskSELECT_HIGHEST_PRIORITY_TASK */
|
} while( 0 ) /* taskSELECT_HIGHEST_PRIORITY_TASK */
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -170,14 +170,14 @@
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#define taskSELECT_HIGHEST_PRIORITY_TASK() \
|
#define taskSELECT_HIGHEST_PRIORITY_TASK() \
|
||||||
{ \
|
do { \
|
||||||
UBaseType_t uxTopPriority; \
|
UBaseType_t uxTopPriority; \
|
||||||
\
|
\
|
||||||
/* Find the highest priority list that contains ready tasks. */ \
|
/* Find the highest priority list that contains ready tasks. */ \
|
||||||
portGET_HIGHEST_PRIORITY( uxTopPriority, uxTopReadyPriority ); \
|
portGET_HIGHEST_PRIORITY( uxTopPriority, uxTopReadyPriority ); \
|
||||||
configASSERT( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ uxTopPriority ] ) ) > 0 ); \
|
configASSERT( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ uxTopPriority ] ) ) > 0 ); \
|
||||||
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopPriority ] ) ); \
|
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopPriority ] ) ); \
|
||||||
} /* taskSELECT_HIGHEST_PRIORITY_TASK() */
|
} while( 0 )
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -185,12 +185,12 @@
|
||||||
* is being referenced from a ready list. If it is referenced from a delayed
|
* is being referenced from a ready list. If it is referenced from a delayed
|
||||||
* or suspended list then it won't be in a ready list. */
|
* or suspended list then it won't be in a ready list. */
|
||||||
#define taskRESET_READY_PRIORITY( uxPriority ) \
|
#define taskRESET_READY_PRIORITY( uxPriority ) \
|
||||||
{ \
|
do { \
|
||||||
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ ( uxPriority ) ] ) ) == ( UBaseType_t ) 0 ) \
|
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ ( uxPriority ) ] ) ) == ( UBaseType_t ) 0 ) \
|
||||||
{ \
|
{ \
|
||||||
portRESET_READY_PRIORITY( ( uxPriority ), ( uxTopReadyPriority ) ); \
|
portRESET_READY_PRIORITY( ( uxPriority ), ( uxTopReadyPriority ) ); \
|
||||||
} \
|
} \
|
||||||
}
|
} while( 0 )
|
||||||
|
|
||||||
#endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */
|
#endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@
|
||||||
/* pxDelayedTaskList and pxOverflowDelayedTaskList are switched when the tick
|
/* pxDelayedTaskList and pxOverflowDelayedTaskList are switched when the tick
|
||||||
* count overflows. */
|
* count overflows. */
|
||||||
#define taskSWITCH_DELAYED_LISTS() \
|
#define taskSWITCH_DELAYED_LISTS() \
|
||||||
{ \
|
do { \
|
||||||
List_t * pxTemp; \
|
List_t * pxTemp; \
|
||||||
\
|
\
|
||||||
/* The delayed tasks list should be empty when the lists are switched. */ \
|
/* The delayed tasks list should be empty when the lists are switched. */ \
|
||||||
|
@ -210,7 +210,7 @@
|
||||||
pxOverflowDelayedTaskList = pxTemp; \
|
pxOverflowDelayedTaskList = pxTemp; \
|
||||||
xNumOfOverflows++; \
|
xNumOfOverflows++; \
|
||||||
prvResetNextTaskUnblockTime(); \
|
prvResetNextTaskUnblockTime(); \
|
||||||
}
|
} while( 0 )
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -218,11 +218,13 @@
|
||||||
* Place the task represented by pxTCB into the appropriate ready list for
|
* Place the task represented by pxTCB into the appropriate ready list for
|
||||||
* the task. It is inserted at the end of the list.
|
* the task. It is inserted at the end of the list.
|
||||||
*/
|
*/
|
||||||
#define prvAddTaskToReadyList( pxTCB ) \
|
#define prvAddTaskToReadyList( pxTCB ) \
|
||||||
traceMOVED_TASK_TO_READY_STATE( pxTCB ); \
|
do { \
|
||||||
taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \
|
traceMOVED_TASK_TO_READY_STATE( pxTCB ); \
|
||||||
listINSERT_END( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \
|
taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \
|
||||||
tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
|
listINSERT_END( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \
|
||||||
|
tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ); \
|
||||||
|
} while( 0 )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -256,33 +258,33 @@
|
||||||
*/
|
*/
|
||||||
typedef struct tskTaskControlBlock /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
typedef struct tskTaskControlBlock /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
||||||
{
|
{
|
||||||
volatile StackType_t * pxTopOfStack; /*< Points to the location of the last item placed on the tasks stack. THIS MUST BE THE FIRST MEMBER OF THE TCB STRUCT. */
|
volatile StackType_t * pxTopOfStack; /**< Points to the location of the last item placed on the tasks stack. THIS MUST BE THE FIRST MEMBER OF THE TCB STRUCT. */
|
||||||
|
|
||||||
#if ( portUSING_MPU_WRAPPERS == 1 )
|
#if ( portUSING_MPU_WRAPPERS == 1 )
|
||||||
xMPU_SETTINGS xMPUSettings; /*< The MPU settings are defined as part of the port layer. THIS MUST BE THE SECOND MEMBER OF THE TCB STRUCT. */
|
xMPU_SETTINGS xMPUSettings; /**< The MPU settings are defined as part of the port layer. THIS MUST BE THE SECOND MEMBER OF THE TCB STRUCT. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ListItem_t xStateListItem; /*< The list that the state list item of a task is reference from denotes the state of that task (Ready, Blocked, Suspended ). */
|
ListItem_t xStateListItem; /**< The list that the state list item of a task is reference from denotes the state of that task (Ready, Blocked, Suspended ). */
|
||||||
ListItem_t xEventListItem; /*< Used to reference a task from an event list. */
|
ListItem_t xEventListItem; /**< Used to reference a task from an event list. */
|
||||||
UBaseType_t uxPriority; /*< The priority of the task. 0 is the lowest priority. */
|
UBaseType_t uxPriority; /**< The priority of the task. 0 is the lowest priority. */
|
||||||
StackType_t * pxStack; /*< Points to the start of the stack. */
|
StackType_t * pxStack; /**< Points to the start of the stack. */
|
||||||
char pcTaskName[ configMAX_TASK_NAME_LEN ]; /*< Descriptive name given to the task when created. Facilitates debugging only. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
char pcTaskName[ configMAX_TASK_NAME_LEN ]; /**< Descriptive name given to the task when created. Facilitates debugging only. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||||
|
|
||||||
#if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
|
#if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
|
||||||
StackType_t * pxEndOfStack; /*< Points to the highest valid address for the stack. */
|
StackType_t * pxEndOfStack; /**< Points to the highest valid address for the stack. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( portCRITICAL_NESTING_IN_TCB == 1 )
|
#if ( portCRITICAL_NESTING_IN_TCB == 1 )
|
||||||
UBaseType_t uxCriticalNesting; /*< Holds the critical section nesting depth for ports that do not maintain their own count in the port layer. */
|
UBaseType_t uxCriticalNesting; /**< Holds the critical section nesting depth for ports that do not maintain their own count in the port layer. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||||
UBaseType_t uxTCBNumber; /*< Stores a number that increments each time a TCB is created. It allows debuggers to determine when a task has been deleted and then recreated. */
|
UBaseType_t uxTCBNumber; /**< Stores a number that increments each time a TCB is created. It allows debuggers to determine when a task has been deleted and then recreated. */
|
||||||
UBaseType_t uxTaskNumber; /*< Stores a number specifically for use by third party trace code. */
|
UBaseType_t uxTaskNumber; /**< Stores a number specifically for use by third party trace code. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( configUSE_MUTEXES == 1 )
|
#if ( configUSE_MUTEXES == 1 )
|
||||||
UBaseType_t uxBasePriority; /*< The priority last assigned to the task - used by the priority inheritance mechanism. */
|
UBaseType_t uxBasePriority; /**< The priority last assigned to the task - used by the priority inheritance mechanism. */
|
||||||
UBaseType_t uxMutexesHeld;
|
UBaseType_t uxMutexesHeld;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -295,11 +297,11 @@ typedef struct tskTaskControlBlock /* The old naming convention is used to
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( configGENERATE_RUN_TIME_STATS == 1 )
|
#if ( configGENERATE_RUN_TIME_STATS == 1 )
|
||||||
configRUN_TIME_COUNTER_TYPE ulRunTimeCounter; /*< Stores the amount of time the task has spent in the Running state. */
|
configRUN_TIME_COUNTER_TYPE ulRunTimeCounter; /**< Stores the amount of time the task has spent in the Running state. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( ( configUSE_NEWLIB_REENTRANT == 1 ) || ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) )
|
#if ( ( configUSE_NEWLIB_REENTRANT == 1 ) || ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) )
|
||||||
configTLS_BLOCK_TYPE xTLSBlock; /*< Memory block used as Thread Local Storage (TLS) Block for the task. */
|
configTLS_BLOCK_TYPE xTLSBlock; /**< Memory block used as Thread Local Storage (TLS) Block for the task. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( configUSE_TASK_NOTIFICATIONS == 1 )
|
#if ( configUSE_TASK_NOTIFICATIONS == 1 )
|
||||||
|
@ -310,7 +312,7 @@ typedef struct tskTaskControlBlock /* The old naming convention is used to
|
||||||
/* See the comments in FreeRTOS.h with the definition of
|
/* See the comments in FreeRTOS.h with the definition of
|
||||||
* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE. */
|
* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE. */
|
||||||
#if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e731 !e9029 Macro has been consolidated for readability reasons. */
|
#if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 ) /*lint !e731 !e9029 Macro has been consolidated for readability reasons. */
|
||||||
uint8_t ucStaticallyAllocated; /*< Set to pdTRUE if the task is a statically allocated to ensure no attempt is made to free the memory. */
|
uint8_t ucStaticallyAllocated; /**< Set to pdTRUE if the task is a statically allocated to ensure no attempt is made to free the memory. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( INCLUDE_xTaskAbortDelay == 1 )
|
#if ( INCLUDE_xTaskAbortDelay == 1 )
|
||||||
|
@ -334,23 +336,23 @@ portDONT_DISCARD PRIVILEGED_DATA TCB_t * volatile pxCurrentTCB = NULL;
|
||||||
* xDelayedTaskList1 and xDelayedTaskList2 could be moved to function scope but
|
* xDelayedTaskList1 and xDelayedTaskList2 could be moved to function scope but
|
||||||
* doing so breaks some kernel aware debuggers and debuggers that rely on removing
|
* doing so breaks some kernel aware debuggers and debuggers that rely on removing
|
||||||
* the static qualifier. */
|
* the static qualifier. */
|
||||||
PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ]; /*< Prioritised ready tasks. */
|
PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ]; /**< Prioritised ready tasks. */
|
||||||
PRIVILEGED_DATA static List_t xDelayedTaskList1; /*< Delayed tasks. */
|
PRIVILEGED_DATA static List_t xDelayedTaskList1; /**< Delayed tasks. */
|
||||||
PRIVILEGED_DATA static List_t xDelayedTaskList2; /*< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */
|
PRIVILEGED_DATA static List_t xDelayedTaskList2; /**< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */
|
||||||
PRIVILEGED_DATA static List_t * volatile pxDelayedTaskList; /*< Points to the delayed task list currently being used. */
|
PRIVILEGED_DATA static List_t * volatile pxDelayedTaskList; /**< Points to the delayed task list currently being used. */
|
||||||
PRIVILEGED_DATA static List_t * volatile pxOverflowDelayedTaskList; /*< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */
|
PRIVILEGED_DATA static List_t * volatile pxOverflowDelayedTaskList; /**< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */
|
||||||
PRIVILEGED_DATA static List_t xPendingReadyList; /*< Tasks that have been readied while the scheduler was suspended. They will be moved to the ready list when the scheduler is resumed. */
|
PRIVILEGED_DATA static List_t xPendingReadyList; /**< Tasks that have been readied while the scheduler was suspended. They will be moved to the ready list when the scheduler is resumed. */
|
||||||
|
|
||||||
#if ( INCLUDE_vTaskDelete == 1 )
|
#if ( INCLUDE_vTaskDelete == 1 )
|
||||||
|
|
||||||
PRIVILEGED_DATA static List_t xTasksWaitingTermination; /*< Tasks that have been deleted - but their memory not yet freed. */
|
PRIVILEGED_DATA static List_t xTasksWaitingTermination; /**< Tasks that have been deleted - but their memory not yet freed. */
|
||||||
PRIVILEGED_DATA static volatile UBaseType_t uxDeletedTasksWaitingCleanUp = ( UBaseType_t ) 0U;
|
PRIVILEGED_DATA static volatile UBaseType_t uxDeletedTasksWaitingCleanUp = ( UBaseType_t ) 0U;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( INCLUDE_vTaskSuspend == 1 )
|
#if ( INCLUDE_vTaskSuspend == 1 )
|
||||||
|
|
||||||
PRIVILEGED_DATA static List_t xSuspendedTaskList; /*< Tasks that are currently suspended. */
|
PRIVILEGED_DATA static List_t xSuspendedTaskList; /**< Tasks that are currently suspended. */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -370,7 +372,7 @@ PRIVILEGED_DATA static volatile BaseType_t xYieldPending = pdFALSE;
|
||||||
PRIVILEGED_DATA static volatile BaseType_t xNumOfOverflows = ( BaseType_t ) 0;
|
PRIVILEGED_DATA static volatile BaseType_t xNumOfOverflows = ( BaseType_t ) 0;
|
||||||
PRIVILEGED_DATA static UBaseType_t uxTaskNumber = ( UBaseType_t ) 0U;
|
PRIVILEGED_DATA static UBaseType_t uxTaskNumber = ( UBaseType_t ) 0U;
|
||||||
PRIVILEGED_DATA static volatile TickType_t xNextTaskUnblockTime = ( TickType_t ) 0U; /* Initialised to portMAX_DELAY before the scheduler starts. */
|
PRIVILEGED_DATA static volatile TickType_t xNextTaskUnblockTime = ( TickType_t ) 0U; /* Initialised to portMAX_DELAY before the scheduler starts. */
|
||||||
PRIVILEGED_DATA static TaskHandle_t xIdleTaskHandle = NULL; /*< Holds the handle of the idle task. The idle task is created automatically when the scheduler is started. */
|
PRIVILEGED_DATA static TaskHandle_t xIdleTaskHandle = NULL; /**< Holds the handle of the idle task. The idle task is created automatically when the scheduler is started. */
|
||||||
|
|
||||||
/* Improve support for OpenOCD. The kernel tracks Ready tasks via priority lists.
|
/* Improve support for OpenOCD. The kernel tracks Ready tasks via priority lists.
|
||||||
* For tracking the state of remote threads, OpenOCD uses uxTopUsedPriority
|
* For tracking the state of remote threads, OpenOCD uses uxTopUsedPriority
|
||||||
|
@ -391,8 +393,8 @@ PRIVILEGED_DATA static volatile UBaseType_t uxSchedulerSuspended = ( UBaseType_t
|
||||||
|
|
||||||
/* Do not move these variables to function scope as doing so prevents the
|
/* Do not move these variables to function scope as doing so prevents the
|
||||||
* code working with debuggers that need to remove the static qualifier. */
|
* code working with debuggers that need to remove the static qualifier. */
|
||||||
PRIVILEGED_DATA static configRUN_TIME_COUNTER_TYPE ulTaskSwitchedInTime = 0UL; /*< Holds the value of a timer/counter the last time a task was switched in. */
|
PRIVILEGED_DATA static configRUN_TIME_COUNTER_TYPE ulTaskSwitchedInTime = 0UL; /**< Holds the value of a timer/counter the last time a task was switched in. */
|
||||||
PRIVILEGED_DATA static volatile configRUN_TIME_COUNTER_TYPE ulTotalRunTime = 0UL; /*< Holds the total amount of execution time as defined by the run time counter clock. */
|
PRIVILEGED_DATA static volatile configRUN_TIME_COUNTER_TYPE ulTotalRunTime = 0UL; /**< Holds the total amount of execution time as defined by the run time counter clock. */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -430,7 +432,7 @@ static void prvInitialiseTaskLists( void ) PRIVILEGED_FUNCTION;
|
||||||
* void prvIdleTask( void *pvParameters );
|
* void prvIdleTask( void *pvParameters );
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static portTASK_FUNCTION_PROTO( prvIdleTask, pvParameters ) PRIVILEGED_FUNCTION;
|
static portTASK_FUNCTION_PROTO( prvIdleTask, pvParameters ) portNORETURN PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Utility to free all memory allocated by the scheduler to hold a TCB,
|
* Utility to free all memory allocated by the scheduler to hold a TCB,
|
||||||
|
@ -1469,7 +1471,8 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
||||||
UBaseType_t uxTaskPriorityGetFromISR( const TaskHandle_t xTask )
|
UBaseType_t uxTaskPriorityGetFromISR( const TaskHandle_t xTask )
|
||||||
{
|
{
|
||||||
TCB_t const * pxTCB;
|
TCB_t const * pxTCB;
|
||||||
UBaseType_t uxReturn, uxSavedInterruptState;
|
UBaseType_t uxReturn;
|
||||||
|
portBASE_TYPE xSavedInterruptState;
|
||||||
|
|
||||||
/* RTOS ports that support interrupt nesting have the concept of a
|
/* RTOS ports that support interrupt nesting have the concept of a
|
||||||
* maximum system call (or maximum API call) interrupt priority.
|
* maximum system call (or maximum API call) interrupt priority.
|
||||||
|
@ -1489,14 +1492,14 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
||||||
* https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
* https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptState = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptState = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
/* If null is passed in here then it is the priority of the calling
|
/* If null is passed in here then it is the priority of the calling
|
||||||
* task that is being queried. */
|
* task that is being queried. */
|
||||||
pxTCB = prvGetTCBFromHandle( xTask );
|
pxTCB = prvGetTCBFromHandle( xTask );
|
||||||
uxReturn = pxTCB->uxPriority;
|
uxReturn = pxTCB->uxPriority;
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptState );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptState );
|
||||||
|
|
||||||
return uxReturn;
|
return uxReturn;
|
||||||
}
|
}
|
||||||
|
@ -1882,7 +1885,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
||||||
{
|
{
|
||||||
BaseType_t xYieldRequired = pdFALSE;
|
BaseType_t xYieldRequired = pdFALSE;
|
||||||
TCB_t * const pxTCB = xTaskToResume;
|
TCB_t * const pxTCB = xTaskToResume;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
|
|
||||||
configASSERT( xTaskToResume );
|
configASSERT( xTaskToResume );
|
||||||
|
|
||||||
|
@ -1904,7 +1907,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
||||||
* https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
* https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
if( prvTaskIsTaskSuspended( pxTCB ) != pdFALSE )
|
if( prvTaskIsTaskSuspended( pxTCB ) != pdFALSE )
|
||||||
{
|
{
|
||||||
|
@ -1945,7 +1948,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
||||||
mtCOVERAGE_TEST_MARKER();
|
mtCOVERAGE_TEST_MARKER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xYieldRequired;
|
return xYieldRequired;
|
||||||
}
|
}
|
||||||
|
@ -2303,7 +2306,7 @@ TickType_t xTaskGetTickCount( void )
|
||||||
TickType_t xTaskGetTickCountFromISR( void )
|
TickType_t xTaskGetTickCountFromISR( void )
|
||||||
{
|
{
|
||||||
TickType_t xReturn;
|
TickType_t xReturn;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
|
|
||||||
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
||||||
* system call (or maximum API call) interrupt priority. Interrupts that are
|
* system call (or maximum API call) interrupt priority. Interrupts that are
|
||||||
|
@ -2321,11 +2324,11 @@ TickType_t xTaskGetTickCountFromISR( void )
|
||||||
* link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
* link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
|
||||||
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
|
||||||
|
|
||||||
uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
xReturn = xTickCount;
|
xReturn = xTickCount;
|
||||||
}
|
}
|
||||||
portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -2535,7 +2538,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) /*lint !e971 Unqualified char
|
||||||
#ifdef portALT_GET_RUN_TIME_COUNTER_VALUE
|
#ifdef portALT_GET_RUN_TIME_COUNTER_VALUE
|
||||||
portALT_GET_RUN_TIME_COUNTER_VALUE( ( *pulTotalRunTime ) );
|
portALT_GET_RUN_TIME_COUNTER_VALUE( ( *pulTotalRunTime ) );
|
||||||
#else
|
#else
|
||||||
*pulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();
|
*pulTotalRunTime = ( configRUN_TIME_COUNTER_TYPE ) portGET_RUN_TIME_COUNTER_VALUE();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2956,18 +2959,18 @@ BaseType_t xTaskIncrementTick( void )
|
||||||
{
|
{
|
||||||
TCB_t * pxTCB;
|
TCB_t * pxTCB;
|
||||||
TaskHookFunction_t xReturn;
|
TaskHookFunction_t xReturn;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
|
|
||||||
/* If xTask is NULL then set the calling task's hook. */
|
/* If xTask is NULL then set the calling task's hook. */
|
||||||
pxTCB = prvGetTCBFromHandle( xTask );
|
pxTCB = prvGetTCBFromHandle( xTask );
|
||||||
|
|
||||||
/* Save the hook function in the TCB. A critical section is required as
|
/* Save the hook function in the TCB. A critical section is required as
|
||||||
* the value can be accessed from an interrupt. */
|
* the value can be accessed from an interrupt. */
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
xReturn = pxTCB->pxTaskTag;
|
xReturn = pxTCB->pxTaskTag;
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -3026,7 +3029,7 @@ void vTaskSwitchContext( void )
|
||||||
#ifdef portALT_GET_RUN_TIME_COUNTER_VALUE
|
#ifdef portALT_GET_RUN_TIME_COUNTER_VALUE
|
||||||
portALT_GET_RUN_TIME_COUNTER_VALUE( ulTotalRunTime );
|
portALT_GET_RUN_TIME_COUNTER_VALUE( ulTotalRunTime );
|
||||||
#else
|
#else
|
||||||
ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();
|
ulTotalRunTime = ( configRUN_TIME_COUNTER_TYPE ) portGET_RUN_TIME_COUNTER_VALUE();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Add the amount of time the task has been running to the
|
/* Add the amount of time the task has been running to the
|
||||||
|
@ -3426,7 +3429,8 @@ void vTaskMissedYield( void )
|
||||||
* void prvIdleTask( void *pvParameters );
|
* void prvIdleTask( void *pvParameters );
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static portTASK_FUNCTION( prvIdleTask, pvParameters )
|
|
||||||
|
portTASK_FUNCTION( prvIdleTask, pvParameters )
|
||||||
{
|
{
|
||||||
/* Stop warnings. */
|
/* Stop warnings. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
@ -4975,7 +4979,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
TCB_t * pxTCB;
|
TCB_t * pxTCB;
|
||||||
uint8_t ucOriginalNotifyState;
|
uint8_t ucOriginalNotifyState;
|
||||||
BaseType_t xReturn = pdPASS;
|
BaseType_t xReturn = pdPASS;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
|
|
||||||
configASSERT( xTaskToNotify );
|
configASSERT( xTaskToNotify );
|
||||||
configASSERT( uxIndexToNotify < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
configASSERT( uxIndexToNotify < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
||||||
|
@ -5000,7 +5004,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
|
|
||||||
pxTCB = xTaskToNotify;
|
pxTCB = xTaskToNotify;
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
if( pulPreviousNotificationValue != NULL )
|
if( pulPreviousNotificationValue != NULL )
|
||||||
{
|
{
|
||||||
|
@ -5094,7 +5098,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -5110,7 +5114,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
{
|
{
|
||||||
TCB_t * pxTCB;
|
TCB_t * pxTCB;
|
||||||
uint8_t ucOriginalNotifyState;
|
uint8_t ucOriginalNotifyState;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
portBASE_TYPE xSavedInterruptStatus;
|
||||||
|
|
||||||
configASSERT( xTaskToNotify );
|
configASSERT( xTaskToNotify );
|
||||||
configASSERT( uxIndexToNotify < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
configASSERT( uxIndexToNotify < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
||||||
|
@ -5135,7 +5139,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
|
|
||||||
pxTCB = xTaskToNotify;
|
pxTCB = xTaskToNotify;
|
||||||
|
|
||||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||||
{
|
{
|
||||||
ucOriginalNotifyState = pxTCB->ucNotifyState[ uxIndexToNotify ];
|
ucOriginalNotifyState = pxTCB->ucNotifyState[ uxIndexToNotify ];
|
||||||
pxTCB->ucNotifyState[ uxIndexToNotify ] = taskNOTIFICATION_RECEIVED;
|
pxTCB->ucNotifyState[ uxIndexToNotify ] = taskNOTIFICATION_RECEIVED;
|
||||||
|
@ -5185,7 +5189,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* configUSE_TASK_NOTIFICATIONS */
|
#endif /* configUSE_TASK_NOTIFICATIONS */
|
||||||
|
@ -5269,7 +5273,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
{
|
{
|
||||||
configRUN_TIME_COUNTER_TYPE ulTotalTime, ulReturn;
|
configRUN_TIME_COUNTER_TYPE ulTotalTime, ulReturn;
|
||||||
|
|
||||||
ulTotalTime = portGET_RUN_TIME_COUNTER_VALUE();
|
ulTotalTime = ( configRUN_TIME_COUNTER_TYPE ) portGET_RUN_TIME_COUNTER_VALUE();
|
||||||
|
|
||||||
/* For percentage calculations. */
|
/* For percentage calculations. */
|
||||||
ulTotalTime /= ( configRUN_TIME_COUNTER_TYPE ) 100;
|
ulTotalTime /= ( configRUN_TIME_COUNTER_TYPE ) 100;
|
||||||
|
|
24
timers.c
24
timers.c
|
@ -74,15 +74,15 @@
|
||||||
/* The definition of the timers themselves. */
|
/* The definition of the timers themselves. */
|
||||||
typedef struct tmrTimerControl /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
typedef struct tmrTimerControl /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
||||||
{
|
{
|
||||||
const char * pcTimerName; /*<< Text name. This is not used by the kernel, it is included simply to make debugging easier. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
const char * pcTimerName; /**< Text name. This is not used by the kernel, it is included simply to make debugging easier. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||||
ListItem_t xTimerListItem; /*<< Standard linked list item as used by all kernel features for event management. */
|
ListItem_t xTimerListItem; /**< Standard linked list item as used by all kernel features for event management. */
|
||||||
TickType_t xTimerPeriodInTicks; /*<< How quickly and often the timer expires. */
|
TickType_t xTimerPeriodInTicks; /**< How quickly and often the timer expires. */
|
||||||
void * pvTimerID; /*<< An ID to identify the timer. This allows the timer to be identified when the same callback is used for multiple timers. */
|
void * pvTimerID; /**< An ID to identify the timer. This allows the timer to be identified when the same callback is used for multiple timers. */
|
||||||
TimerCallbackFunction_t pxCallbackFunction; /*<< The function that will be called when the timer expires. */
|
TimerCallbackFunction_t pxCallbackFunction; /**< The function that will be called when the timer expires. */
|
||||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||||
UBaseType_t uxTimerNumber; /*<< An ID assigned by trace tools such as FreeRTOS+Trace */
|
UBaseType_t uxTimerNumber; /**< An ID assigned by trace tools such as FreeRTOS+Trace */
|
||||||
#endif
|
#endif
|
||||||
uint8_t ucStatus; /*<< Holds bits to say if the timer was statically allocated or not, and if it is active or not. */
|
uint8_t ucStatus; /**< Holds bits to say if the timer was statically allocated or not, and if it is active or not. */
|
||||||
} xTIMER;
|
} xTIMER;
|
||||||
|
|
||||||
/* The old xTIMER name is maintained above then typedefed to the new Timer_t
|
/* The old xTIMER name is maintained above then typedefed to the new Timer_t
|
||||||
|
@ -96,8 +96,8 @@
|
||||||
* and xCallbackParametersType respectively. */
|
* and xCallbackParametersType respectively. */
|
||||||
typedef struct tmrTimerParameters
|
typedef struct tmrTimerParameters
|
||||||
{
|
{
|
||||||
TickType_t xMessageValue; /*<< An optional value used by a subset of commands, for example, when changing the period of a timer. */
|
TickType_t xMessageValue; /**< An optional value used by a subset of commands, for example, when changing the period of a timer. */
|
||||||
Timer_t * pxTimer; /*<< The timer to which the command will be applied. */
|
Timer_t * pxTimer; /**< The timer to which the command will be applied. */
|
||||||
} TimerParameter_t;
|
} TimerParameter_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
* that is used to determine which message type is valid. */
|
* that is used to determine which message type is valid. */
|
||||||
typedef struct tmrTimerQueueMessage
|
typedef struct tmrTimerQueueMessage
|
||||||
{
|
{
|
||||||
BaseType_t xMessageID; /*<< The command being sent to the timer service task. */
|
BaseType_t xMessageID; /**< The command being sent to the timer service task. */
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
TimerParameter_t xTimerParameters;
|
TimerParameter_t xTimerParameters;
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
* task. Other tasks communicate with the timer service task using the
|
* task. Other tasks communicate with the timer service task using the
|
||||||
* xTimerQueue queue.
|
* xTimerQueue queue.
|
||||||
*/
|
*/
|
||||||
static portTASK_FUNCTION_PROTO( prvTimerTask, pvParameters ) PRIVILEGED_FUNCTION;
|
static portTASK_FUNCTION_PROTO( prvTimerTask, pvParameters ) portNORETURN PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called by the timer service task to interpret and process a command it
|
* Called by the timer service task to interpret and process a command it
|
||||||
|
@ -575,8 +575,6 @@
|
||||||
|
|
||||||
#if ( configUSE_DAEMON_TASK_STARTUP_HOOK == 1 )
|
#if ( configUSE_DAEMON_TASK_STARTUP_HOOK == 1 )
|
||||||
{
|
{
|
||||||
extern void vApplicationDaemonTaskStartupHook( void );
|
|
||||||
|
|
||||||
/* Allow the application writer to execute some code in the context of
|
/* Allow the application writer to execute some code in the context of
|
||||||
* this task at the point the task starts executing. This is useful if the
|
* this task at the point the task starts executing. This is useful if the
|
||||||
* application includes initialisation code that would benefit from
|
* application includes initialisation code that would benefit from
|
||||||
|
|
Loading…
Reference in a new issue