In the scheduler, there is a call to _tx_execution_thread_enter (if TX_EXECUTION_PROFILE_ENABLE is defined). This is normally used by the execution profile kit (https://github.com/azure-rtos/threadx/tree/master/utility/execution_profile_kit), but you can call your own function there or write a new _tx_execution_thread_enter function.
How to be notified each time a thread is executed?

adita
41
Reputation points
Hi,
how can I be notified when a thread in ready state starts to be executed without modifying pre-certified code of Azure RTOS ThreadX?
I've defined TX_THREAD_STATE_CHANGE in tx_port.h but it is not enough as it doesn't exist a TX_EXECUTING state, I need something like that anyway.
Thank you.
Accepted answer