Skip to content

Add uxTaskCallForEachTask, and refactor uxTaskGetSystemState to use it.#1424

Open
DRNadler wants to merge 1 commit into
FreeRTOS:mainfrom
DRNadler:main
Open

Add uxTaskCallForEachTask, and refactor uxTaskGetSystemState to use it.#1424
DRNadler wants to merge 1 commit into
FreeRTOS:mainfrom
DRNadler:main

Conversation

@DRNadler

@DRNadler DRNadler commented Jun 8, 2026

Copy link
Copy Markdown

Get task statistics for all tasks with less memory use, by doing it one task at a time.

Description

Add uxTaskCallForEachTask, which is the iteration portion of last released uxTaskGetSystemState. uxTaskCallForEachTask calls a user-provided callback once for each task with a filled-in TaskStatus_t.

Refactor uxTaskGetSystemState so that it uses uxTaskCallForEachTask to fill in the pre-allocated array of
TaskStatus_t, preserving the uxTaskGetSystemState for current users.

Test Steps

  1. Use uxTaskCallForEachTask to observe task statistics for each task in the system.
  2. Compare existing uxTaskGetSystemState output to new version.

Checklist:

  • [x ] I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

Discussed on forum but no Github Issues.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Gets task statistics for all tasks with less memory use.
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant