Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 426: Add resume and suspend hook extensions #429

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greglink
Copy link

@greglink greglink commented Jan 9, 2025

Existing ThreadX source has a very powerful hook for thread entry and exit. This hook allows tracking of processor utilization for each task (by observing when it enters and leaves the processor), as well as any other usage deemed appropriate by the developer.

No such equivalent hook(s) exist for the suspension and resumption of threads, making it difficult to observe how long from the time a thread becomes ready until it first enters the processor, and eventually is suspended as well.

This pull request adds such hooks. At the same time, it does not follow the format and structure of the entry and exit hooks, as those were written with the expectation that developers and users would not have direct access to the source code, and as such, the hooks are less performant than they could otherwise be. This pull request therefore uses a more direct approach to allow installation of callback extensions that should have no performance impact when not enabled.

Work In Progress

This is not a mergeable commit, as it includes modifications to things that should not be committed upstream. Importantly, it shows two possible approaches to installing/including the hooks. Furthermore, I have not yet benchmarked any performance impact of a system with the hooks enabled vs a system without the hooks.

PR checklist

  • Updated function header with a short description and version number
  • Added test case for bug fix or new feature
  • Validated on real hardware

@greglink greglink force-pushed the greglink/issue_426_suspend_resume_extensions branch from 80dab41 to 73756fd Compare January 9, 2025 20:15
This is not a mergeable commit, as it includes modifications
to things that should not be committed upstream.
@greglink greglink force-pushed the greglink/issue_426_suspend_resume_extensions branch from 73756fd to a39eb82 Compare January 9, 2025 20:16
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