The xTaskGenericNotifyWait action is distinct from other apis

it revokes prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ) if timeout is set to port_maxdelay, witch then add the task to suspend list rather than delay list. If we use xTaskAbortDelay to abort the task, it fails. the only way is to add a vtaskresume after calling xTaskAbortDelay.

the other apis such as vtaskdelay, xsemaphoretake, xQueueReceive do not need to resume task after calling xTaskAbortDelay in the same setting.

All the APIs do that -

I wrote the following example -

static void prvTaskHighPrioFunction( void * pvParams );
static void prvTaskLowPrioFunction( void * pvParams );

static TaskHandle_t highPrioTaskHandle = NULL;
static TaskHandle_t lowPrioTaskHandle = NULL;
/*-----------------------------------------------------------*/

int main( void )
{
    xTaskCreate( prvTaskHighPrioFunction,
                 "High",
                 configMINIMAL_STACK_SIZE,
                 NULL,
                 2,
                 &( highPrioTaskHandle ) );

    xTaskCreate( prvTaskLowPrioFunction,
                 "Low",
                 configMINIMAL_STACK_SIZE,
                 NULL,
                 2,
                 &( lowPrioTaskHandle ) );

    vTaskStartScheduler();

    /* Should not reach here. */
    for( ;; )
    {

    }

    /* Just to make the compiler happy. */
    return 0;
}
/*-----------------------------------------------------------*/

static void prvTaskHighPrioFunction( void * pvParams )
{
    uint32_t notificationValue;

    /* Silence warning about unused parameters. */
    ( void ) pvParams;

    for( ;; )
    {
        xTaskNotifyWait( ~0,
                         0,
                         &( notificationValue ),
                         portMAX_DELAY );

        fprintf( stderr, "High prio task running...\r\n" );
    }
}
/*-----------------------------------------------------------*/

static void prvTaskLowPrioFunction( void * pvParams )
{
    /* Silence warning about unused parameters. */
    ( void ) pvParams;

    for( ;; )
    {
        xTaskAbortDelay( highPrioTaskHandle );

        vTaskDelay( pdMS_TO_TICKS( 1000 ) );
    }
}
/*-----------------------------------------------------------*/

And I see the following output:

High prio task running...
High prio task running...
High prio task running...
High prio task running...
High prio task running...
High prio task running...

This means that xTaskAbortDelay works as expected. Or did I miss something?

the issue occured in a repo freertos-sim,(github.com-megakilo-FreeRTOS-Sim), which uses freertos 10.0.1 version, and disappeared when i updated kernel to lateast version 10.6.2.
thanks a lot! now i close.

Thank you for reporting back!