mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-23 03:39:33 +00:00
freertos: Uncrustify IDF FreeRTOS
This commit uncrustifies IDF FreeRTOS source files using the upstream provided uncrustify.cfg files.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
*
|
||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*/
|
||||
|
||||
/*
|
||||
* FreeRTOS Kernel V10.4.3
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
@@ -79,9 +80,9 @@ typedef struct EventGroupDef_t
|
||||
uint8_t ucStaticallyAllocated; /*< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
|
||||
#endif
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
portMUX_TYPE xEventGroupLock; /* Spinlock required for SMP critical sections */
|
||||
#endif // ESP_PLATFORM
|
||||
#ifdef ESP_PLATFORM
|
||||
portMUX_TYPE xEventGroupLock; /* Spinlock required for SMP critical sections */
|
||||
#endif // ESP_PLATFORM
|
||||
} EventGroup_t;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -224,11 +225,11 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ESP_PLATFORM // IDF-3755
|
||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
#else
|
||||
vTaskSuspendAll();
|
||||
#endif // ESP_PLATFORM
|
||||
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
#else
|
||||
vTaskSuspendAll();
|
||||
#endif // ESP_PLATFORM
|
||||
{
|
||||
uxOriginalBitValue = pxEventBits->uxEventBits;
|
||||
|
||||
@@ -271,12 +272,12 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef ESP_PLATFORM // IDF-3755
|
||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
xAlreadyYielded = pdFALSE;
|
||||
#else
|
||||
xAlreadyYielded = xTaskResumeAll();
|
||||
#endif // ESP_PLATFORM
|
||||
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
xAlreadyYielded = pdFALSE;
|
||||
#else
|
||||
xAlreadyYielded = xTaskResumeAll();
|
||||
#endif // ESP_PLATFORM
|
||||
|
||||
if( xTicksToWait != ( TickType_t ) 0 )
|
||||
{
|
||||
@@ -360,11 +361,11 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ESP_PLATFORM // IDF-3755
|
||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
#else
|
||||
vTaskSuspendAll();
|
||||
#endif // ESP_PLATFORM
|
||||
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
#else
|
||||
vTaskSuspendAll();
|
||||
#endif // ESP_PLATFORM
|
||||
{
|
||||
const EventBits_t uxCurrentEventBits = pxEventBits->uxEventBits;
|
||||
|
||||
@@ -432,12 +433,12 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
|
||||
traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor );
|
||||
}
|
||||
}
|
||||
#ifdef ESP_PLATFORM // IDF-3755
|
||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
xAlreadyYielded = pdFALSE;
|
||||
#else
|
||||
xAlreadyYielded = xTaskResumeAll();
|
||||
#endif // ESP_PLATFORM
|
||||
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
xAlreadyYielded = pdFALSE;
|
||||
#else
|
||||
xAlreadyYielded = xTaskResumeAll();
|
||||
#endif // ESP_PLATFORM
|
||||
|
||||
if( xTicksToWait != ( TickType_t ) 0 )
|
||||
{
|
||||
@@ -580,14 +581,15 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
|
||||
|
||||
pxList = &( pxEventBits->xTasksWaitingForBits );
|
||||
pxListEnd = listGET_END_MARKER( pxList ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
|
||||
#ifdef ESP_PLATFORM // IDF-3755
|
||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
/* We are about to traverse a task list which is a kernel data structure.
|
||||
* Thus we need to call vTaskTakeKernelLock() to take the kernel lock. */
|
||||
vTaskTakeKernelLock();
|
||||
#else
|
||||
vTaskSuspendAll();
|
||||
#endif // ESP_PLATFORM
|
||||
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
|
||||
/* We are about to traverse a task list which is a kernel data structure.
|
||||
* Thus we need to call vTaskTakeKernelLock() to take the kernel lock. */
|
||||
vTaskTakeKernelLock();
|
||||
#else
|
||||
vTaskSuspendAll();
|
||||
#endif // ESP_PLATFORM
|
||||
{
|
||||
traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet );
|
||||
|
||||
@@ -659,13 +661,13 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
|
||||
* bit was set in the control word. */
|
||||
pxEventBits->uxEventBits &= ~uxBitsToClear;
|
||||
}
|
||||
#ifdef ESP_PLATFORM // IDF-3755
|
||||
/* Release the previously taken kernel lock, then release the event group spinlock. */
|
||||
vTaskReleaseKernelLock();
|
||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
#else
|
||||
( void ) xTaskResumeAll();
|
||||
#endif // ESP_PLATFORM
|
||||
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||
/* Release the previously taken kernel lock, then release the event group spinlock. */
|
||||
vTaskReleaseKernelLock();
|
||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
#else
|
||||
( void ) xTaskResumeAll();
|
||||
#endif // ESP_PLATFORM
|
||||
|
||||
return pxEventBits->uxEventBits;
|
||||
}
|
||||
@@ -676,16 +678,18 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
||||
EventGroup_t * pxEventBits = xEventGroup;
|
||||
const List_t * pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
|
||||
|
||||
traceEVENT_GROUP_DELETE( xEventGroup );
|
||||
|
||||
// IDF-3755
|
||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
#ifdef ESP_PLATFORM
|
||||
/* We are about to traverse a task list which is a kernel data structure.
|
||||
* Thus we need to call vTaskTakeKernelLock() to take the kernel lock. */
|
||||
vTaskTakeKernelLock();
|
||||
#endif
|
||||
{
|
||||
traceEVENT_GROUP_DELETE( xEventGroup );
|
||||
|
||||
/* IDF-3755 */
|
||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
/* We are about to traverse a task list which is a kernel data structure.
|
||||
* Thus we need to call vTaskTakeKernelLock() to take the kernel lock. */
|
||||
vTaskTakeKernelLock();
|
||||
#endif
|
||||
|
||||
while( listCURRENT_LIST_LENGTH( pxTasksWaitingForBits ) > ( UBaseType_t ) 0 )
|
||||
{
|
||||
/* Unblock the task, returning 0 as the event list is being deleted
|
||||
@@ -693,12 +697,12 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
||||
configASSERT( pxTasksWaitingForBits->xListEnd.pxNext != ( const ListItem_t * ) &( pxTasksWaitingForBits->xListEnd ) );
|
||||
vTaskRemoveFromUnorderedEventList( pxTasksWaitingForBits->xListEnd.pxNext, eventUNBLOCKED_DUE_TO_BIT_SET );
|
||||
}
|
||||
}
|
||||
#ifdef ESP_PLATFORM
|
||||
/* Release the previously taken kernel lock. */
|
||||
vTaskReleaseKernelLock();
|
||||
#endif
|
||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
/* Release the previously taken kernel lock. */
|
||||
vTaskReleaseKernelLock();
|
||||
#endif
|
||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||
|
||||
#if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) )
|
||||
{
|
||||
@@ -720,6 +724,7 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
||||
}
|
||||
}
|
||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user