mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 13:01:57 -04:00
Add support for MISRA rule 20.7 (#546)
Misra rule 20.7 requires parenthesis to all parameter names in macro definitions. The issue was reported here : https://forums.freertos.org/t/misra-20-7-compatibility/15385
This commit is contained in:
parent
992ff1bb50
commit
11c72bc075
2
.github/workflows/unit-tests.yml
vendored
2
.github/workflows/unit-tests.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get install lcov cflow ruby doxygen build-essential
|
||||
sudo apt-get install lcov cflow ruby doxygen build-essential unifdef
|
||||
- name: Run Unit Tests with ENABLE_SANITIZER=1
|
||||
run: |
|
||||
make -C FreeRTOS/Test/CMock clean
|
||||
|
|
14
croutine.c
14
croutine.c
|
@ -65,13 +65,13 @@
|
|||
* This macro accesses the co-routine ready lists and therefore must not be
|
||||
* used from within an ISR.
|
||||
*/
|
||||
#define prvAddCoRoutineToReadyQueue( pxCRCB ) \
|
||||
{ \
|
||||
if( pxCRCB->uxPriority > uxTopCoRoutineReadyPriority ) \
|
||||
{ \
|
||||
uxTopCoRoutineReadyPriority = pxCRCB->uxPriority; \
|
||||
} \
|
||||
vListInsertEnd( ( List_t * ) &( pxReadyCoRoutineLists[ pxCRCB->uxPriority ] ), &( pxCRCB->xGenericListItem ) ); \
|
||||
#define prvAddCoRoutineToReadyQueue( pxCRCB ) \
|
||||
{ \
|
||||
if( ( pxCRCB )->uxPriority > uxTopCoRoutineReadyPriority ) \
|
||||
{ \
|
||||
uxTopCoRoutineReadyPriority = ( pxCRCB )->uxPriority; \
|
||||
} \
|
||||
vListInsertEnd( ( List_t * ) &( pxReadyCoRoutineLists[ ( pxCRCB )->uxPriority ] ), &( ( pxCRCB )->xGenericListItem ) ); \
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -360,11 +360,11 @@
|
|||
#endif
|
||||
|
||||
#ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) ( uxSavedStatusValue )
|
||||
#endif
|
||||
|
||||
#ifndef portCLEAN_UP_TCB
|
||||
#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
|
||||
#define portCLEAN_UP_TCB( pxTCB ) ( void ) ( pxTCB )
|
||||
#endif
|
||||
|
||||
#ifndef portPRE_TASK_DELETE_HOOK
|
||||
|
@ -372,7 +372,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef portSETUP_TCB
|
||||
#define portSETUP_TCB( pxTCB ) ( void ) pxTCB
|
||||
#define portSETUP_TCB( pxTCB ) ( void ) ( pxTCB )
|
||||
#endif
|
||||
|
||||
#ifndef configQUEUE_REGISTRY_SIZE
|
||||
|
@ -684,7 +684,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef traceEVENT_GROUP_SYNC_END
|
||||
#define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
|
||||
#define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) ( xTimeoutOccurred )
|
||||
#endif
|
||||
|
||||
#ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
|
||||
|
@ -692,7 +692,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef traceEVENT_GROUP_WAIT_BITS_END
|
||||
#define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
|
||||
#define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) ( xTimeoutOccurred )
|
||||
#endif
|
||||
|
||||
#ifndef traceEVENT_GROUP_CLEAR_BITS
|
||||
|
@ -1023,7 +1023,7 @@
|
|||
#define portTICK_TYPE_ENTER_CRITICAL()
|
||||
#define portTICK_TYPE_EXIT_CRITICAL()
|
||||
#define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
|
||||
#define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
|
||||
#define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) ( x )
|
||||
#endif /* if ( portTICK_TYPE_IS_ATOMIC == 0 ) */
|
||||
|
||||
/* Definitions to allow backward compatibility with FreeRTOS versions prior to
|
||||
|
|
|
@ -423,7 +423,7 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
|
|||
const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION;
|
||||
#else
|
||||
#define xEventGroupClearBitsFromISR( xEventGroup, uxBitsToClear ) \
|
||||
xTimerPendFunctionCallFromISR( vEventGroupClearBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToClear, NULL )
|
||||
xTimerPendFunctionCallFromISR( vEventGroupClearBitsCallback, ( void * ) ( xEventGroup ), ( uint32_t ) ( uxBitsToClear ), NULL )
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -579,7 +579,7 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
|
|||
BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
|
||||
#else
|
||||
#define xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken ) \
|
||||
xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken )
|
||||
xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) ( xEventGroup ), ( uint32_t ) ( uxBitsToSet ), ( pxHigherPriorityTaskWoken ) )
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -728,7 +728,7 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
|
|||
* \defgroup xEventGroupGetBits xEventGroupGetBits
|
||||
* \ingroup EventGroup
|
||||
*/
|
||||
#define xEventGroupGetBits( xEventGroup ) xEventGroupClearBits( xEventGroup, 0 )
|
||||
#define xEventGroupGetBits( xEventGroup ) xEventGroupClearBits( ( xEventGroup ), 0 )
|
||||
|
||||
/**
|
||||
* event_groups.h
|
||||
|
|
|
@ -156,11 +156,11 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
|
|||
* \ingroup MessageBufferManagement
|
||||
*/
|
||||
#define xMessageBufferCreate( xBufferSizeBytes ) \
|
||||
xStreamBufferGenericCreate( xBufferSizeBytes, ( size_t ) 0, pdTRUE, NULL, NULL )
|
||||
xStreamBufferGenericCreate( ( xBufferSizeBytes ), ( size_t ) 0, pdTRUE, NULL, NULL )
|
||||
|
||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||
#define xMessageBufferCreateWithCallback( xBufferSizeBytes, pxSendCompletedCallback, pxReceiveCompletedCallback ) \
|
||||
xStreamBufferGenericCreate( xBufferSizeBytes, ( size_t ) 0, pdTRUE, pxSendCompletedCallback, pxReceiveCompletedCallback )
|
||||
xStreamBufferGenericCreate( ( xBufferSizeBytes ), ( size_t ) 0, pdTRUE, ( pxSendCompletedCallback ), ( pxReceiveCompletedCallback ) )
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -238,11 +238,11 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
|
|||
* \ingroup MessageBufferManagement
|
||||
*/
|
||||
#define xMessageBufferCreateStatic( xBufferSizeBytes, pucMessageBufferStorageArea, pxStaticMessageBuffer ) \
|
||||
xStreamBufferGenericCreateStatic( xBufferSizeBytes, 0, pdTRUE, pucMessageBufferStorageArea, pxStaticMessageBuffer, NULL, NULL )
|
||||
xStreamBufferGenericCreateStatic( ( xBufferSizeBytes ), 0, pdTRUE, ( pucMessageBufferStorageArea ), ( pxStaticMessageBuffer ), NULL, NULL )
|
||||
|
||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||
#define xMessageBufferCreateStaticWithCallback( xBufferSizeBytes, pucMessageBufferStorageArea, pxStaticMessageBuffer, pxSendCompletedCallback, pxReceiveCompletedCallback ) \
|
||||
xStreamBufferGenericCreateStatic( xBufferSizeBytes, 0, pdTRUE, pucMessageBufferStorageArea, pxStaticMessageBuffer, pxSendCompletedCallback, pxReceiveCompletedCallback )
|
||||
xStreamBufferGenericCreateStatic( ( xBufferSizeBytes ), 0, pdTRUE, ( pucMessageBufferStorageArea ), ( pxStaticMessageBuffer ), ( pxSendCompletedCallback ), ( pxReceiveCompletedCallback ) )
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -343,7 +343,7 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
|
|||
* \ingroup MessageBufferManagement
|
||||
*/
|
||||
#define xMessageBufferSend( xMessageBuffer, pvTxData, xDataLengthBytes, xTicksToWait ) \
|
||||
xStreamBufferSend( xMessageBuffer, pvTxData, xDataLengthBytes, xTicksToWait )
|
||||
xStreamBufferSend( ( xMessageBuffer ), ( pvTxData ), ( xDataLengthBytes ), ( xTicksToWait ) )
|
||||
|
||||
/**
|
||||
* message_buffer.h
|
||||
|
@ -448,7 +448,7 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
|
|||
* \ingroup MessageBufferManagement
|
||||
*/
|
||||
#define xMessageBufferSendFromISR( xMessageBuffer, pvTxData, xDataLengthBytes, pxHigherPriorityTaskWoken ) \
|
||||
xStreamBufferSendFromISR( xMessageBuffer, pvTxData, xDataLengthBytes, pxHigherPriorityTaskWoken )
|
||||
xStreamBufferSendFromISR( ( xMessageBuffer ), ( pvTxData ), ( xDataLengthBytes ), ( pxHigherPriorityTaskWoken ) )
|
||||
|
||||
/**
|
||||
* message_buffer.h
|
||||
|
@ -537,7 +537,7 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
|
|||
* \ingroup MessageBufferManagement
|
||||
*/
|
||||
#define xMessageBufferReceive( xMessageBuffer, pvRxData, xBufferLengthBytes, xTicksToWait ) \
|
||||
xStreamBufferReceive( xMessageBuffer, pvRxData, xBufferLengthBytes, xTicksToWait )
|
||||
xStreamBufferReceive( ( xMessageBuffer ), ( pvRxData ), ( xBufferLengthBytes ), ( xTicksToWait ) )
|
||||
|
||||
|
||||
/**
|
||||
|
@ -639,7 +639,7 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
|
|||
* \ingroup MessageBufferManagement
|
||||
*/
|
||||
#define xMessageBufferReceiveFromISR( xMessageBuffer, pvRxData, xBufferLengthBytes, pxHigherPriorityTaskWoken ) \
|
||||
xStreamBufferReceiveFromISR( xMessageBuffer, pvRxData, xBufferLengthBytes, pxHigherPriorityTaskWoken )
|
||||
xStreamBufferReceiveFromISR( ( xMessageBuffer ), ( pvRxData ), ( xBufferLengthBytes ), ( pxHigherPriorityTaskWoken ) )
|
||||
|
||||
/**
|
||||
* message_buffer.h
|
||||
|
@ -804,7 +804,7 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
|
|||
* \ingroup StreamBufferManagement
|
||||
*/
|
||||
#define xMessageBufferSendCompletedFromISR( xMessageBuffer, pxHigherPriorityTaskWoken ) \
|
||||
xStreamBufferSendCompletedFromISR( xMessageBuffer, pxHigherPriorityTaskWoken )
|
||||
xStreamBufferSendCompletedFromISR( ( xMessageBuffer ), ( pxHigherPriorityTaskWoken ) )
|
||||
|
||||
/**
|
||||
* message_buffer.h
|
||||
|
@ -845,7 +845,7 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
|
|||
* \ingroup StreamBufferManagement
|
||||
*/
|
||||
#define xMessageBufferReceiveCompletedFromISR( xMessageBuffer, pxHigherPriorityTaskWoken ) \
|
||||
xStreamBufferReceiveCompletedFromISR( xMessageBuffer, pxHigherPriorityTaskWoken )
|
||||
xStreamBufferReceiveCompletedFromISR( ( xMessageBuffer ), ( pxHigherPriorityTaskWoken ) )
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#if defined( __cplusplus )
|
||||
|
|
|
@ -182,10 +182,10 @@
|
|||
#define xPortRaisePrivilege( xRunningPrivileged ) \
|
||||
{ \
|
||||
/* Check whether the processor is already privileged. */ \
|
||||
xRunningPrivileged = portIS_PRIVILEGED(); \
|
||||
( xRunningPrivileged ) = portIS_PRIVILEGED(); \
|
||||
\
|
||||
/* If the processor is not already privileged, raise privilege. */ \
|
||||
if( xRunningPrivileged == pdFALSE ) \
|
||||
if( ( xRunningPrivileged ) == pdFALSE ) \
|
||||
{ \
|
||||
portRAISE_PRIVILEGE(); \
|
||||
} \
|
||||
|
@ -197,7 +197,7 @@
|
|||
*/
|
||||
#define vPortResetPrivilege( xRunningPrivileged ) \
|
||||
{ \
|
||||
if( xRunningPrivileged == pdFALSE ) \
|
||||
if( ( xRunningPrivileged ) == pdFALSE ) \
|
||||
{ \
|
||||
portRESET_PRIVILEGE(); \
|
||||
} \
|
||||
|
|
|
@ -1478,7 +1478,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) PRIVILEGED_FUNCTION;
|
|||
* Reset a queue back to its original empty state. The return value is now
|
||||
* obsolete and is always set to pdPASS.
|
||||
*/
|
||||
#define xQueueReset( xQueue ) xQueueGenericReset( xQueue, pdFALSE )
|
||||
#define xQueueReset( xQueue ) xQueueGenericReset( ( xQueue ), pdFALSE )
|
||||
|
||||
/*
|
||||
* The registry is provided as a means for kernel aware debuggers to
|
||||
|
|
|
@ -225,7 +225,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||
* \ingroup Semaphores
|
||||
*/
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
#define xSemaphoreCreateBinaryStatic( pxStaticSemaphore ) xQueueGenericCreateStatic( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticSemaphore, queueQUEUE_TYPE_BINARY_SEMAPHORE )
|
||||
#define xSemaphoreCreateBinaryStatic( pxStaticSemaphore ) xQueueGenericCreateStatic( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, ( pxStaticSemaphore ), queueQUEUE_TYPE_BINARY_SEMAPHORE )
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
|
||||
/**
|
||||
|
@ -940,7 +940,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||
* \ingroup Semaphores
|
||||
*/
|
||||
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_RECURSIVE_MUTEXES == 1 ) )
|
||||
#define xSemaphoreCreateRecursiveMutexStatic( pxStaticSemaphore ) xQueueCreateMutexStatic( queueQUEUE_TYPE_RECURSIVE_MUTEX, pxStaticSemaphore )
|
||||
#define xSemaphoreCreateRecursiveMutexStatic( pxStaticSemaphore ) xQueueCreateMutexStatic( queueQUEUE_TYPE_RECURSIVE_MUTEX, ( pxStaticSemaphore ) )
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
|
||||
/**
|
||||
|
|
|
@ -155,11 +155,11 @@ typedef void (* StreamBufferCallbackFunction_t)( StreamBufferHandle_t xStreamBuf
|
|||
*/
|
||||
|
||||
#define xStreamBufferCreate( xBufferSizeBytes, xTriggerLevelBytes ) \
|
||||
xStreamBufferGenericCreate( xBufferSizeBytes, xTriggerLevelBytes, pdFALSE, NULL, NULL )
|
||||
xStreamBufferGenericCreate( ( xBufferSizeBytes ), ( xTriggerLevelBytes ), pdFALSE, NULL, NULL )
|
||||
|
||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||
#define xStreamBufferCreateWithCallback( xBufferSizeBytes, xTriggerLevelBytes, pxSendCompletedCallback, pxReceiveCompletedCallback ) \
|
||||
xStreamBufferGenericCreate( xBufferSizeBytes, xTriggerLevelBytes, pdFALSE, pxSendCompletedCallback, pxReceiveCompletedCallback )
|
||||
xStreamBufferGenericCreate( ( xBufferSizeBytes ), ( xTriggerLevelBytes ), pdFALSE, ( pxSendCompletedCallback ), ( pxReceiveCompletedCallback ) )
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -253,11 +253,11 @@ typedef void (* StreamBufferCallbackFunction_t)( StreamBufferHandle_t xStreamBuf
|
|||
*/
|
||||
|
||||
#define xStreamBufferCreateStatic( xBufferSizeBytes, xTriggerLevelBytes, pucStreamBufferStorageArea, pxStaticStreamBuffer ) \
|
||||
xStreamBufferGenericCreateStatic( xBufferSizeBytes, xTriggerLevelBytes, pdFALSE, pucStreamBufferStorageArea, pxStaticStreamBuffer, NULL, NULL )
|
||||
xStreamBufferGenericCreateStatic( ( xBufferSizeBytes ), ( xTriggerLevelBytes ), pdFALSE, ( pucStreamBufferStorageArea ), ( pxStaticStreamBuffer ), NULL, NULL )
|
||||
|
||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||
#define xStreamBufferCreateStaticWithCallback( xBufferSizeBytes, xTriggerLevelBytes, pucStreamBufferStorageArea, pxStaticStreamBuffer, pxSendCompletedCallback, pxReceiveCompletedCallback ) \
|
||||
xStreamBufferGenericCreateStatic( xBufferSizeBytes, xTriggerLevelBytes, pdFALSE, pucStreamBufferStorageArea, pxStaticStreamBuffer, pxSendCompletedCallback, pxReceiveCompletedCallback )
|
||||
xStreamBufferGenericCreateStatic( ( xBufferSizeBytes ), ( xTriggerLevelBytes ), pdFALSE, ( pucStreamBufferStorageArea ), ( pxStaticStreamBuffer ), ( pxSendCompletedCallback ), ( pxReceiveCompletedCallback ) )
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -865,9 +865,9 @@ BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime,
|
|||
* vTaskDelayUntil() is the older version of xTaskDelayUntil() and does not
|
||||
* return a value.
|
||||
*/
|
||||
#define vTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement ) \
|
||||
{ \
|
||||
( void ) xTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement ); \
|
||||
#define vTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement ) \
|
||||
{ \
|
||||
( void ) xTaskDelayUntil( ( pxPreviousWakeTime ), ( xTimeIncrement ) ); \
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -77,19 +77,19 @@
|
|||
* invoke the callback else use the receive complete macro which is provided by default for all instances.
|
||||
*/
|
||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||
#define prvRECEIVE_COMPLETED( pxStreamBuffer ) \
|
||||
{ \
|
||||
if( pxStreamBuffer->pxReceiveCompletedCallback != NULL ) \
|
||||
{ \
|
||||
pxStreamBuffer->pxReceiveCompletedCallback( pxStreamBuffer, pdFALSE, NULL ); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
sbRECEIVE_COMPLETED( pxStreamBuffer ); \
|
||||
} \
|
||||
#define prvRECEIVE_COMPLETED( pxStreamBuffer ) \
|
||||
{ \
|
||||
if( ( pxStreamBuffer )->pxReceiveCompletedCallback != NULL ) \
|
||||
{ \
|
||||
( pxStreamBuffer )->pxReceiveCompletedCallback( ( pxStreamBuffer ), pdFALSE, NULL ); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
sbRECEIVE_COMPLETED( ( pxStreamBuffer ) ); \
|
||||
} \
|
||||
}
|
||||
#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||
#define prvRECEIVE_COMPLETED( pxStreamBuffer ) sbRECEIVE_COMPLETED( pxStreamBuffer )
|
||||
#define prvRECEIVE_COMPLETED( pxStreamBuffer ) sbRECEIVE_COMPLETED( ( pxStreamBuffer ) )
|
||||
#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||
|
||||
#ifndef sbRECEIVE_COMPLETED_FROM_ISR
|
||||
|
@ -105,7 +105,7 @@
|
|||
( void ) xTaskNotifyFromISR( ( pxStreamBuffer )->xTaskWaitingToSend, \
|
||||
( uint32_t ) 0, \
|
||||
eNoAction, \
|
||||
pxHigherPriorityTaskWoken ); \
|
||||
( pxHigherPriorityTaskWoken ) ); \
|
||||
( pxStreamBuffer )->xTaskWaitingToSend = NULL; \
|
||||
} \
|
||||
} \
|
||||
|
@ -114,21 +114,21 @@
|
|||
#endif /* sbRECEIVE_COMPLETED_FROM_ISR */
|
||||
|
||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||
#define prvRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, \
|
||||
pxHigherPriorityTaskWoken ) \
|
||||
{ \
|
||||
if( pxStreamBuffer->pxReceiveCompletedCallback != NULL ) \
|
||||
{ \
|
||||
pxStreamBuffer->pxReceiveCompletedCallback( pxStreamBuffer, pdTRUE, pxHigherPriorityTaskWoken ); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
sbRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ); \
|
||||
} \
|
||||
#define prvRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, \
|
||||
pxHigherPriorityTaskWoken ) \
|
||||
{ \
|
||||
if( ( pxStreamBuffer )->pxReceiveCompletedCallback != NULL ) \
|
||||
{ \
|
||||
( pxStreamBuffer )->pxReceiveCompletedCallback( ( pxStreamBuffer ), pdTRUE, ( pxHigherPriorityTaskWoken ) ); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
sbRECEIVE_COMPLETED_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) ); \
|
||||
} \
|
||||
}
|
||||
#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||
#define prvRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
||||
sbRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken )
|
||||
sbRECEIVE_COMPLETED_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) )
|
||||
#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||
|
||||
/* If the user has not provided an application specific Tx notification macro,
|
||||
|
@ -154,19 +154,19 @@
|
|||
* invoke the callback else use the send complete macro which is provided by default for all instances.
|
||||
*/
|
||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||
#define prvSEND_COMPLETED( pxStreamBuffer ) \
|
||||
{ \
|
||||
if( pxStreamBuffer->pxSendCompletedCallback != NULL ) \
|
||||
{ \
|
||||
pxStreamBuffer->pxSendCompletedCallback( pxStreamBuffer, pdFALSE, NULL ); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
sbSEND_COMPLETED( pxStreamBuffer ); \
|
||||
} \
|
||||
#define prvSEND_COMPLETED( pxStreamBuffer ) \
|
||||
{ \
|
||||
if( ( pxStreamBuffer )->pxSendCompletedCallback != NULL ) \
|
||||
{ \
|
||||
pxStreamBuffer->pxSendCompletedCallback( ( pxStreamBuffer ), pdFALSE, NULL ); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
sbSEND_COMPLETED( ( pxStreamBuffer ) ); \
|
||||
} \
|
||||
}
|
||||
#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 ) */
|
||||
|
||||
|
||||
|
@ -182,7 +182,7 @@
|
|||
( void ) xTaskNotifyFromISR( ( pxStreamBuffer )->xTaskWaitingToReceive, \
|
||||
( uint32_t ) 0, \
|
||||
eNoAction, \
|
||||
pxHigherPriorityTaskWoken ); \
|
||||
( pxHigherPriorityTaskWoken ) ); \
|
||||
( pxStreamBuffer )->xTaskWaitingToReceive = NULL; \
|
||||
} \
|
||||
} \
|
||||
|
@ -192,20 +192,20 @@
|
|||
|
||||
|
||||
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
|
||||
#define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
||||
{ \
|
||||
if( pxStreamBuffer->pxSendCompletedCallback != NULL ) \
|
||||
{ \
|
||||
pxStreamBuffer->pxSendCompletedCallback( pxStreamBuffer, pdTRUE, pxHigherPriorityTaskWoken ); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
sbSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ); \
|
||||
} \
|
||||
#define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
||||
{ \
|
||||
if( ( pxStreamBuffer )->pxSendCompletedCallback != NULL ) \
|
||||
{ \
|
||||
( pxStreamBuffer )->pxSendCompletedCallback( ( pxStreamBuffer ), pdTRUE, ( pxHigherPriorityTaskWoken ) ); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
sbSEND_COMPLETE_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) ); \
|
||||
} \
|
||||
}
|
||||
#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||
#define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
|
||||
sbSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken )
|
||||
sbSEND_COMPLETE_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) )
|
||||
#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
|
||||
|
||||
/*lint -restore (9026) */
|
||||
|
|
2
tasks.c
2
tasks.c
|
@ -165,7 +165,7 @@
|
|||
* architecture being used. */
|
||||
|
||||
/* A port optimised version is provided. Call the port defined macros. */
|
||||
#define taskRECORD_READY_PRIORITY( uxPriority ) portRECORD_READY_PRIORITY( uxPriority, uxTopReadyPriority )
|
||||
#define taskRECORD_READY_PRIORITY( uxPriority ) portRECORD_READY_PRIORITY( ( uxPriority ), uxTopReadyPriority )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue