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

add optional callback for task switching #17

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

add optional callback for task switching #17

wants to merge 1 commit into from

Conversation

menete
Copy link

@menete menete commented Jan 11, 2016

For reasons of system monitoring it is sometimes desirable to have the ability to track task switches.
This patch does add a function (rt_switch_prehook) implemented as weak reference.
As of now this is implemented with __weak keyword of armcc.
GCC (__attribute__((weak))) and IAR (#pragma weak) have similar features, but would require some compiler selective coding.
If there is some feedback on this patch I can add support for those compilers.

@ombre5733
Copy link

Such a hook would be really great. Please add it to the RTOS. Nitpicking: I would prefer if the function was called rt_preswitch_hook() because it is a hook that is executed before switching the context. What would a pre-hook be? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants