mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 13:44:32 +02:00
Merge branch 'bugfix/freertos_oneshot_timer_active_after_expiry' into 'master'
freertos: Fixed a bug where xTimerIsTimerActive incorrectly returns pdTRUE from callback Closes IDFGH-6353 See merge request espressif/esp-idf!19076
This commit is contained in:
@@ -856,9 +856,6 @@ PRIVILEGED_DATA portMUX_TYPE xTimerMux = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
{
|
{
|
||||||
/* The timer expired before it was added to the active
|
/* The timer expired before it was added to the active
|
||||||
* timer list. Process it now. */
|
* timer list. Process it now. */
|
||||||
pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
|
|
||||||
traceTIMER_EXPIRED( pxTimer );
|
|
||||||
|
|
||||||
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
|
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
|
||||||
{
|
{
|
||||||
xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY );
|
xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY );
|
||||||
@@ -867,8 +864,12 @@ PRIVILEGED_DATA portMUX_TYPE xTimerMux = portMUX_INITIALIZER_UNLOCKED;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mtCOVERAGE_TEST_MARKER();
|
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Call the timer callback. */
|
||||||
|
traceTIMER_EXPIRED( pxTimer );
|
||||||
|
pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user