Skip to content

Commit

Permalink
Put declarations back at beginning of function
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftenney committed Nov 12, 2024
1 parent b6f175f commit 84d2649
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -7653,6 +7653,7 @@ TickType_t uxTaskResetEventItemValue( void )
TickType_t xTicksToWait )
{
uint32_t ulReturn;
BaseType_t xAlreadyYielded, xShouldBlock = pdFALSE;

traceENTER_ulTaskGenericNotifyTake( uxIndexToWaitOn, xClearCountOnExit, xTicksToWait );

Expand All @@ -7662,8 +7663,6 @@ TickType_t uxTaskResetEventItemValue( void )
* notification, then block the task and wait. */
if( ( pxCurrentTCB->ulNotifiedValue[ uxIndexToWaitOn ] == 0U ) && ( xTicksToWait > ( TickType_t ) 0 ) )
{
BaseType_t xAlreadyYielded, xShouldBlock = pdFALSE;

/* We suspend the scheduler here as prvAddCurrentTaskToDelayedList is a
* non-deterministic operation. */
vTaskSuspendAll();
Expand Down Expand Up @@ -7757,7 +7756,7 @@ TickType_t uxTaskResetEventItemValue( void )
uint32_t * pulNotificationValue,
TickType_t xTicksToWait )
{
BaseType_t xReturn;
BaseType_t xReturn, xAlreadyYielded, xShouldBlock = pdFALSE;

traceENTER_xTaskGenericNotifyWait( uxIndexToWaitOn, ulBitsToClearOnEntry, ulBitsToClearOnExit, pulNotificationValue, xTicksToWait );

Expand All @@ -7767,8 +7766,6 @@ TickType_t uxTaskResetEventItemValue( void )
* for it, then block the task and wait. */
if( ( pxCurrentTCB->ucNotifyState[ uxIndexToWaitOn ] != taskNOTIFICATION_RECEIVED ) && ( xTicksToWait > ( TickType_t ) 0 ) )
{
BaseType_t xAlreadyYielded, xShouldBlock = pdFALSE;

/* We suspend the scheduler here as prvAddCurrentTaskToDelayedList is a
* non-deterministic operation. */
vTaskSuspendAll();
Expand Down

0 comments on commit 84d2649

Please sign in to comment.