The xTaskAbortDelayFromISR() function missing?


During an investigation of how to design a new driver a need arose for a function that would abort task delay from an ISR. Internet search has shown that the task was already implemented - see “RB: Added xTaskAbortDelayFromISR() and ulTaskNotifyValueClear() API functions” in the sourceforge freertos activity.

Is there any particular reason why this function has not been added to the standard FreeRTOS distribution? The second function ulTaskNotifyValueClear() is a part of the official FreeRTOS now. I have not tested it yet but the function code looks OK.

Best regards,

Can you post a link to where that quote came from. Maybe there is just an oversight somewhere.

Hi Richard,

I have tried to post a link in my original message but the system response was “Sorry, new users can’t put links in posts.”. I get the same message today.

If I google the term “xTaskAbortDelayFromISR” then I get just four hits. The first one is:
FreeRTOS Real Time Kernel (RTOS) Activity - SourceForge › freertos › activity
24. feb. 2020 — Richard Barry committed [r2793]. Added xTaskAbortDelayFromISR() and ulTaskNotifyValueClear() API functions.

If I click on this link and then on the topic [r2793] then I get the information about the comit and about the function xTaskAbortDelayFromISR().

Best regards,

Richard can comment more on this but probably this comment explains it: FreeRTOS-Kernel/task.h at main · FreeRTOS/FreeRTOS-Kernel · GitHub


Hi Aggarwal,

Thank you for the excellent support. I’ve looked to the planed xTaskAbortDelayFromISR() function implementation just from one perspective (not including the queue lock problematic). It is clear now. The proposed function would be OK for my application but not generally.

The FreeRTOS API documentation for xTaskAbortDelay on your web server does not contain the comment regarding the ‘FromISR’ version of this function. I have used on-line documentation only - have not checked it’s implementation in the tasks.c source file.

If you plan to update the web API documentation (Kernel > API Reference) then please add:
• description of xTaskCreateRestrictedStatic() to the category “FreeRTOS-MPU Specific”
• description of new function variant xTaskDelayUntil() - could be just added to the description of function vTaskDelayUntil() - a new preferred version of this function.

Best regards,

Thank you for your suggestions.