mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-05-12 11:42:57 -04:00
New API xTaskPeriodicDelay (#1349)
New function to be used for periodic tasks to ensure a constant execution frequency. It is intended to supersede xTaskDelayUntil to overcome its shortcomings, that is: - avoid run away of pxPreviousWakeTime (#1339) - catch up any skipped period immediately (and update pxPreviousWakeTime accordingly), notify the caller of the number of periods skipped (by returning them) and wait until the next period (it could be less than xTimeIncrement if we are close to the next period) - notify the caller when not enough ticks have been elapsed (by returning 0) and handle the situation gracefully (by properly waiting until the next wake time) Signed-off-by: Nicola Fontana <ntd@entidi.it>
This commit is contained in:
parent
6cd736cfeb
commit
e1eb15a20d
3 changed files with 103 additions and 0 deletions
|
|
@ -1766,6 +1766,14 @@
|
|||
#define traceRETURN_vTaskDelete()
|
||||
#endif
|
||||
|
||||
#ifndef traceENTER_xTaskPeriodicDelay
|
||||
#define traceENTER_xTaskPeriodicDelay( pxPreviousWakeTime, xTimeIncrement )
|
||||
#endif
|
||||
|
||||
#ifndef traceRETURN_xTaskPeriodicDelay
|
||||
#define traceRETURN_xTaskPeriodicDelay( xIncrements )
|
||||
#endif
|
||||
|
||||
#ifndef traceENTER_xTaskDelayUntil
|
||||
#define traceENTER_xTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement )
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue