From 43e663824e418419e685c65fb146f85545409c6e Mon Sep 17 00:00:00 2001 From: richardbarry Date: Tue, 25 Mar 2008 18:30:09 +0000 Subject: [PATCH] Add extra const qualifiers and casts for linting purposes. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@280 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/include/queue.h | 10 +++++----- Source/queue.c | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Source/include/queue.h b/Source/include/queue.h index 8c7a88446..f66efaf48 100644 --- a/Source/include/queue.h +++ b/Source/include/queue.h @@ -729,7 +729,7 @@ signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, const void * con /** * queue. h - *
unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle xQueue );
+ *
unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle const xQueue );
* * Return the number of messages stored in a queue. * @@ -740,7 +740,7 @@ signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, const void * con * \page uxQueueMessagesWaiting uxQueueMessagesWaiting * \ingroup QueueManagement */ -unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle xQueue ); +unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle const xQueue ); /** * queue. h @@ -1168,9 +1168,9 @@ signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle pxQueue, const void * co * Utilities to query queue that are safe to use from an ISR. These utilities * should be used only from witin an ISR, or within a critical section. */ -signed portBASE_TYPE xQueueIsQueueEmptyFromISR( const xQueueHandle pxQueue ); -signed portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle pxQueue ); -unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue ); +signed portBASE_TYPE xQueueIsQueueEmptyFromISR( const xQueueHandle const pxQueue ); +signed portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle const pxQueue ); +unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle const pxQueue ); /* diff --git a/Source/queue.c b/Source/queue.c index 57f1e91cb..b62399e70 100644 --- a/Source/queue.c +++ b/Source/queue.c @@ -107,7 +107,7 @@ typedef xQUEUE * xQueueHandle; */ xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize ); signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition ); -unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle pxQueue ); +unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle const pxQueue ); void vQueueDelete( xQueueHandle xQueue ); signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void * const pvItemToQueue, signed portBASE_TYPE xTaskPreviouslyWoken, portBASE_TYPE xCopyPosition ); signed portBASE_TYPE xQueueGenericReceive( xQueueHandle pxQueue, const void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking ); @@ -118,9 +118,9 @@ portBASE_TYPE xQueueTakeMutexRecursive( xQueueHandle xMutex, portTickType xBlock portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle xMutex ); signed portBASE_TYPE xQueueAltGenericSend( xQueueHandle pxQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition ); signed portBASE_TYPE xQueueAltGenericReceive( xQueueHandle pxQueue, const void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking ); -portBASE_TYPE xQueueIsQueueEmptyFromISR( const xQueueHandle pxQueue ); -portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle pxQueue ); -unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue ); +portBASE_TYPE xQueueIsQueueEmptyFromISR( const xQueueHandle const pxQueue ); +portBASE_TYPE xQueueIsQueueFullFromISR( const xQueueHandle const pxQueue ); +unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle const pxQueue ); #if configUSE_CO_ROUTINES == 1 @@ -145,14 +145,14 @@ static void prvUnlockQueue( xQueueHandle pxQueue ); * * @return pdTRUE if the queue contains no items, otherwise pdFALSE. */ -static signed portBASE_TYPE prvIsQueueEmpty( const xQueueHandle pxQueue ); +static signed portBASE_TYPE prvIsQueueEmpty( const xQueueHandle const pxQueue ); /* * Uses a critical section to determine if there is any space in a queue. * * @return pdTRUE if there is no space, otherwise pdFALSE; */ -static signed portBASE_TYPE prvIsQueueFull( const xQueueHandle pxQueue ); +static signed portBASE_TYPE prvIsQueueFull( const xQueueHandle const pxQueue ); /* * Copies an item into the queue, either at the front of the queue or the @@ -493,7 +493,7 @@ xTimeOutType xTimeOut; if( xReturn == errQUEUE_FULL ) { - if( xTicksToWait > 0 ) + if( xTicksToWait > ( portTickType ) 0 ) { if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { @@ -605,7 +605,7 @@ xTimeOutType xTimeOut; if( xReturn == errQUEUE_FULL ) { - if( xTicksToWait > 0 ) + if( xTicksToWait > ( portTickType ) 0 ) { if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { @@ -757,7 +757,7 @@ xTimeOutType xTimeOut; if( xReturn == errQUEUE_EMPTY ) { - if( xTicksToWait > 0 ) + if( xTicksToWait > ( portTickType ) 0 ) { if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { @@ -1034,7 +1034,7 @@ signed portBASE_TYPE xReturn; } /*-----------------------------------------------------------*/ -unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle pxQueue ) +unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle const pxQueue ) { unsigned portBASE_TYPE uxReturn; @@ -1173,7 +1173,7 @@ static void prvUnlockQueue( xQueueHandle pxQueue ) } /*-----------------------------------------------------------*/ -static signed portBASE_TYPE prvIsQueueEmpty( const xQueueHandle pxQueue ) +static signed portBASE_TYPE prvIsQueueEmpty( const xQueueHandle const pxQueue ) { signed portBASE_TYPE xReturn; @@ -1195,7 +1195,7 @@ signed portBASE_TYPE xReturn; } /*-----------------------------------------------------------*/ -static signed portBASE_TYPE prvIsQueueFull( const xQueueHandle pxQueue ) +static signed portBASE_TYPE prvIsQueueFull( const xQueueHandle const pxQueue ) { signed portBASE_TYPE xReturn; -- 2.39.5