forked from espressif/esp-idf
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
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* 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. */
|
uint8_t ucStaticallyAllocated; /*< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
portMUX_TYPE xEventGroupLock; /* Spinlock required for SMP critical sections */
|
portMUX_TYPE xEventGroupLock; /* Spinlock required for SMP critical sections */
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
} EventGroup_t;
|
} EventGroup_t;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
@@ -224,11 +225,11 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||||
#else
|
#else
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
uxOriginalBitValue = pxEventBits->uxEventBits;
|
uxOriginalBitValue = pxEventBits->uxEventBits;
|
||||||
|
|
||||||
@@ -271,12 +272,12 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||||
xAlreadyYielded = pdFALSE;
|
xAlreadyYielded = pdFALSE;
|
||||||
#else
|
#else
|
||||||
xAlreadyYielded = xTaskResumeAll();
|
xAlreadyYielded = xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
if( xTicksToWait != ( TickType_t ) 0 )
|
if( xTicksToWait != ( TickType_t ) 0 )
|
||||||
{
|
{
|
||||||
@@ -360,11 +361,11 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||||
#else
|
#else
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
const EventBits_t uxCurrentEventBits = pxEventBits->uxEventBits;
|
const EventBits_t uxCurrentEventBits = pxEventBits->uxEventBits;
|
||||||
|
|
||||||
@@ -432,12 +433,12 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
|
|||||||
traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor );
|
traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||||
xAlreadyYielded = pdFALSE;
|
xAlreadyYielded = pdFALSE;
|
||||||
#else
|
#else
|
||||||
xAlreadyYielded = xTaskResumeAll();
|
xAlreadyYielded = xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
if( xTicksToWait != ( TickType_t ) 0 )
|
if( xTicksToWait != ( TickType_t ) 0 )
|
||||||
{
|
{
|
||||||
@@ -580,14 +581,15 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
|
|||||||
|
|
||||||
pxList = &( pxEventBits->xTasksWaitingForBits );
|
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. */
|
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
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskENTER_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
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. */
|
/* We are about to traverse a task list which is a kernel data structure.
|
||||||
vTaskTakeKernelLock();
|
* Thus we need to call vTaskTakeKernelLock() to take the kernel lock. */
|
||||||
#else
|
vTaskTakeKernelLock();
|
||||||
vTaskSuspendAll();
|
#else
|
||||||
#endif // ESP_PLATFORM
|
vTaskSuspendAll();
|
||||||
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet );
|
traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet );
|
||||||
|
|
||||||
@@ -659,13 +661,13 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
|
|||||||
* bit was set in the control word. */
|
* bit was set in the control word. */
|
||||||
pxEventBits->uxEventBits &= ~uxBitsToClear;
|
pxEventBits->uxEventBits &= ~uxBitsToClear;
|
||||||
}
|
}
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
/* Release the previously taken kernel lock, then release the event group spinlock. */
|
/* Release the previously taken kernel lock, then release the event group spinlock. */
|
||||||
vTaskReleaseKernelLock();
|
vTaskReleaseKernelLock();
|
||||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
return pxEventBits->uxEventBits;
|
return pxEventBits->uxEventBits;
|
||||||
}
|
}
|
||||||
@@ -676,16 +678,18 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
|||||||
EventGroup_t * pxEventBits = xEventGroup;
|
EventGroup_t * pxEventBits = xEventGroup;
|
||||||
const List_t * pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
|
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 )
|
while( listCURRENT_LIST_LENGTH( pxTasksWaitingForBits ) > ( UBaseType_t ) 0 )
|
||||||
{
|
{
|
||||||
/* Unblock the task, returning 0 as the event list is being deleted
|
/* 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 ) );
|
configASSERT( pxTasksWaitingForBits->xListEnd.pxNext != ( const ListItem_t * ) &( pxTasksWaitingForBits->xListEnd ) );
|
||||||
vTaskRemoveFromUnorderedEventList( pxTasksWaitingForBits->xListEnd.pxNext, eventUNBLOCKED_DUE_TO_BIT_SET );
|
vTaskRemoveFromUnorderedEventList( pxTasksWaitingForBits->xListEnd.pxNext, eventUNBLOCKED_DUE_TO_BIT_SET );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
/* Release the previously taken kernel lock. */
|
/* Release the previously taken kernel lock. */
|
||||||
vTaskReleaseKernelLock();
|
vTaskReleaseKernelLock();
|
||||||
#endif
|
#endif
|
||||||
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
|
||||||
|
|
||||||
#if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) )
|
#if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) )
|
||||||
{
|
{
|
||||||
@@ -720,6 +724,7 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -756,32 +757,32 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Default values for trace macros added by ESP-IDF and are not part of Vanilla FreeRTOS
|
* Default values for trace macros added by ESP-IDF and are not part of Vanilla FreeRTOS
|
||||||
*/
|
*/
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#ifndef traceISR_EXIT_TO_SCHEDULER
|
#ifndef traceISR_EXIT_TO_SCHEDULER
|
||||||
#define traceISR_EXIT_TO_SCHEDULER()
|
#define traceISR_EXIT_TO_SCHEDULER()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef traceISR_EXIT
|
#ifndef traceISR_EXIT
|
||||||
#define traceISR_EXIT()
|
#define traceISR_EXIT()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef traceISR_ENTER
|
#ifndef traceISR_ENTER
|
||||||
#define traceISR_ENTER(_n_)
|
#define traceISR_ENTER( _n_ )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef traceQUEUE_SEMAPHORE_RECEIVE
|
#ifndef traceQUEUE_SEMAPHORE_RECEIVE
|
||||||
#define traceQUEUE_SEMAPHORE_RECEIVE( pxQueue )
|
#define traceQUEUE_SEMAPHORE_RECEIVE( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef traceQUEUE_GIVE_FROM_ISR
|
#ifndef traceQUEUE_GIVE_FROM_ISR
|
||||||
#define traceQUEUE_GIVE_FROM_ISR( pxQueue )
|
#define traceQUEUE_GIVE_FROM_ISR( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef traceQUEUE_GIVE_FROM_ISR_FAILED
|
#ifndef traceQUEUE_GIVE_FROM_ISR_FAILED
|
||||||
#define traceQUEUE_GIVE_FROM_ISR_FAILED( pxQueue )
|
#define traceQUEUE_GIVE_FROM_ISR_FAILED( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
#ifndef configGENERATE_RUN_TIME_STATS
|
#ifndef configGENERATE_RUN_TIME_STATS
|
||||||
@@ -934,7 +935,7 @@ Default values for trace macros added by ESP-IDF and are not part of Vanilla Fre
|
|||||||
|
|
||||||
#ifndef configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
|
#ifndef configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
|
||||||
/* Defaults to 0 for backward compatibility. */
|
/* Defaults to 0 for backward compatibility. */
|
||||||
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
|
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef configSTACK_DEPTH_TYPE
|
#ifndef configSTACK_DEPTH_TYPE
|
||||||
@@ -1230,9 +1231,9 @@ typedef struct xSTATIC_TCB
|
|||||||
#endif
|
#endif
|
||||||
#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
|
#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
|
||||||
void * pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
|
void * pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
|
||||||
#if ( configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS )
|
#if ( configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS )
|
||||||
void *pvDummyLocalStorageCallBack[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
|
void * pvDummyLocalStorageCallBack[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if ( configGENERATE_RUN_TIME_STATS == 1 )
|
#if ( configGENERATE_RUN_TIME_STATS == 1 )
|
||||||
uint32_t ulDummy16;
|
uint32_t ulDummy16;
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -59,13 +59,14 @@
|
|||||||
* \ingroup FreeRTOSIntro
|
* \ingroup FreeRTOSIntro
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef INC_FREERTOS_H
|
|
||||||
#error "FreeRTOS.h must be included before list.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LIST_H
|
#ifndef LIST_H
|
||||||
#define LIST_H
|
#define LIST_H
|
||||||
|
|
||||||
|
#ifndef INC_FREERTOS_H
|
||||||
|
#error "FreeRTOS.h must be included before list.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The list structure members are modified from within interrupts, and therefore
|
* The list structure members are modified from within interrupts, and therefore
|
||||||
* by rights should be declared volatile. However, they are only modified in a
|
* by rights should be declared volatile. However, they are only modified in a
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -76,8 +77,8 @@
|
|||||||
#define uxTaskGetStackHighWaterMark2 MPU_uxTaskGetStackHighWaterMark2
|
#define uxTaskGetStackHighWaterMark2 MPU_uxTaskGetStackHighWaterMark2
|
||||||
#define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag
|
#define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag
|
||||||
#define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag
|
#define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag
|
||||||
// #define vTaskSetThreadLocalStoragePointer MPU_vTaskSetThreadLocalStoragePointer
|
/* #define vTaskSetThreadLocalStoragePointer MPU_vTaskSetThreadLocalStoragePointer */
|
||||||
// #define pvTaskGetThreadLocalStoragePointer MPU_pvTaskGetThreadLocalStoragePointer
|
/* #define pvTaskGetThreadLocalStoragePointer MPU_pvTaskGetThreadLocalStoragePointer */
|
||||||
#define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook
|
#define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook
|
||||||
#define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle
|
#define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle
|
||||||
#define uxTaskGetSystemState MPU_uxTaskGetSystemState
|
#define uxTaskGetSystemState MPU_uxTaskGetSystemState
|
||||||
@@ -95,7 +96,7 @@
|
|||||||
#define xTaskCheckForTimeOut MPU_xTaskCheckForTimeOut
|
#define xTaskCheckForTimeOut MPU_xTaskCheckForTimeOut
|
||||||
#define xTaskGetSchedulerState MPU_xTaskGetSchedulerState
|
#define xTaskGetSchedulerState MPU_xTaskGetSchedulerState
|
||||||
|
|
||||||
/* Map standard queue.h API functions to the MPU equivalents. */
|
/* Map standard queue.h API functions to the MPU equivalents. */
|
||||||
#define xQueueGenericSend MPU_xQueueGenericSend
|
#define xQueueGenericSend MPU_xQueueGenericSend
|
||||||
#define xQueueReceive MPU_xQueueReceive
|
#define xQueueReceive MPU_xQueueReceive
|
||||||
#define xQueuePeek MPU_xQueuePeek
|
#define xQueuePeek MPU_xQueuePeek
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -46,11 +47,9 @@ typedef void (* TaskFunction_t)( void * );
|
|||||||
#ifndef pdMS_TO_TICKS
|
#ifndef pdMS_TO_TICKS
|
||||||
#define pdMS_TO_TICKS( xTimeInMs ) ( ( TickType_t ) ( ( ( TickType_t ) ( xTimeInMs ) * ( TickType_t ) configTICK_RATE_HZ ) / ( TickType_t ) 1000U ) )
|
#define pdMS_TO_TICKS( xTimeInMs ) ( ( TickType_t ) ( ( ( TickType_t ) ( xTimeInMs ) * ( TickType_t ) configTICK_RATE_HZ ) / ( TickType_t ) 1000U ) )
|
||||||
#endif
|
#endif
|
||||||
#ifdef ESP_PLATFORM
|
|
||||||
#ifndef pdTICKS_TO_MS
|
#ifndef pdTICKS_TO_MS
|
||||||
#define pdTICKS_TO_MS( xTicks ) ( ( TickType_t ) ( ( uint64_t ) ( xTicks ) * 1000 / configTICK_RATE_HZ ) )
|
#define pdTICKS_TO_MS( xTicks ) ( ( TickType_t ) ( ( uint64_t ) ( xTicks ) * 1000 / configTICK_RATE_HZ ) )
|
||||||
#endif
|
#endif
|
||||||
#endif // ESP_PLATFORM
|
|
||||||
|
|
||||||
#define pdFALSE ( ( BaseType_t ) 0 )
|
#define pdFALSE ( ( BaseType_t ) 0 )
|
||||||
#define pdTRUE ( ( BaseType_t ) 1 )
|
#define pdTRUE ( ( BaseType_t ) 1 )
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -1321,6 +1322,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
|
|||||||
|
|
||||||
/** @cond !DOC_EXCLUDE_HEADER_SECTION */
|
/** @cond !DOC_EXCLUDE_HEADER_SECTION */
|
||||||
/**@{*/
|
/**@{*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @cond !DOC_EXCLUDE_HEADER_SECTION
|
* @cond !DOC_EXCLUDE_HEADER_SECTION
|
||||||
* queue. h
|
* queue. h
|
||||||
@@ -1405,6 +1407,7 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
|||||||
const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;
|
const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;
|
||||||
BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
||||||
BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
|
BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @cond !DOC_EXCLUDE_HEADER_SECTION
|
* @cond !DOC_EXCLUDE_HEADER_SECTION
|
||||||
* queue. h
|
* queue. h
|
||||||
@@ -1509,6 +1512,7 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUN
|
|||||||
UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
|
UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
/** @cond !DOC_EXCLUDE_HEADER_SECTION */
|
/** @cond !DOC_EXCLUDE_HEADER_SECTION */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The functions defined above are for passing data to and from tasks. The
|
* The functions defined above are for passing data to and from tasks. The
|
||||||
* functions below are the equivalents for passing data to and from
|
* functions below are the equivalents for passing data to and from
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -47,6 +48,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
#define semGIVE_BLOCK_TIME ( ( TickType_t ) 0U )
|
#define semGIVE_BLOCK_TIME ( ( TickType_t ) 0U )
|
||||||
|
|
||||||
/** @cond !DOC_EXCLUDE_HEADER_SECTION */
|
/** @cond !DOC_EXCLUDE_HEADER_SECTION */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* semphr. h
|
* semphr. h
|
||||||
* @code{c}
|
* @code{c}
|
||||||
@@ -884,8 +886,8 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
* @endcode
|
* @endcode
|
||||||
* \ingroup Semaphores
|
* \ingroup Semaphores
|
||||||
*/
|
*/
|
||||||
#if( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_RECURSIVE_MUTEXES == 1 ) )
|
#if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_RECURSIVE_MUTEXES == 1 ) )
|
||||||
#define xSemaphoreCreateRecursiveMutex() xQueueCreateMutex( queueQUEUE_TYPE_RECURSIVE_MUTEX )
|
#define xSemaphoreCreateRecursiveMutex() xQueueCreateMutex( queueQUEUE_TYPE_RECURSIVE_MUTEX )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -50,50 +51,50 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if( configCHECK_FOR_STACK_OVERFLOW == 0 )
|
#if ( configCHECK_FOR_STACK_OVERFLOW == 0 )
|
||||||
|
|
||||||
/* FreeRTOSConfig.h is not set to check for stack overflows. */
|
/* FreeRTOSConfig.h is not set to check for stack overflows. */
|
||||||
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW()
|
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW()
|
||||||
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()
|
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()
|
||||||
|
|
||||||
#endif /* configCHECK_FOR_STACK_OVERFLOW == 0 */
|
#endif /* configCHECK_FOR_STACK_OVERFLOW == 0 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if( configCHECK_FOR_STACK_OVERFLOW == 1 )
|
#if ( configCHECK_FOR_STACK_OVERFLOW == 1 )
|
||||||
|
|
||||||
/* FreeRTOSConfig.h is only set to use the first method of
|
/* FreeRTOSConfig.h is only set to use the first method of
|
||||||
overflow checking. */
|
* overflow checking. */
|
||||||
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()
|
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH < 0 ) )
|
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH < 0 ) )
|
||||||
|
|
||||||
/* Only the current stack state is to be checked. */
|
/* Only the current stack state is to be checked. */
|
||||||
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
|
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
|
||||||
{ \
|
{ \
|
||||||
/* Is the currently saved stack pointer within the stack limit? */ \
|
/* Is the currently saved stack pointer within the stack limit? */ \
|
||||||
if( pxCurrentTCB[ xPortGetCoreID() ]->pxTopOfStack <= pxCurrentTCB[ xPortGetCoreID() ]->pxStack ) \
|
if( pxCurrentTCB[ xPortGetCoreID() ]->pxTopOfStack <= pxCurrentTCB[ xPortGetCoreID() ]->pxStack ) \
|
||||||
{ \
|
{ \
|
||||||
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB[ xPortGetCoreID() ], pxCurrentTCB[ xPortGetCoreID() ]->pcTaskName ); \
|
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB[ xPortGetCoreID() ], pxCurrentTCB[ xPortGetCoreID() ]->pcTaskName ); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* configCHECK_FOR_STACK_OVERFLOW > 0 */
|
#endif /* configCHECK_FOR_STACK_OVERFLOW > 0 */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH > 0 ) )
|
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH > 0 ) )
|
||||||
|
|
||||||
/* Only the current stack state is to be checked. */
|
/* Only the current stack state is to be checked. */
|
||||||
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
|
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
|
||||||
{ \
|
{ \
|
||||||
\
|
\
|
||||||
/* Is the currently saved stack pointer within the stack limit? */ \
|
/* Is the currently saved stack pointer within the stack limit? */ \
|
||||||
if( pxCurrentTCB[ xPortGetCoreID() ]->pxTopOfStack >= pxCurrentTCB[ xPortGetCoreID() ]->pxEndOfStack ) \
|
if( pxCurrentTCB[ xPortGetCoreID() ]->pxTopOfStack >= pxCurrentTCB[ xPortGetCoreID() ]->pxEndOfStack ) \
|
||||||
{ \
|
{ \
|
||||||
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB[ xPortGetCoreID() ], pxCurrentTCB[ xPortGetCoreID() ]->pcTaskName ); \
|
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB[ xPortGetCoreID() ], pxCurrentTCB[ xPortGetCoreID() ]->pcTaskName ); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */
|
#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */
|
||||||
@@ -101,20 +102,20 @@
|
|||||||
|
|
||||||
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
|
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
|
||||||
|
|
||||||
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
|
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
|
||||||
{ \
|
{ \
|
||||||
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
|
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
/* Has the extremity of the task stack ever been written over? */ \
|
/* Has the extremity of the task stack ever been written over? */ \
|
||||||
if( memcmp( ( void * ) pxCurrentTCB[ xPortGetCoreID() ]->pxStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
|
if( memcmp( ( void * ) pxCurrentTCB[ xPortGetCoreID() ]->pxStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
|
||||||
{ \
|
{ \
|
||||||
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB[ xPortGetCoreID() ], pxCurrentTCB[ xPortGetCoreID() ]->pcTaskName ); \
|
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB[ xPortGetCoreID() ], pxCurrentTCB[ xPortGetCoreID() ]->pcTaskName ); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
|
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
|
||||||
@@ -122,23 +123,23 @@
|
|||||||
|
|
||||||
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH > 0 ) )
|
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH > 0 ) )
|
||||||
|
|
||||||
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
|
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
|
||||||
{ \
|
{ \
|
||||||
int8_t *pcEndOfStack = ( int8_t * ) pxCurrentTCB[ xPortGetCoreID() ]->pxEndOfStack; \
|
int8_t * pcEndOfStack = ( int8_t * ) pxCurrentTCB[ xPortGetCoreID() ]->pxEndOfStack; \
|
||||||
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
|
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
pcEndOfStack -= sizeof( ucExpectedStackBytes ); \
|
pcEndOfStack -= sizeof( ucExpectedStackBytes ); \
|
||||||
\
|
\
|
||||||
/* Has the extremity of the task stack ever been written over? */ \
|
/* Has the extremity of the task stack ever been written over? */ \
|
||||||
if( memcmp( ( void * ) pcEndOfStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
|
if( memcmp( ( void * ) pcEndOfStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
|
||||||
{ \
|
{ \
|
||||||
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB[ xPortGetCoreID() ], pxCurrentTCB[ xPortGetCoreID() ]->pcTaskName ); \
|
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB[ xPortGetCoreID() ], pxCurrentTCB[ xPortGetCoreID() ]->pcTaskName ); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
|
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -135,9 +136,9 @@ typedef struct QueueDefinition /* The old naming convention is used to prevent b
|
|||||||
UBaseType_t uxQueueNumber;
|
UBaseType_t uxQueueNumber;
|
||||||
uint8_t ucQueueType;
|
uint8_t ucQueueType;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
portMUX_TYPE xQueueLock; /* Spinlock required for SMP critical sections */
|
portMUX_TYPE xQueueLock; /* Spinlock required for SMP critical sections */
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
} xQUEUE;
|
} xQUEUE;
|
||||||
|
|
||||||
/* The old xQUEUE name is maintained above then typedefed to the new Queue_t
|
/* The old xQUEUE name is maintained above then typedefed to the new Queue_t
|
||||||
@@ -170,10 +171,10 @@ typedef xQUEUE Queue_t;
|
|||||||
* The pcQueueName member of a structure being NULL is indicative of the
|
* The pcQueueName member of a structure being NULL is indicative of the
|
||||||
* array position being vacant. */
|
* array position being vacant. */
|
||||||
PRIVILEGED_DATA QueueRegistryItem_t xQueueRegistry[ configQUEUE_REGISTRY_SIZE ];
|
PRIVILEGED_DATA QueueRegistryItem_t xQueueRegistry[ configQUEUE_REGISTRY_SIZE ];
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
/* Spinlock required in SMP when accessing the queue registry */
|
/* Spinlock required in SMP when accessing the queue registry */
|
||||||
static portMUX_TYPE xQueueRegistryLock = portMUX_INITIALIZER_UNLOCKED;
|
static portMUX_TYPE xQueueRegistryLock = portMUX_INITIALIZER_UNLOCKED;
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
#endif /* configQUEUE_REGISTRY_SIZE */
|
#endif /* configQUEUE_REGISTRY_SIZE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -281,12 +282,12 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||||||
|
|
||||||
configASSERT( pxQueue );
|
configASSERT( pxQueue );
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
if( xNewQueue == pdTRUE )
|
if( xNewQueue == pdTRUE )
|
||||||
{
|
{
|
||||||
portMUX_INITIALIZE( &( pxQueue->xQueueLock ) );
|
portMUX_INITIALIZE( &( pxQueue->xQueueLock ) );
|
||||||
}
|
}
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
{
|
{
|
||||||
@@ -418,7 +419,7 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||||||
configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) );
|
configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) );
|
||||||
|
|
||||||
/* Check for addition overflow. */
|
/* Check for addition overflow. */
|
||||||
configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes );
|
configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes );
|
||||||
|
|
||||||
/* Allocate the queue and storage area. Justification for MISRA
|
/* Allocate the queue and storage area. Justification for MISRA
|
||||||
* deviation as follows: pvPortMalloc() always ensures returned memory
|
* deviation as follows: pvPortMalloc() always ensures returned memory
|
||||||
@@ -522,9 +523,9 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||||||
|
|
||||||
/* In case this is a recursive mutex. */
|
/* In case this is a recursive mutex. */
|
||||||
pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0;
|
pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0;
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
portMUX_INITIALIZE( &( pxNewQueue->xQueueLock ) );
|
portMUX_INITIALIZE( &( pxNewQueue->xQueueLock ) );
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
traceCREATE_MUTEX( pxNewQueue );
|
traceCREATE_MUTEX( pxNewQueue );
|
||||||
|
|
||||||
/* Start with the semaphore in the expected state. */
|
/* Start with the semaphore in the expected state. */
|
||||||
@@ -808,11 +809,11 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( configUSE_MUTEXES == 1 && configCHECK_MUTEX_GIVEN_BY_OWNER == 1)
|
#if ( configUSE_MUTEXES == 1 && configCHECK_MUTEX_GIVEN_BY_OWNER == 1 )
|
||||||
configASSERT(pxQueue->uxQueueType != queueQUEUE_IS_MUTEX
|
configASSERT( pxQueue->uxQueueType != queueQUEUE_IS_MUTEX ||
|
||||||
|| pxQueue->u.xSemaphore.xMutexHolder == NULL
|
pxQueue->u.xSemaphore.xMutexHolder == NULL ||
|
||||||
|| pxQueue->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle());
|
pxQueue->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*lint -save -e904 This function relaxes the coding standard somewhat to
|
/*lint -save -e904 This function relaxes the coding standard somewhat to
|
||||||
* allow return statements within the function itself. This is done in the
|
* allow return statements within the function itself. This is done in the
|
||||||
@@ -960,11 +961,11 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||||||
/* Interrupts and other tasks can send to and receive from the queue
|
/* Interrupts and other tasks can send to and receive from the queue
|
||||||
* now the critical section has been exited. */
|
* now the critical section has been exited. */
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
prvLockQueue( pxQueue );
|
prvLockQueue( pxQueue );
|
||||||
|
|
||||||
/* Update the timeout state to see if it has expired yet. */
|
/* Update the timeout state to see if it has expired yet. */
|
||||||
@@ -987,36 +988,35 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||||||
* task is already in the ready list before it yields - in which
|
* task is already in the ready list before it yields - in which
|
||||||
* case the yield will not cause a context switch unless there
|
* case the yield will not cause a context switch unless there
|
||||||
* is also a higher priority task in the pending ready list. */
|
* is also a higher priority task in the pending ready list. */
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
if( xTaskResumeAll() == pdFALSE )
|
if( xTaskResumeAll() == pdFALSE )
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
portYIELD_WITHIN_API();
|
portYIELD_WITHIN_API();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Try again. */
|
/* Try again. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* The timeout has expired. */
|
/* The timeout has expired. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
traceQUEUE_SEND_FAILED( pxQueue );
|
traceQUEUE_SEND_FAILED( pxQueue );
|
||||||
return errQUEUE_FULL;
|
return errQUEUE_FULL;
|
||||||
@@ -1357,6 +1357,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
|||||||
traceQUEUE_GIVE_FROM_ISR_FAILED( pxQueue );
|
traceQUEUE_GIVE_FROM_ISR_FAILED( pxQueue );
|
||||||
xReturn = errQUEUE_FULL;
|
xReturn = errQUEUE_FULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
taskEXIT_CRITICAL_ISR( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL_ISR( &( pxQueue->xQueueLock ) );
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
||||||
@@ -1456,11 +1457,11 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
|
|||||||
/* Interrupts and other tasks can send to and receive from the queue
|
/* Interrupts and other tasks can send to and receive from the queue
|
||||||
* now the critical section has been exited. */
|
* now the critical section has been exited. */
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
prvLockQueue( pxQueue );
|
prvLockQueue( pxQueue );
|
||||||
|
|
||||||
/* Update the timeout state to see if it has expired yet. */
|
/* Update the timeout state to see if it has expired yet. */
|
||||||
@@ -1473,31 +1474,32 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
|
|||||||
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );
|
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );
|
||||||
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
if( xTaskResumeAll() == pdFALSE )
|
if( xTaskResumeAll() == pdFALSE )
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
portYIELD_WITHIN_API();
|
portYIELD_WITHIN_API();
|
||||||
}
|
}
|
||||||
#ifndef ESP_PLATFORM
|
|
||||||
else
|
#ifndef ESP_PLATFORM
|
||||||
{
|
else
|
||||||
mtCOVERAGE_TEST_MARKER();
|
{
|
||||||
}
|
mtCOVERAGE_TEST_MARKER();
|
||||||
#endif // ESP_PLATFORM
|
}
|
||||||
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* The queue contains data again. Loop back to try and read the
|
/* The queue contains data again. Loop back to try and read the
|
||||||
* data. */
|
* data. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1505,11 +1507,11 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
|
|||||||
/* Timed out. If there is no data in the queue exit, otherwise loop
|
/* Timed out. If there is no data in the queue exit, otherwise loop
|
||||||
* back and attempt to read the data. */
|
* back and attempt to read the data. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
||||||
{
|
{
|
||||||
@@ -1645,11 +1647,11 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
|
|||||||
/* Interrupts and other tasks can give to and take from the semaphore
|
/* Interrupts and other tasks can give to and take from the semaphore
|
||||||
* now the critical section has been exited. */
|
* now the critical section has been exited. */
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
prvLockQueue( pxQueue );
|
prvLockQueue( pxQueue );
|
||||||
|
|
||||||
/* Update the timeout state to see if it has expired yet. */
|
/* Update the timeout state to see if it has expired yet. */
|
||||||
@@ -1682,42 +1684,43 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
|
|||||||
|
|
||||||
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
if( xTaskResumeAll() == pdFALSE )
|
if( xTaskResumeAll() == pdFALSE )
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
portYIELD_WITHIN_API();
|
portYIELD_WITHIN_API();
|
||||||
}
|
}
|
||||||
#ifndef ESP_PLATFORM
|
|
||||||
else
|
#ifndef ESP_PLATFORM
|
||||||
{
|
else
|
||||||
mtCOVERAGE_TEST_MARKER();
|
{
|
||||||
}
|
mtCOVERAGE_TEST_MARKER();
|
||||||
#endif // ESP_PLATFORM
|
}
|
||||||
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* There was no timeout and the semaphore count was not 0, so
|
/* There was no timeout and the semaphore count was not 0, so
|
||||||
* attempt to take the semaphore again. */
|
* attempt to take the semaphore again. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Timed out. */
|
/* Timed out. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
/* If the semaphore count is 0 exit now as the timeout has
|
/* If the semaphore count is 0 exit now as the timeout has
|
||||||
* expired. Otherwise return to attempt to take the semaphore that is
|
* expired. Otherwise return to attempt to take the semaphore that is
|
||||||
@@ -1860,11 +1863,11 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||||||
/* Interrupts and other tasks can send to and receive from the queue
|
/* Interrupts and other tasks can send to and receive from the queue
|
||||||
* now the critical section has been exited. */
|
* now the critical section has been exited. */
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
prvLockQueue( pxQueue );
|
prvLockQueue( pxQueue );
|
||||||
|
|
||||||
/* Update the timeout state to see if it has expired yet. */
|
/* Update the timeout state to see if it has expired yet. */
|
||||||
@@ -1877,31 +1880,32 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||||||
traceBLOCKING_ON_QUEUE_PEEK( pxQueue );
|
traceBLOCKING_ON_QUEUE_PEEK( pxQueue );
|
||||||
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
if( xTaskResumeAll() == pdFALSE )
|
if( xTaskResumeAll() == pdFALSE )
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
portYIELD_WITHIN_API();
|
portYIELD_WITHIN_API();
|
||||||
}
|
}
|
||||||
#ifndef ESP_PLATFORM
|
|
||||||
else
|
#ifndef ESP_PLATFORM
|
||||||
{
|
else
|
||||||
mtCOVERAGE_TEST_MARKER();
|
{
|
||||||
}
|
mtCOVERAGE_TEST_MARKER();
|
||||||
#endif // ESP_PLATFORM
|
}
|
||||||
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* There is data in the queue now, so don't enter the blocked
|
/* There is data in the queue now, so don't enter the blocked
|
||||||
* state, instead return to try and obtain the data. */
|
* state, instead return to try and obtain the data. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1909,11 +1913,11 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||||||
/* The timeout has expired. If there is still no data in the queue
|
/* The timeout has expired. If there is still no data in the queue
|
||||||
* exit, otherwise go back and try to read the data again. */
|
* exit, otherwise go back and try to read the data again. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
||||||
{
|
{
|
||||||
@@ -2019,6 +2023,7 @@ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue,
|
|||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );
|
traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );
|
||||||
}
|
}
|
||||||
|
|
||||||
taskEXIT_CRITICAL_ISR( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL_ISR( &( pxQueue->xQueueLock ) );
|
||||||
}
|
}
|
||||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
||||||
@@ -2456,6 +2461,7 @@ static void prvUnlockQueue( Queue_t * const pxQueue )
|
|||||||
static BaseType_t prvIsQueueEmpty( const Queue_t * pxQueue )
|
static BaseType_t prvIsQueueEmpty( const Queue_t * pxQueue )
|
||||||
{
|
{
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
|
|
||||||
taskENTER_CRITICAL( &( ( ( Queue_t * ) pxQueue )->xQueueLock ) );
|
taskENTER_CRITICAL( &( ( ( Queue_t * ) pxQueue )->xQueueLock ) );
|
||||||
{
|
{
|
||||||
if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
|
if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
|
||||||
@@ -2497,9 +2503,9 @@ static BaseType_t prvIsQueueFull( const Queue_t * pxQueue )
|
|||||||
{
|
{
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
|
|
||||||
#ifndef ESP_PLATFORM
|
#ifndef ESP_PLATFORM
|
||||||
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskENTER_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if( pxQueue->uxMessagesWaiting == pxQueue->uxLength )
|
if( pxQueue->uxMessagesWaiting == pxQueue->uxLength )
|
||||||
{
|
{
|
||||||
@@ -2510,9 +2516,9 @@ static BaseType_t prvIsQueueFull( const Queue_t * pxQueue )
|
|||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef ESP_PLATFORM
|
#ifndef ESP_PLATFORM
|
||||||
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
@@ -2833,6 +2839,7 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||||||
UBaseType_t ux;
|
UBaseType_t ux;
|
||||||
|
|
||||||
taskENTER_CRITICAL( &xQueueRegistryLock );
|
taskENTER_CRITICAL( &xQueueRegistryLock );
|
||||||
|
|
||||||
/* See if there is an empty space in the registry. A NULL name denotes
|
/* See if there is an empty space in the registry. A NULL name denotes
|
||||||
* a free slot. */
|
* a free slot. */
|
||||||
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
||||||
@@ -2851,6 +2858,7 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||||||
mtCOVERAGE_TEST_MARKER();
|
mtCOVERAGE_TEST_MARKER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
taskEXIT_CRITICAL( &xQueueRegistryLock );
|
taskEXIT_CRITICAL( &xQueueRegistryLock );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2881,6 +2889,7 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||||||
mtCOVERAGE_TEST_MARKER();
|
mtCOVERAGE_TEST_MARKER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
taskEXIT_CRITICAL( &xQueueRegistryLock );
|
taskEXIT_CRITICAL( &xQueueRegistryLock );
|
||||||
|
|
||||||
return pcReturn;
|
return pcReturn;
|
||||||
@@ -2917,8 +2926,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
|||||||
mtCOVERAGE_TEST_MARKER();
|
mtCOVERAGE_TEST_MARKER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
taskEXIT_CRITICAL( &xQueueRegistryLock );
|
|
||||||
|
|
||||||
|
taskEXIT_CRITICAL( &xQueueRegistryLock );
|
||||||
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
|
} /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
|
||||||
|
|
||||||
#endif /* configQUEUE_REGISTRY_SIZE */
|
#endif /* configQUEUE_REGISTRY_SIZE */
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -61,8 +62,8 @@
|
|||||||
/*lint -save -e9026 Function like macros allowed and needed here so they can be overridden. */
|
/*lint -save -e9026 Function like macros allowed and needed here so they can be overridden. */
|
||||||
|
|
||||||
#ifndef sbRECEIVE_COMPLETED
|
#ifndef sbRECEIVE_COMPLETED
|
||||||
#ifdef ESP_PLATFORM // IDF-3775
|
#ifdef ESP_PLATFORM /* IDF-3775 */
|
||||||
#define sbRECEIVE_COMPLETED( pxStreamBuffer ) \
|
#define sbRECEIVE_COMPLETED( pxStreamBuffer ) \
|
||||||
taskENTER_CRITICAL( &( pxStreamBuffer->xStreamBufferLock ) ); \
|
taskENTER_CRITICAL( &( pxStreamBuffer->xStreamBufferLock ) ); \
|
||||||
{ \
|
{ \
|
||||||
if( ( pxStreamBuffer )->xTaskWaitingToSend != NULL ) \
|
if( ( pxStreamBuffer )->xTaskWaitingToSend != NULL ) \
|
||||||
@@ -74,8 +75,8 @@
|
|||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
taskEXIT_CRITICAL( &( pxStreamBuffer->xStreamBufferLock ) );
|
taskEXIT_CRITICAL( &( pxStreamBuffer->xStreamBufferLock ) );
|
||||||
#else
|
#else /* ifdef ESP_PLATFORM */
|
||||||
#define sbRECEIVE_COMPLETED( pxStreamBuffer ) \
|
#define sbRECEIVE_COMPLETED( pxStreamBuffer ) \
|
||||||
vTaskSuspendAll(); \
|
vTaskSuspendAll(); \
|
||||||
{ \
|
{ \
|
||||||
if( ( pxStreamBuffer )->xTaskWaitingToSend != NULL ) \
|
if( ( pxStreamBuffer )->xTaskWaitingToSend != NULL ) \
|
||||||
@@ -87,7 +88,7 @@
|
|||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
#endif /* sbRECEIVE_COMPLETED */
|
#endif /* sbRECEIVE_COMPLETED */
|
||||||
|
|
||||||
#ifndef sbRECEIVE_COMPLETED_FROM_ISR
|
#ifndef sbRECEIVE_COMPLETED_FROM_ISR
|
||||||
@@ -115,8 +116,8 @@
|
|||||||
* or #defined the notification macro away, them provide a default implementation
|
* or #defined the notification macro away, them provide a default implementation
|
||||||
* that uses task notifications. */
|
* that uses task notifications. */
|
||||||
#ifndef sbSEND_COMPLETED
|
#ifndef sbSEND_COMPLETED
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
#define sbSEND_COMPLETED( pxStreamBuffer ) \
|
#define sbSEND_COMPLETED( pxStreamBuffer ) \
|
||||||
taskENTER_CRITICAL( &( pxStreamBuffer->xStreamBufferLock ) ); \
|
taskENTER_CRITICAL( &( pxStreamBuffer->xStreamBufferLock ) ); \
|
||||||
{ \
|
{ \
|
||||||
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL ) \
|
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL ) \
|
||||||
@@ -128,8 +129,8 @@
|
|||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
taskEXIT_CRITICAL( &( pxStreamBuffer->xStreamBufferLock ) );
|
taskEXIT_CRITICAL( &( pxStreamBuffer->xStreamBufferLock ) );
|
||||||
#else
|
#else /* ifdef ESP_PLATFORM */
|
||||||
#define sbSEND_COMPLETED( pxStreamBuffer ) \
|
#define sbSEND_COMPLETED( pxStreamBuffer ) \
|
||||||
vTaskSuspendAll(); \
|
vTaskSuspendAll(); \
|
||||||
{ \
|
{ \
|
||||||
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL ) \
|
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL ) \
|
||||||
@@ -141,7 +142,7 @@
|
|||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
#endif /* sbSEND_COMPLETED */
|
#endif /* sbSEND_COMPLETED */
|
||||||
|
|
||||||
#ifndef sbSEND_COMPLETE_FROM_ISR
|
#ifndef sbSEND_COMPLETE_FROM_ISR
|
||||||
@@ -190,7 +191,7 @@ typedef struct StreamBufferDef_t /*lint !e9058 Style convention
|
|||||||
UBaseType_t uxStreamBufferNumber; /* Used for tracing purposes. */
|
UBaseType_t uxStreamBufferNumber; /* Used for tracing purposes. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
portMUX_TYPE xStreamBufferLock; /* Spinlock required for SMP critical sections */
|
portMUX_TYPE xStreamBufferLock; /* Spinlock required for SMP critical sections */
|
||||||
} StreamBuffer_t;
|
} StreamBuffer_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeRTOS Kernel V10.4.3
|
* FreeRTOS Kernel V10.4.3
|
||||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
@@ -147,11 +148,12 @@
|
|||||||
PRIVILEGED_DATA static QueueHandle_t xTimerQueue = NULL;
|
PRIVILEGED_DATA static QueueHandle_t xTimerQueue = NULL;
|
||||||
PRIVILEGED_DATA static TaskHandle_t xTimerTaskHandle = NULL;
|
PRIVILEGED_DATA static TaskHandle_t xTimerTaskHandle = NULL;
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
|
|
||||||
/* Spinlock required in SMP when accessing the timers. For now we use a single lock
|
/* Spinlock required in SMP when accessing the timers. For now we use a single lock
|
||||||
* Todo: Each timer could possible have its own lock for increased granularity. */
|
* Todo: Each timer could possible have its own lock for increased granularity. */
|
||||||
PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
|
|
||||||
/*lint -restore */
|
/*lint -restore */
|
||||||
|
|
||||||
@@ -250,14 +252,14 @@ PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
uint32_t ulTimerTaskStackSize;
|
uint32_t ulTimerTaskStackSize;
|
||||||
|
|
||||||
vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize );
|
vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize );
|
||||||
xTimerTaskHandle = xTaskCreateStaticPinnedToCore( prvTimerTask,
|
xTimerTaskHandle = xTaskCreateStaticPinnedToCore( prvTimerTask,
|
||||||
configTIMER_SERVICE_TASK_NAME,
|
configTIMER_SERVICE_TASK_NAME,
|
||||||
ulTimerTaskStackSize,
|
ulTimerTaskStackSize,
|
||||||
NULL,
|
NULL,
|
||||||
( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT,
|
( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT,
|
||||||
pxTimerTaskStackBuffer,
|
pxTimerTaskStackBuffer,
|
||||||
pxTimerTaskTCBBuffer,
|
pxTimerTaskTCBBuffer,
|
||||||
0 );
|
0 );
|
||||||
|
|
||||||
if( xTimerTaskHandle != NULL )
|
if( xTimerTaskHandle != NULL )
|
||||||
{
|
{
|
||||||
@@ -267,11 +269,11 @@ PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
#else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
#else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||||
{
|
{
|
||||||
xReturn = xTaskCreatePinnedToCore( prvTimerTask,
|
xReturn = xTaskCreatePinnedToCore( prvTimerTask,
|
||||||
configTIMER_SERVICE_TASK_NAME,
|
configTIMER_SERVICE_TASK_NAME,
|
||||||
configTIMER_TASK_STACK_DEPTH,
|
configTIMER_TASK_STACK_DEPTH,
|
||||||
NULL,
|
NULL,
|
||||||
( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT,
|
( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT,
|
||||||
&xTimerTaskHandle, 0 );
|
&xTimerTaskHandle, 0 );
|
||||||
}
|
}
|
||||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||||
}
|
}
|
||||||
@@ -604,11 +606,11 @@ PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
TickType_t xTimeNow;
|
TickType_t xTimeNow;
|
||||||
BaseType_t xTimerListsWereSwitched;
|
BaseType_t xTimerListsWereSwitched;
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
taskENTER_CRITICAL( &xTimerLock );
|
taskENTER_CRITICAL( &xTimerLock );
|
||||||
#else
|
#else
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
/* Obtain the time now to make an assessment as to whether the timer
|
/* Obtain the time now to make an assessment as to whether the timer
|
||||||
* has expired or not. If obtaining the time causes the lists to switch
|
* has expired or not. If obtaining the time causes the lists to switch
|
||||||
@@ -622,11 +624,11 @@ PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
/* The tick count has not overflowed, has the timer expired? */
|
/* The tick count has not overflowed, has the timer expired? */
|
||||||
if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) )
|
if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) )
|
||||||
{
|
{
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
taskEXIT_CRITICAL( &xTimerLock );
|
taskEXIT_CRITICAL( &xTimerLock );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
prvProcessExpiredTimer( xNextExpireTime, xTimeNow );
|
prvProcessExpiredTimer( xNextExpireTime, xTimeNow );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -646,11 +648,11 @@ PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
|
|
||||||
vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty );
|
vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty );
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &xTimerLock );
|
taskEXIT_CRITICAL( &xTimerLock );
|
||||||
#else
|
#else
|
||||||
if( xTaskResumeAll() == pdFALSE )
|
if( xTaskResumeAll() == pdFALSE )
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
{
|
{
|
||||||
/* Yield to wait for either a command to arrive, or the
|
/* Yield to wait for either a command to arrive, or the
|
||||||
* block time to expire. If a command arrived between the
|
* block time to expire. If a command arrived between the
|
||||||
@@ -658,21 +660,22 @@ PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
* will not cause the task to block. */
|
* will not cause the task to block. */
|
||||||
portYIELD_WITHIN_API();
|
portYIELD_WITHIN_API();
|
||||||
}
|
}
|
||||||
#ifndef ESP_PLATFORM // IDF-3755
|
|
||||||
else
|
#ifndef ESP_PLATFORM /* IDF-3755 */
|
||||||
{
|
else
|
||||||
mtCOVERAGE_TEST_MARKER();
|
{
|
||||||
}
|
mtCOVERAGE_TEST_MARKER();
|
||||||
#endif // ESP_PLATFORM
|
}
|
||||||
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef ESP_PLATFORM // IDF-3755
|
#ifdef ESP_PLATFORM /* IDF-3755 */
|
||||||
taskEXIT_CRITICAL( &xTimerLock );
|
taskEXIT_CRITICAL( &xTimerLock );
|
||||||
#else
|
#else
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
#endif // ESP_PLATFORM
|
#endif // ESP_PLATFORM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1001,7 +1004,7 @@ PRIVILEGED_DATA portMUX_TYPE xTimerLock = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
{
|
{
|
||||||
/* The timer queue is allocated statically in case
|
/* The timer queue is allocated statically in case
|
||||||
* configSUPPORT_DYNAMIC_ALLOCATION is 0. */
|
* configSUPPORT_DYNAMIC_ALLOCATION is 0. */
|
||||||
PRIVILEGED_DATA static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */
|
PRIVILEGED_DATA static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */
|
||||||
PRIVILEGED_DATA static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */
|
PRIVILEGED_DATA static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */
|
||||||
|
|
||||||
xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );
|
xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );
|
||||||
|
Reference in New Issue
Block a user