Skip to content

[Feature Request] Hook function after xTaskResumeAll in IDLE task  #349

Open
@foldl

Description

@foldl

Is your feature request related to a problem? Please describe.

On ARM Cortex-M SoC (not sure for other systems),
for tickless idle feature, developers can define generally one hook and three functions:

  • vApplicationIdleHook
  • PreSuppressTicksAndSleepProcessing
  • PreSleepProcessing
  • PostSleepProcessing

In PostSleepProcessing, the whole system continues its processing, and some OS APIs are quite likely to be called here. But, at this moment, OS is suspended, only a small portion of
APIs are allowed.

Describe the solution you'd like

Suggest to add a hook after xTaskResumeAll() in prvIdleTask:

( void ) xTaskResumeAll();

#if ( configUSE_IDLE_RESUMED_HOOK == 1 )
{
    extern void vApplicationIdleResumedHook( void );

    /* Call the user defined function from within the idle task.  This
    allows the application designer to add background functionality
    without the overhead of a separate task.
    */
    vApplicationIdleResumedHook();
}
#endif /* configUSE_IDLE_RESUMED_HOOK */

Describe alternatives you've considered

Use xSemaphoreGiveFromISR in PostSleepProcessing to notify a another task.
This is not convenient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions