How to be notified each time a thread is executed?

adita 41 Reputation points
2022-04-06T09:03:04.113+00:00

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
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
252 questions
{count} votes

Accepted answer
  1. Scott Azure RTOS 4,046 Reputation points Microsoft Employee
    2022-04-06T15:31:44.357+00:00

    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful