From c09187e73b4d1258f11900a7da163fa3c33b5a3a Mon Sep 17 00:00:00 2001 From: newbrain <17814222+newbrain@users.noreply.github.com> Date: Thu, 8 Sep 2022 19:33:41 +0200 Subject: [PATCH] Update of three badly terminated macro definitions (#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 #553 and #554 * Adjust formatting of task.h Co-authored-by: Paul Bartell --- include/task.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/task.h b/include/task.h index 7f9ebd7e7..cdc63a1ae 100644 --- a/include/task.h +++ b/include/task.h @@ -866,9 +866,9 @@ BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime, * return a value. */ #define vTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement ) \ - { \ + do { \ ( void ) xTaskDelayUntil( ( pxPreviousWakeTime ), ( xTimeIncrement ) ); \ - } + } while( 0 ) /** @@ -2531,9 +2531,9 @@ void vTaskGenericNotifyGiveFromISR( TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION; #define vTaskNotifyGiveFromISR( xTaskToNotify, pxHigherPriorityTaskWoken ) \ - vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( pxHigherPriorityTaskWoken ) ); + vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( pxHigherPriorityTaskWoken ) ) #define vTaskNotifyGiveIndexedFromISR( xTaskToNotify, uxIndexToNotify, pxHigherPriorityTaskWoken ) \ - vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( uxIndexToNotify ), ( pxHigherPriorityTaskWoken ) ); + vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( uxIndexToNotify ), ( pxHigherPriorityTaskWoken ) ) /** * task. h