Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants