From f1b9c185036e811dc7dbfb9421f070dc5b81d27b Mon Sep 17 00:00:00 2001 From: Rahul Kar Date: Sun, 18 Feb 2024 14:45:01 +0000 Subject: [PATCH] Fix spell checks --- FreeRTOS/Demo/Common/Minimal/AbortDelay.c | 95 ++++---- FreeRTOS/Demo/Common/Minimal/IntSemTest.c | 37 ++- .../Demo/Common/Minimal/StaticAllocation.c | 223 +++++++++--------- FreeRTOS/Demo/Common/Minimal/blocktim.c | 9 +- FreeRTOS/Demo/Common/Minimal/recmutex.c | 43 ++-- 5 files changed, 201 insertions(+), 206 deletions(-) diff --git a/FreeRTOS/Demo/Common/Minimal/AbortDelay.c b/FreeRTOS/Demo/Common/Minimal/AbortDelay.c index 733ff423b24..2c505052837 100644 --- a/FreeRTOS/Demo/Common/Minimal/AbortDelay.c +++ b/FreeRTOS/Demo/Common/Minimal/AbortDelay.c @@ -1,6 +1,6 @@ /* - * FreeRTOS V202111.00 - * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS V202212.00 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -420,18 +420,18 @@ EventBits_t xBitsToWaitFor = ( EventBits_t ) 0x01, xReturn; #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) - { - static StaticEventGroup_t xEventGroupBuffer; + { + static StaticEventGroup_t xEventGroupBuffer; - /* Create the event group. Statically allocated memory is used so the - * creation cannot fail. */ - xEventGroup = xEventGroupCreateStatic( &xEventGroupBuffer ); - } + /* Create the event group. Statically allocated memory is used so the + * creation cannot fail. */ + xEventGroup = xEventGroupCreateStatic( &xEventGroupBuffer ); + } #else - { - xEventGroup = xEventGroupCreate(); - configASSERT( xEventGroup ); - } + { + xEventGroup = xEventGroupCreate(); + configASSERT( xEventGroup ); + } #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ /* Note the time before the delay so the length of the delay is known. */ @@ -488,25 +488,25 @@ uint8_t uxRxData; #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) - { - /* Defines the memory that will actually hold the streams within the - * stream buffer. */ - static uint8_t ucStorageBuffer[ sizeof( configMESSAGE_BUFFER_LENGTH_TYPE ) + 1 ]; + { + /* Defines the memory that will actually hold the streams within the + * stream buffer. */ + static uint8_t ucStorageBuffer[ sizeof( configMESSAGE_BUFFER_LENGTH_TYPE ) + 1 ]; - /* The variable used to hold the stream buffer structure. */ - StaticStreamBuffer_t xStreamBufferStruct; + /* The variable used to hold the stream buffer structure. */ + StaticStreamBuffer_t xStreamBufferStruct; - xStreamBuffer = xStreamBufferCreateStatic( sizeof( ucStorageBuffer ), - xTriggerLevelBytes, - ucStorageBuffer, - &xStreamBufferStruct ); - } + xStreamBuffer = xStreamBufferCreateStatic( sizeof( ucStorageBuffer ), + xTriggerLevelBytes, + ucStorageBuffer, + &xStreamBufferStruct ); + } #else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ - { - xStreamBuffer = xStreamBufferCreate( sizeof( uint8_t ), xTriggerLevelBytes ); - configASSERT( xStreamBuffer ); - } + { + xStreamBuffer = xStreamBufferCreate( sizeof( uint8_t ), xTriggerLevelBytes ); + configASSERT( xStreamBuffer ); + } #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ /* Note the time before the delay so the length of the delay is known. */ @@ -563,19 +563,19 @@ uint8_t ucItemToQueue; #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) - { - static StaticQueue_t xQueueBuffer; - static uint8_t ucQueueStorage[ sizeof( uint8_t ) ]; + { + static StaticQueue_t xQueueBuffer; + static uint8_t ucQueueStorage[ sizeof( uint8_t ) ]; - /* Create the queue. Statically allocated memory is used so the - * creation cannot fail. */ - xQueue = xQueueCreateStatic( xQueueLength, sizeof( uint8_t ), ucQueueStorage, &xQueueBuffer ); - } + /* Create the queue. Statically allocated memory is used so the + * creation cannot fail. */ + xQueue = xQueueCreateStatic( xQueueLength, sizeof( uint8_t ), ucQueueStorage, &xQueueBuffer ); + } #else - { - xQueue = xQueueCreate( xQueueLength, sizeof( uint8_t ) ); - configASSERT( xQueue ); - } + { + xQueue = xQueueCreate( xQueueLength, sizeof( uint8_t ) ); + configASSERT( xQueue ); + } #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ /* This function tests aborting when in the blocked state waiting to send, @@ -639,17 +639,17 @@ SemaphoreHandle_t xSemaphore; #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) - { - static StaticSemaphore_t xSemaphoreBuffer; + { + static StaticSemaphore_t xSemaphoreBuffer; - /* Create the semaphore. Statically allocated memory is used so the - * creation cannot fail. */ - xSemaphore = xSemaphoreCreateBinaryStatic( &xSemaphoreBuffer ); - } + /* Create the semaphore. Statically allocated memory is used so the + * creation cannot fail. */ + xSemaphore = xSemaphoreCreateBinaryStatic( &xSemaphoreBuffer ); + } #else - { - xSemaphore = xSemaphoreCreateBinary(); - } + { + xSemaphore = xSemaphoreCreateBinary(); + } #endif /* Note the time before the delay so the length of the delay is known. */ @@ -797,4 +797,3 @@ } #endif /* INCLUDE_xTaskAbortDelay == 1 */ - diff --git a/FreeRTOS/Demo/Common/Minimal/IntSemTest.c b/FreeRTOS/Demo/Common/Minimal/IntSemTest.c index 1b55f498ad6..229a27ff69f 100644 --- a/FreeRTOS/Demo/Common/Minimal/IntSemTest.c +++ b/FreeRTOS/Demo/Common/Minimal/IntSemTest.c @@ -1,6 +1,6 @@ /* - * FreeRTOS V202111.00 - * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS V202212.00 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -177,9 +177,9 @@ static void prvTakeAndGiveInTheSameOrder( void ) /* Ensure the slave is suspended, and that this task is running at the * lower priority as expected as the start conditions. */ #if ( INCLUDE_eTaskGetState == 1 ) - { - configASSERT( eTaskGetState( xSlaveHandle ) == eSuspended ); - } + { + configASSERT( eTaskGetState( xSlaveHandle ) == eSuspended ); + } #endif /* INCLUDE_eTaskGetState */ if( uxTaskPriorityGet( NULL ) != intsemMASTER_PRIORITY ) @@ -200,9 +200,9 @@ static void prvTakeAndGiveInTheSameOrder( void ) /* The slave has the higher priority so should now have executed and * blocked on the semaphore. */ #if ( INCLUDE_eTaskGetState == 1 ) - { - configASSERT( eTaskGetState( xSlaveHandle ) == eBlocked ); - } + { + configASSERT( eTaskGetState( xSlaveHandle ) == eBlocked ); + } #endif /* INCLUDE_eTaskGetState */ /* This task should now have inherited the priority of the slave @@ -264,9 +264,9 @@ static void prvTakeAndGiveInTheSameOrder( void ) } #if ( INCLUDE_eTaskGetState == 1 ) - { - configASSERT( eTaskGetState( xSlaveHandle ) == eSuspended ); - } + { + configASSERT( eTaskGetState( xSlaveHandle ) == eSuspended ); + } #endif /* INCLUDE_eTaskGetState */ /* Reset the mutex ready for the next round. */ @@ -279,9 +279,9 @@ static void prvTakeAndGiveInTheOppositeOrder( void ) /* Ensure the slave is suspended, and that this task is running at the * lower priority as expected as the start conditions. */ #if ( INCLUDE_eTaskGetState == 1 ) - { - configASSERT( eTaskGetState( xSlaveHandle ) == eSuspended ); - } + { + configASSERT( eTaskGetState( xSlaveHandle ) == eSuspended ); + } #endif /* INCLUDE_eTaskGetState */ if( uxTaskPriorityGet( NULL ) != intsemMASTER_PRIORITY ) @@ -302,9 +302,9 @@ static void prvTakeAndGiveInTheOppositeOrder( void ) /* The slave has the higher priority so should now have executed and * blocked on the semaphore. */ #if ( INCLUDE_eTaskGetState == 1 ) - { - configASSERT( eTaskGetState( xSlaveHandle ) == eBlocked ); - } + { + configASSERT( eTaskGetState( xSlaveHandle ) == eBlocked ); + } #endif /* INCLUDE_eTaskGetState */ /* This task should now have inherited the priority of the slave @@ -457,7 +457,7 @@ static void vInterruptCountingSemaphoreTask( void * pvParameters ) xSemaphoreTake( xISRCountingSemaphore, portMAX_DELAY ); xOkToGiveCountingSemaphore = pdFALSE; - /* Reset the priority so as not to disturbe other tests too much. */ + /* Reset the priority so as not to disturb other tests too much. */ vTaskPrioritySet( NULL, tskIDLE_PRIORITY ); ulCountingSemaphoreLoops++; @@ -535,4 +535,3 @@ BaseType_t xAreInterruptSemaphoreTasksStillRunning( void ) return xReturn; } - diff --git a/FreeRTOS/Demo/Common/Minimal/StaticAllocation.c b/FreeRTOS/Demo/Common/Minimal/StaticAllocation.c index 493aed0a8e2..9846c5820e6 100644 --- a/FreeRTOS/Demo/Common/Minimal/StaticAllocation.c +++ b/FreeRTOS/Demo/Common/Minimal/StaticAllocation.c @@ -1,6 +1,6 @@ /* - * FreeRTOS V202111.00 - * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS V202212.00 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -286,15 +286,15 @@ vSemaphoreDelete( xSemaphore ); #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - /* Now do the same but using dynamically allocated buffers to ensure the - * delete functions are working correctly in both the static and dynamic - * allocation cases. */ - xSemaphore = xSemaphoreCreateCounting( uxMaxCount, 0 ); - configASSERT( xSemaphore != NULL ); - prvSanityCheckCreatedSemaphore( xSemaphore, uxMaxCount ); - vSemaphoreDelete( xSemaphore ); - } + { + /* Now do the same but using dynamically allocated buffers to ensure the + * delete functions are working correctly in both the static and dynamic + * allocation cases. */ + xSemaphore = xSemaphoreCreateCounting( uxMaxCount, 0 ); + configASSERT( xSemaphore != NULL ); + prvSanityCheckCreatedSemaphore( xSemaphore, uxMaxCount ); + vSemaphoreDelete( xSemaphore ); + } #endif } /*-----------------------------------------------------------*/ @@ -335,12 +335,12 @@ * functions are working correctly in both the static and dynamic memory * allocation cases. */ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - xSemaphore = xSemaphoreCreateRecursiveMutex(); - configASSERT( xSemaphore != NULL ); - prvSanityCheckCreatedRecursiveMutex( xSemaphore ); - vSemaphoreDelete( xSemaphore ); - } + { + xSemaphore = xSemaphoreCreateRecursiveMutex(); + configASSERT( xSemaphore != NULL ); + prvSanityCheckCreatedRecursiveMutex( xSemaphore ); + vSemaphoreDelete( xSemaphore ); + } #endif } /*-----------------------------------------------------------*/ @@ -390,20 +390,20 @@ * function is working correctly in both the static and dynamic memory * allocation cases. */ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - xQueue = xQueueCreate( staticQUEUE_LENGTH_IN_ITEMS, /* The maximum number of items the queue can hold. */ - sizeof( uint64_t ) ); /* The size of each item. */ + { + xQueue = xQueueCreate( staticQUEUE_LENGTH_IN_ITEMS, /* The maximum number of items the queue can hold. */ + sizeof( uint64_t ) ); /* The size of each item. */ - /* The queue handle should equal the static queue structure passed into the - * xQueueCreateStatic() function. */ - configASSERT( xQueue != NULL ); + /* The queue handle should equal the static queue structure passed into the + * xQueueCreateStatic() function. */ + configASSERT( xQueue != NULL ); - /* Ensure the queue passes a few sanity checks as a valid queue. */ - prvSanityCheckCreatedQueue( xQueue ); + /* Ensure the queue passes a few sanity checks as a valid queue. */ + prvSanityCheckCreatedQueue( xQueue ); - /* Delete the queue again so the buffers can be reused. */ - vQueueDelete( xQueue ); - } + /* Delete the queue again so the buffers can be reused. */ + vQueueDelete( xQueue ); + } #endif /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */ } /*-----------------------------------------------------------*/ @@ -453,28 +453,28 @@ * function is working correctly in both the static and dynamic allocation * cases. */ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - xSemaphore = xSemaphoreCreateMutex(); + { + xSemaphore = xSemaphoreCreateMutex(); - /* The semaphore handle should equal the static semaphore structure - * passed into the xSemaphoreCreateMutexStatic() function. */ - configASSERT( xSemaphore != NULL ); + /* The semaphore handle should equal the static semaphore structure + * passed into the xSemaphoreCreateMutexStatic() function. */ + configASSERT( xSemaphore != NULL ); - /* Take the mutex so the mutex is in the state expected by the - * prvSanityCheckCreatedSemaphore() function. */ - xReturned = xSemaphoreTake( xSemaphore, staticDONT_BLOCK ); + /* Take the mutex so the mutex is in the state expected by the + * prvSanityCheckCreatedSemaphore() function. */ + xReturned = xSemaphoreTake( xSemaphore, staticDONT_BLOCK ); - if( xReturned != pdPASS ) - { - xErrorOccurred = __LINE__; - } + if( xReturned != pdPASS ) + { + xErrorOccurred = __LINE__; + } - /* Ensure the semaphore passes a few sanity checks as a valid semaphore. */ - prvSanityCheckCreatedSemaphore( xSemaphore, staticBINARY_SEMAPHORE_MAX_COUNT ); + /* Ensure the semaphore passes a few sanity checks as a valid semaphore. */ + prvSanityCheckCreatedSemaphore( xSemaphore, staticBINARY_SEMAPHORE_MAX_COUNT ); - /* Delete the semaphore again so the buffers can be reused. */ - vSemaphoreDelete( xSemaphore ); - } + /* Delete the semaphore again so the buffers can be reused. */ + vSemaphoreDelete( xSemaphore ); + } #endif /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */ } /*-----------------------------------------------------------*/ @@ -516,31 +516,31 @@ * delete function is working correctly in both the static and dynamic * allocation cases. */ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - xSemaphore = xSemaphoreCreateBinary(); - configASSERT( xSemaphore != NULL ); - prvSanityCheckCreatedSemaphore( xSemaphore, staticBINARY_SEMAPHORE_MAX_COUNT ); - vSemaphoreDelete( xSemaphore ); - } + { + xSemaphore = xSemaphoreCreateBinary(); + configASSERT( xSemaphore != NULL ); + prvSanityCheckCreatedSemaphore( xSemaphore, staticBINARY_SEMAPHORE_MAX_COUNT ); + vSemaphoreDelete( xSemaphore ); + } #endif /* There isn't a static version of the old and deprecated * vSemaphoreCreateBinary() macro (because its deprecated!), but check it is * still functioning correctly. */ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - vSemaphoreCreateBinary( xSemaphore ); - - /* The macro starts with the binary semaphore available, but the test - * function expects it to be unavailable. */ - if( xSemaphoreTake( xSemaphore, staticDONT_BLOCK ) == pdFAIL ) - { - xErrorOccurred = __LINE__; - } + { + vSemaphoreCreateBinary( xSemaphore ); - prvSanityCheckCreatedSemaphore( xSemaphore, staticBINARY_SEMAPHORE_MAX_COUNT ); - vSemaphoreDelete( xSemaphore ); + /* The macro starts with the binary semaphore available, but the test + * function expects it to be unavailable. */ + if( xSemaphoreTake( xSemaphore, staticDONT_BLOCK ) == pdFAIL ) + { + xErrorOccurred = __LINE__; } + + prvSanityCheckCreatedSemaphore( xSemaphore, staticBINARY_SEMAPHORE_MAX_COUNT ); + vSemaphoreDelete( xSemaphore ); + } #endif /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */ } /*-----------------------------------------------------------*/ @@ -644,37 +644,37 @@ * the delete function is working correctly in both the static and dynamic * allocation cases. */ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - xTimer = xTimerCreate( "T1", /* Text name for the task. Helps debugging only. Not used by FreeRTOS. */ - xTimerPeriod, /* The period of the timer in ticks. */ - pdTRUE, /* This is an auto-reload timer. */ - ( void * ) &uxVariableToIncrement, /* The variable incremented by the test is passed into the timer callback using the timer ID. */ - prvTimerCallback ); /* The function to execute when the timer expires. */ + { + xTimer = xTimerCreate( "T1", /* Text name for the task. Helps debugging only. Not used by FreeRTOS. */ + xTimerPeriod, /* The period of the timer in ticks. */ + pdTRUE, /* This is an auto-reload timer. */ + ( void * ) &uxVariableToIncrement, /* The variable incremented by the test is passed into the timer callback using the timer ID. */ + prvTimerCallback ); /* The function to execute when the timer expires. */ - configASSERT( xTimer != NULL ); + configASSERT( xTimer != NULL ); - uxVariableToIncrement = 0; - xReturned = xTimerStart( xTimer, staticDONT_BLOCK ); + uxVariableToIncrement = 0; + xReturned = xTimerStart( xTimer, staticDONT_BLOCK ); - if( xReturned != pdPASS ) - { - xErrorOccurred = __LINE__; - } + if( xReturned != pdPASS ) + { + xErrorOccurred = __LINE__; + } - vTaskDelay( xTimerPeriod * staticMAX_TIMER_CALLBACK_EXECUTIONS ); + vTaskDelay( xTimerPeriod * staticMAX_TIMER_CALLBACK_EXECUTIONS ); - if( uxVariableToIncrement != staticMAX_TIMER_CALLBACK_EXECUTIONS ) - { - xErrorOccurred = __LINE__; - } + if( uxVariableToIncrement != staticMAX_TIMER_CALLBACK_EXECUTIONS ) + { + xErrorOccurred = __LINE__; + } - xReturned = xTimerDelete( xTimer, staticDONT_BLOCK ); + xReturned = xTimerDelete( xTimer, staticDONT_BLOCK ); - if( xReturned != pdPASS ) - { - xErrorOccurred = __LINE__; - } + if( xReturned != pdPASS ) + { + xErrorOccurred = __LINE__; } + } #endif /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */ } /*-----------------------------------------------------------*/ @@ -713,12 +713,12 @@ * delete function is working correctly in both the static and dynamic * allocation cases. */ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - xEventGroup = xEventGroupCreate(); - configASSERT( xEventGroup != NULL ); - prvSanityCheckCreatedEventGroup( xEventGroup ); - vEventGroupDelete( xEventGroup ); - } + { + xEventGroup = xEventGroupCreate(); + configASSERT( xEventGroup != NULL ); + prvSanityCheckCreatedEventGroup( xEventGroup ); + vEventGroupDelete( xEventGroup ); + } #endif } /*-----------------------------------------------------------*/ @@ -774,31 +774,31 @@ * function is working correctly in both the static and dynamic allocation * cases. */ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) - { - BaseType_t xReturned; + { + BaseType_t xReturned; - xReturned = xTaskCreate( - prvStaticallyAllocatedTask, /* Function that implements the task - the same function is used but is actually dynamically allocated this time. */ - "Static", /* Human readable name for the task. */ - configMINIMAL_STACK_SIZE, /* Task's stack size, in words (not bytes!). */ - NULL, /* Parameter to pass into the task. */ - uxTaskPriorityGet( NULL ) + 1, /* The priority of the task. */ - &xCreatedTask ); /* Handle of the task being created. */ + xReturned = xTaskCreate( + prvStaticallyAllocatedTask, /* Function that implements the task - the same function is used but is actually dynamically allocated this time. */ + "Static", /* Human readable name for the task. */ + configMINIMAL_STACK_SIZE, /* Task's stack size, in words (not bytes!). */ + NULL, /* Parameter to pass into the task. */ + uxTaskPriorityGet( NULL ) + 1, /* The priority of the task. */ + &xCreatedTask ); /* Handle of the task being created. */ - if( eTaskGetState( xCreatedTask ) != eSuspended ) - { - xErrorOccurred = __LINE__; - } + if( eTaskGetState( xCreatedTask ) != eSuspended ) + { + xErrorOccurred = __LINE__; + } - configASSERT( xReturned == pdPASS ); + configASSERT( xReturned == pdPASS ); - if( xReturned != pdPASS ) - { - xErrorOccurred = __LINE__; - } - - vTaskDelete( xCreatedTask ); + if( xReturned != pdPASS ) + { + xErrorOccurred = __LINE__; } + + vTaskDelete( xCreatedTask ); + } #endif /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */ } /*-----------------------------------------------------------*/ @@ -1111,4 +1111,3 @@ /* Exclude the entire file if configSUPPORT_STATIC_ALLOCATION is 0. */ #endif /* configSUPPORT_STATIC_ALLOCATION == 1 */ - diff --git a/FreeRTOS/Demo/Common/Minimal/blocktim.c b/FreeRTOS/Demo/Common/Minimal/blocktim.c index 0f55e92f98e..9d258b6129a 100644 --- a/FreeRTOS/Demo/Common/Minimal/blocktim.c +++ b/FreeRTOS/Demo/Common/Minimal/blocktim.c @@ -1,6 +1,6 @@ /* - * FreeRTOS V202111.00 - * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS V202212.00 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -290,7 +290,7 @@ static void vPrimaryBlockTimeTestTask( void * pvParameters ) vTaskPrioritySet( xSecondary, bktSECONDARY_PRIORITY ); } - /* Let the other task timeout. When it unblockes it will check that it + /* Let the other task timeout. When it unblocks it will check that it * unblocked at the correct time, then suspend itself. */ while( xRunIndicator != bktRUN_INDICATOR ) { @@ -367,7 +367,7 @@ static void vPrimaryBlockTimeTestTask( void * pvParameters ) vTaskPrioritySet( xSecondary, bktSECONDARY_PRIORITY ); } - /* Let the other task timeout. When it unblockes it will check that it + /* Let the other task timeout. When it unblocks it will check that it * unblocked at the correct time, then suspend itself. */ while( xRunIndicator != bktRUN_INDICATOR ) { @@ -595,4 +595,3 @@ BaseType_t xAreBlockTimeTestTasksStillRunning( void ) return xReturn; } - diff --git a/FreeRTOS/Demo/Common/Minimal/recmutex.c b/FreeRTOS/Demo/Common/Minimal/recmutex.c index c6f0b8a0546..a03c4f91d25 100644 --- a/FreeRTOS/Demo/Common/Minimal/recmutex.c +++ b/FreeRTOS/Demo/Common/Minimal/recmutex.c @@ -1,6 +1,6 @@ /* - * FreeRTOS V202111.00 - * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * FreeRTOS V202212.00 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -281,10 +281,10 @@ static void prvRecursiveMutexPollingTask( void * pvParameters ) if( xSemaphoreTakeRecursive( xMutex, recmuNO_DELAY ) == pdPASS ) { #if ( INCLUDE_eTaskGetState == 1 ) - { - configASSERT( eTaskGetState( xControllingTaskHandle ) == eSuspended ); - configASSERT( eTaskGetState( xBlockingTaskHandle ) == eSuspended ); - } + { + configASSERT( eTaskGetState( xControllingTaskHandle ) == eSuspended ); + configASSERT( eTaskGetState( xBlockingTaskHandle ) == eSuspended ); + } #endif /* INCLUDE_eTaskGetState */ /* Is the blocking task suspended? */ @@ -325,17 +325,17 @@ static void prvRecursiveMutexPollingTask( void * pvParameters ) } #if ( INCLUDE_uxTaskPriorityGet == 1 ) - { - /* Check priority inherited. */ - configASSERT( uxTaskPriorityGet( NULL ) == recmuCONTROLLING_TASK_PRIORITY ); - } + { + /* Check priority inherited. */ + configASSERT( uxTaskPriorityGet( NULL ) == recmuCONTROLLING_TASK_PRIORITY ); + } #endif /* INCLUDE_uxTaskPriorityGet */ #if ( INCLUDE_eTaskGetState == 1 ) - { - configASSERT( eTaskGetState( xControllingTaskHandle ) == eBlocked ); - configASSERT( eTaskGetState( xBlockingTaskHandle ) == eBlocked ); - } + { + configASSERT( eTaskGetState( xControllingTaskHandle ) == eBlocked ); + configASSERT( eTaskGetState( xBlockingTaskHandle ) == eBlocked ); + } #endif /* INCLUDE_eTaskGetState */ /* Release the mutex, disinheriting the higher priority again. */ @@ -345,18 +345,18 @@ static void prvRecursiveMutexPollingTask( void * pvParameters ) } #if ( INCLUDE_uxTaskPriorityGet == 1 ) - { - /* Check priority disinherited. */ - configASSERT( uxTaskPriorityGet( NULL ) == recmuPOLLING_TASK_PRIORITY ); - } + { + /* Check priority disinherited. */ + configASSERT( uxTaskPriorityGet( NULL ) == recmuPOLLING_TASK_PRIORITY ); + } #endif /* INCLUDE_uxTaskPriorityGet */ } } #if configUSE_PREEMPTION == 0 - { - taskYIELD(); - } + { + taskYIELD(); + } #endif } } @@ -409,4 +409,3 @@ BaseType_t xAreRecursiveMutexTasksStillRunning( void ) return xReturn; } -