Add additional const qualifiers.

This commit is contained in:
Richard Barry 2013-12-24 11:55:38 +00:00
parent 6179690dc9
commit b3aa1e90ad
6 changed files with 54 additions and 54 deletions

View File

@ -585,7 +585,7 @@ typedef void * xQueueSetMemberHandle;
* \defgroup xQueueSend xQueueSend * \defgroup xQueueSend xQueueSend
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, const portBASE_TYPE xCopyPosition ) PRIVILEGED_FUNCTION;
/** /**
* queue. h * queue. h
@ -906,7 +906,7 @@ signed portBASE_TYPE xQueuePeekFromISR( xQueueHandle xQueue, void * const pvBuff
* \defgroup xQueueReceive xQueueReceive * \defgroup xQueueReceive xQueueReceive
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeek ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, void * const pvBuffer, portTickType xTicksToWait, const portBASE_TYPE xJustPeek ) PRIVILEGED_FUNCTION;
/** /**
* queue. h * queue. h
@ -1332,7 +1332,7 @@ unsigned long ulVarToSend, ulValReceived;
* \defgroup xQueueSendFromISR xQueueSendFromISR * \defgroup xQueueSendFromISR xQueueSendFromISR
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle xQueue, const void * const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle xQueue, const void * const pvItemToQueue, signed portBASE_TYPE * const pxHigherPriorityTaskWoken, const portBASE_TYPE xCopyPosition ) PRIVILEGED_FUNCTION;
/** /**
* queue. h * queue. h
@ -1421,7 +1421,7 @@ signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle xQueue, const void *
* \defgroup xQueueReceiveFromISR xQueueReceiveFromISR * \defgroup xQueueReceiveFromISR xQueueReceiveFromISR
* \ingroup QueueManagement * \ingroup QueueManagement
*/ */
signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle xQueue, void * const pvBuffer, signed portBASE_TYPE *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle xQueue, void * const pvBuffer, signed portBASE_TYPE * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
/* /*
* Utilities to query queues that are safe to use from an ISR. These utilities * Utilities to query queues that are safe to use from an ISR. These utilities
@ -1472,8 +1472,8 @@ signed portBASE_TYPE xQueueCRReceive( xQueueHandle xQueue, void *pvBuffer, portT
* xSemaphoreCreateCounting() or xSemaphoreGetMutexHolder() instead of calling * xSemaphoreCreateCounting() or xSemaphoreGetMutexHolder() instead of calling
* these functions directly. * these functions directly.
*/ */
xQueueHandle xQueueCreateMutex( unsigned char ucQueueType ) PRIVILEGED_FUNCTION; xQueueHandle xQueueCreateMutex( const unsigned char ucQueueType ) PRIVILEGED_FUNCTION;
xQueueHandle xQueueCreateCountingSemaphore( unsigned portBASE_TYPE uxMaxCount, unsigned portBASE_TYPE uxInitialCount ) PRIVILEGED_FUNCTION; xQueueHandle xQueueCreateCountingSemaphore( const unsigned portBASE_TYPE uxMaxCount, const unsigned portBASE_TYPE uxInitialCount ) PRIVILEGED_FUNCTION;
void* xQueueGetMutexHolder( xQueueHandle xSemaphore ) PRIVILEGED_FUNCTION; void* xQueueGetMutexHolder( xQueueHandle xSemaphore ) PRIVILEGED_FUNCTION;
/* /*
@ -1535,7 +1535,7 @@ portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle pxMutex ) PRIVILEGED_FUNCTI
* Generic version of the queue creation function, which is in turn called by * Generic version of the queue creation function, which is in turn called by
* any queue, semaphore or mutex creation function or macro. * any queue, semaphore or mutex creation function or macro.
*/ */
xQueueHandle xQueueGenericCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize, unsigned char ucQueueType ) PRIVILEGED_FUNCTION; xQueueHandle xQueueGenericCreate( const unsigned portBASE_TYPE uxQueueLength, const unsigned portBASE_TYPE uxItemSize, const unsigned char ucQueueType ) PRIVILEGED_FUNCTION;
/* /*
* Queue sets provide a mechanism to allow a task to block (pend) on a read * Queue sets provide a mechanism to allow a task to block (pend) on a read
@ -1585,7 +1585,7 @@ xQueueHandle xQueueGenericCreate( unsigned portBASE_TYPE uxQueueLength, unsigned
* @return If the queue set is created successfully then a handle to the created * @return If the queue set is created successfully then a handle to the created
* queue set is returned. Otherwise NULL is returned. * queue set is returned. Otherwise NULL is returned.
*/ */
xQueueSetHandle xQueueCreateSet( unsigned portBASE_TYPE uxEventQueueLength ) PRIVILEGED_FUNCTION; xQueueSetHandle xQueueCreateSet( const unsigned portBASE_TYPE uxEventQueueLength ) PRIVILEGED_FUNCTION;
/* /*
* Adds a queue or semaphore to a queue set that was previously created by a * Adds a queue or semaphore to a queue set that was previously created by a
@ -1664,7 +1664,7 @@ portBASE_TYPE xQueueRemoveFromSet( xQueueSetMemberHandle xQueueOrSemaphore, xQue
* in the queue set that is available, or NULL if no such queue or semaphore * in the queue set that is available, or NULL if no such queue or semaphore
* exists before before the specified block time expires. * exists before before the specified block time expires.
*/ */
xQueueSetMemberHandle xQueueSelectFromSet( xQueueSetHandle xQueueSet, portTickType xBlockTimeTicks ) PRIVILEGED_FUNCTION; xQueueSetMemberHandle xQueueSelectFromSet( xQueueSetHandle xQueueSet, const portTickType xBlockTimeTicks ) PRIVILEGED_FUNCTION;
/* /*
* A version of xQueueSelectFromSet() that can be used from an ISR. * A version of xQueueSelectFromSet() that can be used from an ISR.

View File

@ -1257,7 +1257,7 @@ xTaskHandle xTaskGetIdleTaskHandle( void );
} }
</pre> </pre>
*/ */
unsigned portBASE_TYPE uxTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime ); unsigned portBASE_TYPE uxTaskGetSystemState( xTaskStatusType * const pxTaskStatusArray, const unsigned portBASE_TYPE uxArraySize, unsigned long * const pulTotalRunTime );
/** /**
* task. h * task. h
@ -1304,7 +1304,7 @@ unsigned portBASE_TYPE uxTaskGetSystemState( xTaskStatusType *pxTaskStatusArray,
* \defgroup vTaskList vTaskList * \defgroup vTaskList vTaskList
* \ingroup TaskUtils * \ingroup TaskUtils
*/ */
void vTaskList( signed char *pcWriteBuffer ) PRIVILEGED_FUNCTION; void vTaskList( signed char * pcWriteBuffer ) PRIVILEGED_FUNCTION;
/** /**
* task. h * task. h
@ -1413,7 +1413,7 @@ portBASE_TYPE xTaskIncrementTick( void ) PRIVILEGED_FUNCTION;
* period. * period.
*/ */
void vTaskPlaceOnEventList( xList * const pxEventList, const portTickType xTicksToWait ) PRIVILEGED_FUNCTION; void vTaskPlaceOnEventList( xList * const pxEventList, const portTickType xTicksToWait ) PRIVILEGED_FUNCTION;
void vTaskPlaceOnUnorderedEventList( xList * pxEventList, portTickType xItemValue, const portTickType xTicksToWait ) PRIVILEGED_FUNCTION; void vTaskPlaceOnUnorderedEventList( xList * pxEventList, const portTickType xItemValue, const portTickType xTicksToWait ) PRIVILEGED_FUNCTION;
/* /*
* THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN
@ -1426,7 +1426,7 @@ void vTaskPlaceOnUnorderedEventList( xList * pxEventList, portTickType xItemValu
* indefinitely, whereas vTaskPlaceOnEventList() does. * indefinitely, whereas vTaskPlaceOnEventList() does.
* *
*/ */
void vTaskPlaceOnEventListRestricted( xList * const pxEventList, portTickType xTicksToWait ) PRIVILEGED_FUNCTION; void vTaskPlaceOnEventListRestricted( xList * const pxEventList, const portTickType xTicksToWait ) PRIVILEGED_FUNCTION;
/* /*
* THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN
@ -1453,7 +1453,7 @@ void vTaskPlaceOnEventListRestricted( xList * const pxEventList, portTickType xT
* making the call, otherwise pdFALSE. * making the call, otherwise pdFALSE.
*/ */
signed portBASE_TYPE xTaskRemoveFromEventList( const xList * const pxEventList ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xTaskRemoveFromEventList( const xList * const pxEventList ) PRIVILEGED_FUNCTION;
signed portBASE_TYPE xTaskRemoveFromUnorderedEventList( xListItem * pxEventListItem, portTickType xItemValue ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xTaskRemoveFromUnorderedEventList( xListItem * pxEventListItem, const portTickType xItemValue ) PRIVILEGED_FUNCTION;
/* /*
* THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS ONLY * THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS ONLY
@ -1515,7 +1515,7 @@ void vTaskPriorityDisinherit( xTaskHandle const pxMutexHolder ) PRIVILEGED_FUNCT
* Generic version of the task creation function which is in turn called by the * Generic version of the task creation function which is in turn called by the
* xTaskCreate() and xTaskCreateRestricted() macros. * xTaskCreate() and xTaskCreateRestricted() macros.
*/ */
signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const signed char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION; signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const signed char * const pcName, const unsigned short usStackDepth, void * const pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle * const pxCreatedTask, portSTACK_TYPE * const puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION;
/* /*
* Get the uxTCBNumber assigned to the task referenced by the xTask parameter. * Get the uxTCBNumber assigned to the task referenced by the xTask parameter.
@ -1526,7 +1526,7 @@ unsigned portBASE_TYPE uxTaskGetTaskNumber( xTaskHandle xTask ) PRIVILEGED_FUNCT
* Set the uxTaskNumber of the task referenced by the xTask parameter to * Set the uxTaskNumber of the task referenced by the xTask parameter to
* uxHandle. * uxHandle.
*/ */
void vTaskSetTaskNumber( xTaskHandle xTask, unsigned portBASE_TYPE uxHandle ) PRIVILEGED_FUNCTION; void vTaskSetTaskNumber( xTaskHandle xTask, const unsigned portBASE_TYPE uxHandle ) PRIVILEGED_FUNCTION;
/* /*
* Only available when configUSE_TICKLESS_IDLE is set to 1. * Only available when configUSE_TICKLESS_IDLE is set to 1.
@ -1536,7 +1536,7 @@ void vTaskSetTaskNumber( xTaskHandle xTask, unsigned portBASE_TYPE uxHandle ) PR
* to date with the actual execution time by being skipped forward by a time * to date with the actual execution time by being skipped forward by a time
* equal to the idle period. * equal to the idle period.
*/ */
void vTaskStepTick( portTickType xTicksToJump ) PRIVILEGED_FUNCTION; void vTaskStepTick( const portTickType xTicksToJump ) PRIVILEGED_FUNCTION;
/* /*
* Only avilable when configUSE_TICKLESS_IDLE is set to 1. * Only avilable when configUSE_TICKLESS_IDLE is set to 1.

View File

@ -232,7 +232,7 @@ typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );
* } * }
* @endverbatim * @endverbatim
*/ */
xTimerHandle xTimerCreate( const signed char * const pcTimerName, portTickType xTimerPeriodInTicks, unsigned portBASE_TYPE uxAutoReload, void * pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION; xTimerHandle xTimerCreate( const signed char * const pcTimerName, const portTickType xTimerPeriodInTicks, const unsigned portBASE_TYPE uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION;
/** /**
* void *pvTimerGetTimerID( xTimerHandle xTimer ); * void *pvTimerGetTimerID( xTimerHandle xTimer );
@ -1044,7 +1044,7 @@ portBASE_TYPE xTimerPendCallbackFromISR( pdAPPLICATION_CALLBACK_CODE pvCallbackF
* for use by the kernel only. * for use by the kernel only.
*/ */
portBASE_TYPE xTimerCreateTimerTask( void ) PRIVILEGED_FUNCTION; portBASE_TYPE xTimerCreateTimerTask( void ) PRIVILEGED_FUNCTION;
portBASE_TYPE xTimerGenericCommand( xTimerHandle xTimer, portBASE_TYPE xCommandID, portTickType xOptionalValue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portTickType xBlockTime ) PRIVILEGED_FUNCTION; portBASE_TYPE xTimerGenericCommand( xTimerHandle xTimer, const portBASE_TYPE xCommandID, const portTickType xOptionalValue, signed portBASE_TYPE * const pxHigherPriorityTaskWoken, const portTickType xBlockTime ) PRIVILEGED_FUNCTION;
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -186,7 +186,7 @@ typedef struct QueueDefinition
* to indicate that a task may require unblocking. When the queue in unlocked * to indicate that a task may require unblocking. When the queue in unlocked
* these lock counts are inspected, and the appropriate action taken. * these lock counts are inspected, and the appropriate action taken.
*/ */
static void prvUnlockQueue( xQUEUE *pxQueue ) PRIVILEGED_FUNCTION; static void prvUnlockQueue( xQUEUE * const pxQueue ) PRIVILEGED_FUNCTION;
/* /*
* Uses a critical section to determine if there is any data in a queue. * Uses a critical section to determine if there is any data in a queue.
@ -206,7 +206,7 @@ static signed portBASE_TYPE prvIsQueueFull( const xQUEUE *pxQueue ) PRIVILEGED_F
* Copies an item into the queue, either at the front of the queue or the * Copies an item into the queue, either at the front of the queue or the
* back of the queue. * back of the queue.
*/ */
static void prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, portBASE_TYPE xPosition ) PRIVILEGED_FUNCTION; static void prvCopyDataToQueue( xQUEUE * const pxQueue, const void *pvItemToQueue, const portBASE_TYPE xPosition ) PRIVILEGED_FUNCTION;
/* /*
* Copies an item out of a queue. * Copies an item out of a queue.
@ -218,7 +218,7 @@ static void prvCopyDataFromQueue( xQUEUE * const pxQueue, void * const pvBuffer
* Checks to see if a queue is a member of a queue set, and if so, notifies * Checks to see if a queue is a member of a queue set, and if so, notifies
* the queue set that the queue contains data. * the queue set that the queue contains data.
*/ */
static portBASE_TYPE prvNotifyQueueSetContainer( const xQUEUE * const pxQueue, portBASE_TYPE xCopyPosition ) PRIVILEGED_FUNCTION; static portBASE_TYPE prvNotifyQueueSetContainer( const xQUEUE * const pxQueue, const portBASE_TYPE xCopyPosition ) PRIVILEGED_FUNCTION;
#endif #endif
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -295,7 +295,7 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
xQueueHandle xQueueGenericCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize, unsigned char ucQueueType ) xQueueHandle xQueueGenericCreate( const unsigned portBASE_TYPE uxQueueLength, const unsigned portBASE_TYPE uxItemSize, const unsigned char ucQueueType )
{ {
xQUEUE *pxNewQueue; xQUEUE *pxNewQueue;
size_t xQueueSizeInBytes; size_t xQueueSizeInBytes;
@ -363,7 +363,7 @@ xQueueHandle xReturn = NULL;
#if ( configUSE_MUTEXES == 1 ) #if ( configUSE_MUTEXES == 1 )
xQueueHandle xQueueCreateMutex( unsigned char ucQueueType ) xQueueHandle xQueueCreateMutex( const unsigned char ucQueueType )
{ {
xQUEUE *pxNewQueue; xQUEUE *pxNewQueue;
@ -553,7 +553,7 @@ xQueueHandle xReturn = NULL;
#if ( configUSE_COUNTING_SEMAPHORES == 1 ) #if ( configUSE_COUNTING_SEMAPHORES == 1 )
xQueueHandle xQueueCreateCountingSemaphore( unsigned portBASE_TYPE uxMaxCount, unsigned portBASE_TYPE uxInitialCount ) xQueueHandle xQueueCreateCountingSemaphore( const unsigned portBASE_TYPE uxMaxCount, const unsigned portBASE_TYPE uxInitialCount )
{ {
xQueueHandle xHandle; xQueueHandle xHandle;
@ -580,7 +580,7 @@ xQueueHandle xReturn = NULL;
#endif /* configUSE_COUNTING_SEMAPHORES */ #endif /* configUSE_COUNTING_SEMAPHORES */
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition ) signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, const portBASE_TYPE xCopyPosition )
{ {
signed portBASE_TYPE xEntryTimeSet = pdFALSE; signed portBASE_TYPE xEntryTimeSet = pdFALSE;
xTimeOutType xTimeOut; xTimeOutType xTimeOut;
@ -1012,7 +1012,7 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
#endif /* configUSE_ALTERNATIVE_API */ #endif /* configUSE_ALTERNATIVE_API */
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle xQueue, const void * const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition ) signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle xQueue, const void * const pvItemToQueue, signed portBASE_TYPE * const pxHigherPriorityTaskWoken, const portBASE_TYPE xCopyPosition )
{ {
signed portBASE_TYPE xReturn; signed portBASE_TYPE xReturn;
unsigned portBASE_TYPE uxSavedInterruptStatus; unsigned portBASE_TYPE uxSavedInterruptStatus;
@ -1156,7 +1156,7 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking ) signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, void * const pvBuffer, portTickType xTicksToWait, const portBASE_TYPE xJustPeeking )
{ {
signed portBASE_TYPE xEntryTimeSet = pdFALSE; signed portBASE_TYPE xEntryTimeSet = pdFALSE;
xTimeOutType xTimeOut; xTimeOutType xTimeOut;
@ -1345,7 +1345,7 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle xQueue, void * const pvBuffer, signed portBASE_TYPE *pxHigherPriorityTaskWoken ) signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle xQueue, void * const pvBuffer, signed portBASE_TYPE * const pxHigherPriorityTaskWoken )
{ {
signed portBASE_TYPE xReturn; signed portBASE_TYPE xReturn;
unsigned portBASE_TYPE uxSavedInterruptStatus; unsigned portBASE_TYPE uxSavedInterruptStatus;
@ -1581,7 +1581,7 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
#endif /* configUSE_TRACE_FACILITY */ #endif /* configUSE_TRACE_FACILITY */
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, portBASE_TYPE xPosition ) static void prvCopyDataToQueue( xQUEUE * const pxQueue, const void *pvItemToQueue, const portBASE_TYPE xPosition )
{ {
if( pxQueue->uxItemSize == ( unsigned portBASE_TYPE ) 0 ) if( pxQueue->uxItemSize == ( unsigned portBASE_TYPE ) 0 )
{ {
@ -1673,7 +1673,7 @@ static void prvCopyDataFromQueue( xQUEUE * const pxQueue, void * const pvBuffer
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvUnlockQueue( xQUEUE *pxQueue ) static void prvUnlockQueue( xQUEUE * const pxQueue )
{ {
/* THIS FUNCTION MUST BE CALLED WITH THE SCHEDULER SUSPENDED. */ /* THIS FUNCTION MUST BE CALLED WITH THE SCHEDULER SUSPENDED. */
@ -2233,7 +2233,7 @@ signed portBASE_TYPE xReturn;
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
xQueueSetHandle xQueueCreateSet( unsigned portBASE_TYPE uxEventQueueLength ) xQueueSetHandle xQueueCreateSet( const unsigned portBASE_TYPE uxEventQueueLength )
{ {
xQueueSetHandle pxQueue; xQueueSetHandle pxQueue;
@ -2316,7 +2316,7 @@ signed portBASE_TYPE xReturn;
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
xQueueSetMemberHandle xQueueSelectFromSet( xQueueSetHandle xQueueSet, portTickType xBlockTimeTicks ) xQueueSetMemberHandle xQueueSelectFromSet( xQueueSetHandle xQueueSet, portTickType const xBlockTimeTicks )
{ {
xQueueSetMemberHandle xReturn = NULL; xQueueSetMemberHandle xReturn = NULL;
@ -2342,7 +2342,7 @@ signed portBASE_TYPE xReturn;
#if ( configUSE_QUEUE_SETS == 1 ) #if ( configUSE_QUEUE_SETS == 1 )
static portBASE_TYPE prvNotifyQueueSetContainer( const xQUEUE * const pxQueue, portBASE_TYPE xCopyPosition ) static portBASE_TYPE prvNotifyQueueSetContainer( const xQUEUE * const pxQueue, const portBASE_TYPE xCopyPosition )
{ {
xQUEUE *pxQueueSetContainer = pxQueue->pxQueueSetContainer; xQUEUE *pxQueueSetContainer = pxQueue->pxQueueSetContainer;
portBASE_TYPE xReturn = pdFALSE; portBASE_TYPE xReturn = pdFALSE;

View File

@ -391,7 +391,7 @@ to its original value when it is released. */
* Utility to ready a TCB for a given task. Mainly just copies the parameters * Utility to ready a TCB for a given task. Mainly just copies the parameters
* into the TCB structure. * into the TCB structure.
*/ */
static void prvInitialiseTCBVariables( tskTCB *pxTCB, const signed char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, unsigned short usStackDepth ) PRIVILEGED_FUNCTION; static void prvInitialiseTCBVariables( tskTCB * const pxTCB, const signed char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, const unsigned short usStackDepth ) PRIVILEGED_FUNCTION;
/* /*
* Utility to ready all the lists used by the scheduler. This is called * Utility to ready all the lists used by the scheduler. This is called
@ -436,13 +436,13 @@ static void prvCheckTasksWaitingTermination( void ) PRIVILEGED_FUNCTION;
* The currently executing task is entering the Blocked state. Add the task to * The currently executing task is entering the Blocked state. Add the task to
* either the current or the overflow delayed task list. * either the current or the overflow delayed task list.
*/ */
static void prvAddCurrentTaskToDelayedList( portTickType xTimeToWake ) PRIVILEGED_FUNCTION; static void prvAddCurrentTaskToDelayedList( const portTickType xTimeToWake ) PRIVILEGED_FUNCTION;
/* /*
* Allocates memory from the heap for a TCB and associated stack. Checks the * Allocates memory from the heap for a TCB and associated stack. Checks the
* allocation was successful. * allocation was successful.
*/ */
static tskTCB *prvAllocateTCBAndStack( unsigned short usStackDepth, portSTACK_TYPE *puxStackBuffer ) PRIVILEGED_FUNCTION; static tskTCB *prvAllocateTCBAndStack( const unsigned short usStackDepth, portSTACK_TYPE * const puxStackBuffer ) PRIVILEGED_FUNCTION;
/* /*
* Fills an xTaskStatusType structure with information on each task that is * Fills an xTaskStatusType structure with information on each task that is
@ -492,7 +492,7 @@ static void prvResetNextTaskUnblockTime( void );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const signed char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions ) signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pxTaskCode, const signed char * const pcName, const unsigned short usStackDepth, void * const pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle * const pxCreatedTask, portSTACK_TYPE * const puxStackBuffer, const xMemoryRegion * const xRegions )
{ {
signed portBASE_TYPE xReturn; signed portBASE_TYPE xReturn;
tskTCB * pxNewTCB; tskTCB * pxNewTCB;
@ -1710,7 +1710,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void )
#if ( configUSE_TRACE_FACILITY == 1 ) #if ( configUSE_TRACE_FACILITY == 1 )
unsigned portBASE_TYPE uxTaskGetSystemState( xTaskStatusType *pxTaskStatusArray, unsigned portBASE_TYPE uxArraySize, unsigned long *pulTotalRunTime ) unsigned portBASE_TYPE uxTaskGetSystemState( xTaskStatusType * const pxTaskStatusArray, const unsigned portBASE_TYPE uxArraySize, unsigned long * const pulTotalRunTime )
{ {
unsigned portBASE_TYPE uxTask = 0, uxQueue = configMAX_PRIORITIES; unsigned portBASE_TYPE uxTask = 0, uxQueue = configMAX_PRIORITIES;
@ -1801,7 +1801,7 @@ implementations require configUSE_TICKLESS_IDLE to be set to a value other than
1. */ 1. */
#if ( configUSE_TICKLESS_IDLE != 0 ) #if ( configUSE_TICKLESS_IDLE != 0 )
void vTaskStepTick( portTickType xTicksToJump ) void vTaskStepTick( const portTickType xTicksToJump )
{ {
/* Correct the tick count value after a period during which the tick /* Correct the tick count value after a period during which the tick
was suppressed. Note this does *not* call the tick hook function for was suppressed. Note this does *not* call the tick hook function for
@ -2192,7 +2192,7 @@ portTickType xTimeToWake;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vTaskPlaceOnUnorderedEventList( xList * pxEventList, portTickType xItemValue, const portTickType xTicksToWait ) void vTaskPlaceOnUnorderedEventList( xList * pxEventList, const portTickType xItemValue, const portTickType xTicksToWait )
{ {
portTickType xTimeToWake; portTickType xTimeToWake;
@ -2252,7 +2252,7 @@ portTickType xTimeToWake;
#if configUSE_TIMERS == 1 #if configUSE_TIMERS == 1
void vTaskPlaceOnEventListRestricted( xList * const pxEventList, portTickType xTicksToWait ) void vTaskPlaceOnEventListRestricted( xList * const pxEventList, const portTickType xTicksToWait )
{ {
portTickType xTimeToWake; portTickType xTimeToWake;
@ -2350,7 +2350,7 @@ portBASE_TYPE xReturn;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
signed portBASE_TYPE xTaskRemoveFromUnorderedEventList( xListItem * pxEventListItem, portTickType xItemValue ) signed portBASE_TYPE xTaskRemoveFromUnorderedEventList( xListItem * pxEventListItem, const portTickType xItemValue )
{ {
tskTCB *pxUnblockedTCB; tskTCB *pxUnblockedTCB;
portBASE_TYPE xReturn; portBASE_TYPE xReturn;
@ -2488,7 +2488,7 @@ void vTaskMissedYield( void )
#if ( configUSE_TRACE_FACILITY == 1 ) #if ( configUSE_TRACE_FACILITY == 1 )
void vTaskSetTaskNumber( xTaskHandle xTask, unsigned portBASE_TYPE uxHandle ) void vTaskSetTaskNumber( xTaskHandle xTask, const unsigned portBASE_TYPE uxHandle )
{ {
tskTCB *pxTCB; tskTCB *pxTCB;
@ -2659,7 +2659,7 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
#endif /* configUSE_TICKLESS_IDLE */ #endif /* configUSE_TICKLESS_IDLE */
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvInitialiseTCBVariables( tskTCB *pxTCB, const signed char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, unsigned short usStackDepth ) static void prvInitialiseTCBVariables( tskTCB * const pxTCB, const signed char * const pcName, unsigned portBASE_TYPE uxPriority, const xMemoryRegion * const xRegions, const unsigned short usStackDepth )
{ {
unsigned portBASE_TYPE x; unsigned portBASE_TYPE x;
@ -2838,7 +2838,7 @@ static void prvCheckTasksWaitingTermination( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static void prvAddCurrentTaskToDelayedList( portTickType xTimeToWake ) static void prvAddCurrentTaskToDelayedList( const portTickType xTimeToWake )
{ {
/* The list item will be inserted in wake time order. */ /* The list item will be inserted in wake time order. */
listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake );
@ -2868,7 +2868,7 @@ static void prvAddCurrentTaskToDelayedList( portTickType xTimeToWake )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static tskTCB *prvAllocateTCBAndStack( unsigned short usStackDepth, portSTACK_TYPE *puxStackBuffer ) static tskTCB *prvAllocateTCBAndStack( const unsigned short usStackDepth, portSTACK_TYPE * const puxStackBuffer )
{ {
tskTCB *pxNewTCB; tskTCB *pxNewTCB;
@ -3280,7 +3280,7 @@ tskTCB *pxTCB;
#if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) ) #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS == 1 ) )
void vTaskList( signed char *pcWriteBuffer ) void vTaskList( signed char * pcWriteBuffer )
{ {
xTaskStatusType *pxTaskStatusArray; xTaskStatusType *pxTaskStatusArray;
volatile unsigned portBASE_TYPE uxArraySize, x; volatile unsigned portBASE_TYPE uxArraySize, x;

View File

@ -208,7 +208,7 @@ static void prvSwitchTimerLists( void ) PRIVILEGED_FUNCTION;
* Obtain the current tick count, setting *pxTimerListsWereSwitched to pdTRUE * Obtain the current tick count, setting *pxTimerListsWereSwitched to pdTRUE
* if a tick count overflow occurred since prvSampleTimeNow() was last called. * if a tick count overflow occurred since prvSampleTimeNow() was last called.
*/ */
static portTickType prvSampleTimeNow( portBASE_TYPE *pxTimerListsWereSwitched ) PRIVILEGED_FUNCTION; static portTickType prvSampleTimeNow( portBASE_TYPE * const pxTimerListsWereSwitched ) PRIVILEGED_FUNCTION;
/* /*
* If the timer list contains any active timers then return the expire time of * If the timer list contains any active timers then return the expire time of
@ -216,7 +216,7 @@ static portTickType prvSampleTimeNow( portBASE_TYPE *pxTimerListsWereSwitched )
* timer list does not contain any timers then return 0 and set *pxListWasEmpty * timer list does not contain any timers then return 0 and set *pxListWasEmpty
* to pdTRUE. * to pdTRUE.
*/ */
static portTickType prvGetNextExpireTime( portBASE_TYPE *pxListWasEmpty ) PRIVILEGED_FUNCTION; static portTickType prvGetNextExpireTime( portBASE_TYPE * const pxListWasEmpty ) PRIVILEGED_FUNCTION;
/* /*
* If a timer has expired, process it. Otherwise, block the timer service task * If a timer has expired, process it. Otherwise, block the timer service task
@ -261,7 +261,7 @@ portBASE_TYPE xReturn = pdFAIL;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
xTimerHandle xTimerCreate( const signed char * const pcTimerName, portTickType xTimerPeriodInTicks, unsigned portBASE_TYPE uxAutoReload, void *pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) xTimerHandle xTimerCreate( const signed char * const pcTimerName, const portTickType xTimerPeriodInTicks, const unsigned portBASE_TYPE uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction )
{ {
xTIMER *pxNewTimer; xTIMER *pxNewTimer;
@ -302,7 +302,7 @@ xTIMER *pxNewTimer;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
portBASE_TYPE xTimerGenericCommand( xTimerHandle xTimer, portBASE_TYPE xCommandID, portTickType xOptionalValue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portTickType xBlockTime ) portBASE_TYPE xTimerGenericCommand( xTimerHandle xTimer, const portBASE_TYPE xCommandID, const portTickType xOptionalValue, signed portBASE_TYPE * const pxHigherPriorityTaskWoken, const portTickType xBlockTime )
{ {
portBASE_TYPE xReturn = pdFAIL; portBASE_TYPE xReturn = pdFAIL;
xDAEMON_TASK_MESSAGE xMessage; xDAEMON_TASK_MESSAGE xMessage;
@ -473,7 +473,7 @@ portBASE_TYPE xTimerListsWereSwitched;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static portTickType prvGetNextExpireTime( portBASE_TYPE *pxListWasEmpty ) static portTickType prvGetNextExpireTime( portBASE_TYPE * const pxListWasEmpty )
{ {
portTickType xNextExpireTime; portTickType xNextExpireTime;
@ -499,7 +499,7 @@ portTickType xNextExpireTime;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static portTickType prvSampleTimeNow( portBASE_TYPE *pxTimerListsWereSwitched ) static portTickType prvSampleTimeNow( portBASE_TYPE * const pxTimerListsWereSwitched )
{ {
portTickType xTimeNow; portTickType xTimeNow;
PRIVILEGED_DATA static portTickType xLastTime = ( portTickType ) 0U; /*lint !e956 Variable is only accessible to one task. */ PRIVILEGED_DATA static portTickType xLastTime = ( portTickType ) 0U; /*lint !e956 Variable is only accessible to one task. */