Skip to content

Commit

Permalink
Merge branch 'feature/freertos_10.4.3_sync_various_functions' into 'm…
Browse files Browse the repository at this point in the history
…aster'

FreeRTOS: (Sync v10.4.3) Update various functions (Remerge)

See merge request espressif/esp-idf!20235
  • Loading branch information
Dazza0 committed Sep 21, 2022
2 parents 819dae8 + 7e49d67 commit 9657e68
Show file tree
Hide file tree
Showing 9 changed files with 322 additions and 276 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Revision: $Rev: 3734 $
#if ( configUSE_QUEUE_SETS != 1 )
#define traceQUEUE_SEND( pxQueue ) SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition)
#else
#define traceQUEUE_SEND( pxQueue ) SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0, 0, xCopyPosition)
#define traceQUEUE_SEND( pxQueue ) SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0, 0, 0)
#endif

#endif // CONFIG_FREERTOS_SMP
Expand Down
16 changes: 2 additions & 14 deletions components/freertos/FreeRTOS-Kernel/event_groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,7 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
{
EventBits_t uxOriginalBitValue, uxReturn;
EventGroup_t * pxEventBits = xEventGroup;
#ifndef ESP_PLATFORM
BaseType_t xAlreadyYielded;
#endif // ESP_PLATFORM
BaseType_t xTimeoutOccurred = pdFALSE;

configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
Expand Down Expand Up @@ -276,15 +274,13 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
}
#ifdef ESP_PLATFORM // IDF-3755
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
xAlreadyYielded = pdFALSE;
#else
xAlreadyYielded = xTaskResumeAll();
#endif // ESP_PLATFORM

if( xTicksToWait != ( TickType_t ) 0 )
{
#ifdef ESP_PLATFORM
portYIELD_WITHIN_API();
#else
if( xAlreadyYielded == pdFALSE )
{
portYIELD_WITHIN_API();
Expand All @@ -293,7 +289,6 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
{
mtCOVERAGE_TEST_MARKER();
}
#endif // ESP_PLATFORM

/* The task blocked to wait for its required bits to be set - at this
* point either the required bits were set or the block time expired. If
Expand Down Expand Up @@ -352,11 +347,7 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
{
EventGroup_t * pxEventBits = xEventGroup;
EventBits_t uxReturn, uxControlBits = 0;
#ifdef ESP_PLATFORM
BaseType_t xWaitConditionMet;
#else
BaseType_t xWaitConditionMet, xAlreadyYielded;
#endif // ESP_PLATFORM
BaseType_t xTimeoutOccurred = pdFALSE;

/* Check the user is not attempting to wait on the bits used by the kernel
Expand Down Expand Up @@ -444,15 +435,13 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
}
#ifdef ESP_PLATFORM // IDF-3755
taskEXIT_CRITICAL( &( pxEventBits->xEventGroupLock ) );
xAlreadyYielded = pdFALSE;
#else
xAlreadyYielded = xTaskResumeAll();
#endif // ESP_PLATFORM

if( xTicksToWait != ( TickType_t ) 0 )
{
#ifdef ESP_PLATFORM
portYIELD_WITHIN_API();
#else
if( xAlreadyYielded == pdFALSE )
{
portYIELD_WITHIN_API();
Expand All @@ -461,7 +450,6 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
{
mtCOVERAGE_TEST_MARKER();
}
#endif // ESP_PLATFORM

/* The task blocked to wait for its required bits to be set - at this
* point either the required bits were set or the block time expired. If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extern "C" {
#endif

#define portBYTE_ALIGNMENT 16
#define portTICK_TYPE_IS_ATOMIC 1

/* Type definitions. */
#define portCHAR uint8_t
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ typedef uint32_t TickType_t;
#define portSTACK_GROWTH (-1)
#define portTICK_PERIOD_MS ((TickType_t) (1000 / configTICK_RATE_HZ))
#define portBYTE_ALIGNMENT 16
#define portTICK_TYPE_IS_ATOMIC 1
#define portNOP() __asm volatile (" nop ")


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ typedef uint32_t TickType_t;
#define portSTACK_GROWTH ( -1 )
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 4
#define portTICK_TYPE_IS_ATOMIC 1
#define portNOP() XT_NOP()


Expand Down

0 comments on commit 9657e68

Please sign in to comment.