freertos: fix errors reported by PVS-Studio

Removed leftover code-paths that were never taken. Upstream freertos uses
vTaskSuspendAll() and xTaskResumeAll(), and therefor check if the task already
yielded.

In the IDF port of freertos we use critcal sections instead, so xAlreadyYielded
will never be set.

Partially addresses https://github.com/espressif/esp-idf/issues/6440
This commit is contained in:
Marius Vikhammer
2021-02-09 08:57:35 +08:00
committed by bot
parent a196d6d1ab
commit d294ac381f
2 changed files with 7 additions and 32 deletions

View File

@@ -198,7 +198,6 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t u
{
EventBits_t uxOriginalBitValue, uxReturn;
EventGroup_t *pxEventBits = xEventGroup;
BaseType_t xAlreadyYielded = pdFALSE;
BaseType_t xTimeoutOccurred = pdFALSE;
configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
@@ -257,14 +256,7 @@ BaseType_t xTimeoutOccurred = pdFALSE;
if( xTicksToWait != ( TickType_t ) 0 )
{
if( xAlreadyYielded == pdFALSE )
{
portYIELD_WITHIN_API();
}
else
{
mtCOVERAGE_TEST_MARKER();
}
portYIELD_WITHIN_API();
/* 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