Skip to content

Commit c4d2f91

Browse files
newbrainpaulbartell
authored andcommitted
Update of three badly terminated macro definitions (FreeRTOS#555)
* Update of three badly terminated macro definitions - vTaskDelayUntil() to conform to usual pattern do { ... } while(0) - vTaskNotifyGiveFromISR() and - vTaskGenericNotifyGiveFromISR() to remove extra terminating semicolons - This PR addresses issues FreeRTOS#553 and FreeRTOS#554 * Adjust formatting of task.h Co-authored-by: Paul Bartell <pbartell@amazon.com>
1 parent 25831ca commit c4d2f91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/task.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,9 +908,9 @@ BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime,
908908
* return a value.
909909
*/
910910
#define vTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement ) \
911-
{ \
911+
do { \
912912
( void ) xTaskDelayUntil( ( pxPreviousWakeTime ), ( xTimeIncrement ) ); \
913-
}
913+
} while( 0 )
914914

915915

916916
/**
@@ -2726,9 +2726,9 @@ void vTaskGenericNotifyGiveFromISR( TaskHandle_t xTaskToNotify,
27262726
UBaseType_t uxIndexToNotify,
27272727
BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
27282728
#define vTaskNotifyGiveFromISR( xTaskToNotify, pxHigherPriorityTaskWoken ) \
2729-
vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( pxHigherPriorityTaskWoken ) );
2729+
vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( pxHigherPriorityTaskWoken ) )
27302730
#define vTaskNotifyGiveIndexedFromISR( xTaskToNotify, uxIndexToNotify, pxHigherPriorityTaskWoken ) \
2731-
vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( uxIndexToNotify ), ( pxHigherPriorityTaskWoken ) );
2731+
vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( uxIndexToNotify ), ( pxHigherPriorityTaskWoken ) )
27322732

27332733
/**
27342734
* task. h

0 commit comments

Comments
 (0)