Menu

#114 vTaskGetInfo(): clear stats and add ulSwitchCounter

open
nobody
None
5
2017-02-26
2017-02-26
No

When collecting task data using vTaskGetInfo(), I always get the cumulative counters.

Here I proposed a change, in the form of quick and dirty patch:

https://sourceforge.net/p/freertos/discussion/382005/thread/cdea0f6f/?limit=25#5ca0

With that change, it is possible to clear the field ulRunTimeCounter, and start measuring from zero.

One option would be to add a parameter to vTaskGetInfo(), a boolean that indicates if the statistics must be cleared or not.

Also, I think that many users would appreciate to know how many times each task has become active, thus add a field like ulSwitchCounter.

Thanks, Hein

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.