question

adita-8057 avatar image
0 Votes"
adita-8057 asked adita-8057 commented

How to be notified each time a thread is executed?

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.

azure-rtos
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@adita-8057 Wanted to follow up with you to understand whether the below information helped. Please let us know if there are any other queries.
If below suggestions answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·
adita-8057 avatar image adita-8057 AshokPeddakotla-MSFT ·

@AshokPeddakotla-MSFT Yes, it helped, thank you!

0 Votes 0 ·

1 Answer

ScottAzureRTOS avatar image
1 Vote"
ScottAzureRTOS answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.