This chapter describes the ThreadX events.
The following is a list of ThreadX events displayed by TraceX:
| Icon | Meaning |
|---|---|
![]() |
Internal thread resume |
![]() |
Internal thread suspend |
![]() |
Interrupt Service Routine (ISR) Enter |
![]() |
Interrupt Service Routine (ISR) Exit |
![]() |
Internal time-slice |
![]() |
Running |
![]() |
Block pool allocate (tx_block_allocate) |
![]() |
Block pool create (tx_block_pool_create) |
![]() |
Block pool delete (tx_block_pool_delete) |
![]() |
Block pool information get (tx_block_pool_info_get) |
![]() |
Block pool performance information get (tx_block_pool_performance_info_get) |
![]() |
Block pool system performance information get (tx_block_pool_performance_system_info_get) |
![]() |
Block pool prioritize (tx_block_pool_prioritize) |
![]() |
Block release to pool (tx_block_release) |
![]() |
Byte pool allocate memory (tx_byte_allocate) |
![]() |
Byte pool create (tx_byte_pool_create) |
![]() |
Byte pool delete (tx_byte_pool_delete) |
![]() |
Byte pool information get (tx_byte_pool_info_get) |
![]() |
Byte pool performance information get (tx_byte_pool_performance_info_get) |
![]() |
Byte pool system performance information get (tx_byte_pool_performance_system_info_get) |
![]() |
Byte pool prioritize (tx_byte_pool_prioritize) |
![]() |
Byte memory release to pool (tx_byte_release) |
![]() |
Event flags create (tx_event_flags_create) |
![]() |
Event flags delete (tx_event_flags_delete) |
![]() |
Event flags get (tx_event_flags_get) |
![]() |
Event flags information get (tx_event_flags_info_get) |
![]() |
Event flags performance information get (tx_event_flags_performance_info_get) |
![]() |
Event flags system performance information get (tx_event_flags_performance_system_info_get) |
![]() |
Event flags set (tx_event_flags_set) |
![]() |
Event flags set notify (tx_event_flags_set_notify) |
![]() |
Interrupt enable/disable (tx_interrupt_control) |
![]() |
Mutex create (tx_mutex_create) |
![]() |
Mutex delete (tx_mutex_delete) |
![]() |
Mutex get (tx_mutex_get) |
![]() |
Mutex information get (tx_mutex_info_get) |
![]() |
Mutex performance information get (tx_mutex_performance_info_get) |
![]() |
Mutex system performance information get (tx_mutex_performance_system_info_get) |
![]() |
Mutex prioritize (tx_mutex_prioritize) |
![]() |
Mutex put (tx_mutex_put) |
![]() |
Queue create (tx_queue_create) |
![]() |
Queue delete (tx_queue_delete) |
![]() |
Queue flush (tx_queue_flush) |
![]() |
Queue front send (tx_queue_front_send) |
![]() |
Queue information get (tx_queue_info_get) |
![]() |
Queue performance information get (tx_queue_performance_info_get) |
![]() |
Queue system performance information get (tx_queue_performance_system_info_get) |
![]() |
Queue prioritize (tx_queue_prioritize) |
![]() |
Queue receive message (tx_queue_receive) |
![]() |
Queue send message (tx_queue_send) |
![]() |
Queue send notify (tx_queue_send_notify) |
![]() |
Semaphore ceiling put (tx_semaphore_ceiling_put) |
![]() |
Semaphore create (tx_semaphore_create) |
![]() |
Semaphore delete (tx_semaphore_delete) |
![]() |
Semaphore get (tx_semaphore_get) |
![]() |
Semaphore information get (tx_semaphore_info_get) |
![]() |
Semaphore performance information get (tx_semaphore_performance_info_get) |
![]() |
Semaphore system performance information get (tx_semaphore_performance_system_info_get) |
![]() |
Semaphore prioritize (tx_semaphore_prioritize) |
![]() |
Semaphore put (tx_semaphore_put) |
![]() |
Semaphore put notify (tx_semaphore_put_notify) |
![]() |
Thread create (tx_thread_create) |
![]() |
Thread delete (tx_thread_delete) |
![]() |
Thread exit/entry notify (tx_thread_entry_exit_notify) |
![]() |
Thread identify (tx_thread_identify) |
![]() |
Thread information get (tx_thread_info_get) |
![]() |
Thread performance information get (tx_thread_performance_info_get) |
![]() |
Thread performance system information get (tx_thread_performance_system_info_get) |
![]() |
Thread preemption change (tx_thread_preemption_change) |
![]() |
Thread priority change (tx_thread_priority_change) |
![]() |
Thread relinquish (tx_thread_relinquish) |
![]() |
Thread reset (tx_thread_reset) |
![]() |
Thread resume (*tx_thread_resume) |
![]() |
Thread Sleep (tx_thread_sleep)* |
![]() |
Thread stack error notify (tx_thread_stack_error_notify) |
![]() |
Thread suspend (tx_thread_suspend) |
![]() |
Thread terminate (tx_thread_terminate) |
![]() |
Thread time-slice change (tx_thread_time_slice_change) |
![]() |
Thread wait abort (tx_thread_wait_abort) |
![]() |
Time get (tx_time_get) |
![]() |
Time set (tx_time_set) |
![]() |
Timer activate (tx_timer_activate) |
![]() |
Timer change (tx_timer_change) |
![]() |
Timer create (tx_timer_create) |
![]() |
Timer deactivate (tx_timer_deactivate) |
![]() |
Timer delete (tx_timer_delete) |
![]() |
Timer information get (tx_timer_info_get) |
![]() |
Timer performance information get (tx_timer_performance_info_get) |
![]() |
Timer performance system information get (tx_timer_performance_system_info_get) |
![]() |
User-Defined Event (See Chapter 10) |
Icon 
Description
This event represents the internal processing in ThreadX that resumes a thread for execution. If the specified thread is the highest priority and preemption-threshold does not block its execution, the system will start executing this newly ready thread.
Information Fields
Info Field 2: Previous state of the thread being resumed, as follows:
| Thread state | Value |
|---|---|
| TX_READY | 0 |
| TX_COMPLETED | 1 |
| TX_TERMINATED | 2 |
| TX_SUSPENDED | 3 |
| TX_SLEEP | 4 |
| TX_QUEUE_SUSP | 5 |
| TX_SEMAPHORE_SUSP | 6 |
| TX_EVENT_FLAG | 7 |
| TX_BLOCK_MEMORY | 8 |
| TX_BYTE_MEMORY | 9 |
| TX_TCP_IP | 12 |
| TX_MUTEX_SUSP | 13 |
Icon 
Description
This event represents the internal processing in ThreadX that suspends a thread’s execution. The next highest priority thread ready for execution is placed in the fourth information field. If this value is NULL, there is no other thread ready for execution and the system is idle.
Information Fields
Info Field 2: New state of the thread being suspended, as follows:
| Thread state | Value |
|---|---|
| TX_COMPLETED | 1 |
| TX_TERMINATED | 2 |
| TX_SUSPENDED | 3 |
| TX_SLEEP | 4 |
| TX_QUEUE_SUSP | 5 |
| TX_SEMAPHORE_SUSP | 6 |
| TX_EVENT_FLAG | 7 |
| TX_BLOCK_MEMORY | 8 |
| TX_BYTE_MEMORY | 9 |
| TX_TCP_IP | 12 |
| TX_MUTEX_SUSP | 13 |
Icon 
Description
This event represents entering an Interrupt Service Routine (ISR) in the application. The interrupt service routine execution continues until the ISR exit event takes place.
Information Fields
Icon 
Description
This event represents exiting an Interrupt Service Routine (ISR) in the application.
Information Fields
Icon 
Description
This event represents the internal processing in ThreadX that performs the time-slice operation. The next thread of the same priority is placed in the first information field. If this value is the same as the current thread, no time-slice was performed.
Icon 
Description
This event represents running within a thread context or idle system. It is used to illustrate subsequent changes in context as a result of an interrupt.
Information Fields
Icon 
Description
This event represents allocating a memory block via tx_block_allocate. If successful, the address of the block allocated is returned in the second information field.
Information Fields
Icon 
Description
This event represents creating a memory block pool via tx_block_pool_create.
Information Fields
Icon 
Description
This event represents deleting a memory block pool via tx_block_pool_delete.
Information Fields
Icon 
Description
This event represents getting information about a memory block pool via tx_block_pool_info_get.
Information Fields
Icon 
Description
This event represents getting performance information about a memory block pool via tx_block_pool_performance_info_get.
Information Fields
Icon 
Description
This event represents getting performance information about all memory block pools via tx_block_pool_performance_system_info_get.
Information Fields
Icon 
Description
This event represents placing the highest priority suspended thread at the front of the block pool suspension list. If this is done prior to calling tx_block_release, the highest priority suspended thread will receive the released block.
Information Fields
Icon 
Description
This event represents releasing a previously allocated block back to the block pool.
Information Fields
Icon 
Description
This event represents allocating memory via tx_byte_allocate. If successful, the address of the memory allocated is returned in the second information field.
Information Fields
Icon 
Description
This event represents creating a byte pool via tx_byte_pool_create.
Information Fields
Icon 
Description
This event represents deleting a byte pool via tx_byte_pool_delete.
Information Fields
Icon 
Description
This event represents getting byte pool information via tx_byte_pool_info_get.
Information Fields
Icon 
Description
This event represents getting byte pool performance information via tx_byte_pool_performance_info_get.
Information Fields
Icon 
Description
This event represents getting byte pool performance system information via tx_byte_pool_performance_system_info_get.
Information Fields
Icon 
Description
This event represents prioritizing the byte pool’s suspension list via tx_byte_pool_prioritize.
Information Fields
Icon 
Description
This event represents releasing a block of memory allocated from a byte pool via tx_byte_release.
Information Fields
Icon 
Description
This event represents creating a new event flags group via tx_event_flags_create.
Information Fields
Icon 
Description
This event represents deleting an event flags group via tx_event_flags_delete.
Information Fields
Icon 
Description
This event represents retrieving event flags from an existing event flags group via tx_event_flags_get.
Information Fields
Icon 
Description
This event represents retrieving information regarding an existing event flags group via tx_event_flags_info_get.
Information Fields
Icon 
Description
This event represents retrieving performance information regarding an existing event flags group via tx_event_flags_performance_info_get.
Information Fields
Icon 
Description
This event represents retrieving performance information regarding an existing event flags group via tx_event_flags_performance_system_info_get.
Information Fields
Icon 
Description
This event represents setting (or clearing) event flags in an existing event flags group via tx_event_flags_set.
Information Fields
Icon 
Description
This event represents registering a notification callback for any event flag set operation on an existing event flags group via tx_event_flags_set_notify.
Information Fields
Icon 
Description
This event represents changing the interrupt lockout posture of the processor via tx_interrupt_control.
Information Fields
Icon 
Description
This event represents creating a mutex via tx_mutex_create.
Information Fields
Icon 
Description
This event represents deleting a mutex via tx_mutex_delete.
Information Fields
Icon 
Description
This event represents obtaining a mutex via tx_mutex_get.
Information Fields
Icon 
Description
This event represents retrieving mutex information via tx_mutex_info_get.
Information Fields
Icon 
Description
This event represents retrieving mutex performance information via tx_mutex_performance_info_get.
Information Fields
Icon 
Description
This event represents retrieving mutex system performance information via tx_mutex_performance_system_info_get.
Information Fields
Icon 
Description
This event represents prioritizing the mutex’s suspension list via tx_mutex_prioritize.
Information Fields
Icon 
Description
This event represents releasing a previously owned mutex via tx_mutex_put.
Information Fields
Icon 
Description
This event represents creating a message queue via tx_queue_create.
Information Fields
Icon 
Description
This event represents deleting a queue via tx_queue_delete.
Information Fields
Icon 
Description
This event represents flushing (clearing all queue contents) of a queue via tx_queue_flush.
Information Fields
Icon 
Description
This event represents sending a message to the front of a queue via tx_queue_front_send.
Information Fields
Icon 
Description
This event represents getting information about a queue via tx_queue_info_get.
Information Fields
Icon 
Description
This event represents getting performance information about a queue via tx_queue_performance_info_get.
Information Fields
Icon 
Description
This event represents getting system performance information about all the queues in the system.
Information Fields
Icon 
Description
This event represents prioritizing the queue’s suspension list via tx_queue_prioritize.
Information Fields
Icon 
Description
This event represents receiving a message from a queue via tx_queue_receive.
Information Fields
Icon 
Description
This event represents sending a message to a queue via tx_queue_send.
Information Fields
Icon 
Description
This event represents registering a callback via tx_queue_send_notify which is called whenever a message is sent to a queue. **Information Fields** - Info Field 1: Pointer to queue. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Semaphore Ceiling Put #### tx_semaphore_ceiling_put **Icon**  **Description** This event represents putting to a semaphore via tx_semaphore_ceiling_put. This differs from tx_semaphore_put in that the maximum value of the semaphore is examined such that the put operation is not allowed to exceed the maximum value or ceiling. **Information Fields** - Info Field 1: Pointer to semaphore. - Info Field 2: Current semaphore count. - Info Field 3: Number of threads suspended on the semaphore. - Info Field 4: Ceiling limit supplied to the call. #### Semaphore Create ##### tx_semaphore_create **Icon**  **Description** This event represents creating a semaphore via tx_semaphore_create. **Information Fields** - Info Field 1: Pointer to semaphore control block. - Info Field 2: Initial semaphore count. - Info Field 3: Stack pointer at time of call. - Info Field 4: Not used. ### Semaphore Delete #### tx_semaphore_delete **Icon**  **Description** This event represents deleting a semaphore via tx_semaphore_delete. **Information Fields** - Info Field 1: Pointer to semaphore. - nfo Field 2: Stack pointer at time of call. - Info Field 3: Not used. - Info Field 4: Not used. ### Semaphore Get #### tx_semaphore_get **Icon**  **Description** This event represents obtaining a semaphore via tx_semaphore_get. **Information Fields** - Info Field 1: Pointer to semaphore. - Info Field 2: Wait option supplied to the call. - Info Field 3: Current semaphore count. - Info Field 4: Stack pointer at time of call. ### Semaphore Information Get #### tx_semaphore_info_get **Icon**  **Description** This event represents obtaining information about a semaphore via tx_semaphore_info_get. **Information Fields** - Info Field 1: Pointer to semaphore. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Semaphore Performance Info Get #### tx_semaphore_performance_info_get **Icon**  **Description** This event represents obtaining performance information about a semaphore via tx_semaphore_performance_info_get. **Information Fields** - Info Field 1: Pointer to semaphore. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Semaphore Performance System Info #### tx_semaphore_performance_system_info_get **Icon**  **Description** This event represents obtaining performance information about all semaphores in the system via tx_semaphore_performance_system_info_get. **Information Fields** - Info Field 1: Not used. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Semaphore Prioritize #### tx_semaphore_prioritize **Icon**  **Description** This event represents prioritizing the semaphore's suspension list via tx_semaphore_prioritize. **Information Fields** - Info Field 1: Pointer to corresponding semaphore. - Info Field 2: Number of threads currently suspended on the semaphore. - Info Field 3: Stack pointer at time of call. - Info Field 4: Not used. ### Semaphore Put #### tx_semaphore_put **Icon**  **Description** This event represents releasing a semaphore instance via tx_semaphore_put. **Information Fields** - Info Field 1: Pointer to corresponding semaphore. Info Field 2: Current semaphore count. - Info Field 3: Number of threads suspended on the semaphore. - Info Field 4: Stack pointer at time of call. ### Semaphore Put Notify #### tx_semaphore_put_notify **Icon**  **Description** This event represents registering a callback via tx_semaphore_put_notify that is called whenever a semaphore instance is put. **Information Fields** - Info Field 1: Pointer to semaphore. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Thread Create #### tx_thread_create **Icon**  **Description** This event represents creating a thread via tx_thread_create. **Information Fields** - Info Field 1: Pointer to thread control block. - Info Field 2: Priority of thread. - Info Field 3: Stack pointer for thread. - nfo Field 4: Size of stack in bytes. ### Thread Delete #### tx_thread_delete **Icon**  **Description** This event represents deleting a thread via tx_thread_delete. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: Stack pointer at time of call. - Info Field 3: Not used. - Info Field 4: Not used. ### Thread Entry/Exit Notify #### tx_thread_entry_exit_notify **Icon**  **Description** This event represents registering a callback via tx_thread_entry_exit_notify that is called whenever a thread is entered or exits. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: Thread state at time of the registration. - Info Field 3: Pointer to stack at time of call. - Info Field 4: Not used. #### Thread Identify ##### tx_thread_identify **Icon**  **Description** This event represents getting the current thread pointer via tx_thread_identify. **Information Fields** - Info Field 1: Not used. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Thread Information Get #### tx_thread_info_get **Icon**  **Description** This event represents getting information about the specified thread via tx_thread_info_get. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: State of thread at time of call. - Info Field 3: Not used. - Info Field 4: Not used. #### Thread Performance Information Get ##### tx_thread_performance_info_get **Icon**  **Description** This event represents getting performance information about the specified thread via tx_thread_performance_info_get. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: State of thread at time of call. - Info Field 3: Not used. - Info Field 4: Not used. ### Thread Performance System Info Get #### tx_thread_performance_system_info_get **Icon**  **Description** This event represents getting performance information about all threads via tx_thread_performance_system_info_get. **Information Fields** - Info Field 1: Not used. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Thread Preemption Change #### tx_thread_preemption_change **Icon**  **Description** This event represents changing a thread's preemption-threshold via tx_thread_preemption_change. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: New preemption-threshold. - Info Field 3: Previous preemption-threshold. - Info Field 4: Thread's state at time of call. ### Thread Priority Change #### tx_thread_priority_change **Icon**  **Description** This event represents changing a thread's priority via tx_thread_priority_change. - Information Fields - Info Field 1: Pointer to thread. - Info Field 2: New priority. - Info Field 3: Previous priority. - Info Field 4: Thread's state at time of call. ### Thread Relinquish #### tx_thread_relinquish **Icon**  **Description** This event represents relinquishing the processor from a thread via tx_thread_relinquish. **Information Fields** - Info Field 1: Stack pointer at time of call. - Info Field 2: Pointer to the next thread to execute. - Info Field 3: Not used. - Info Field 4: Not used. ### Thread Reset #### tx_thread_reset **Icon**  **Description** This event represents resetting a completed or terminated thread via tx_thread_reset. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: Thread's state at time of call. - Info Field 3: Not used. - Info Field 4: Not used. #### Thread Resume ##### tx_thread_resume **Icon**  **Description** This event represents resuming a suspended thread via tx_thread_resume. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: Thread's state at time of call. - Info Field 3: Stack pointer at time of call. - Info Field 4: Not used. ### Thread Sleep #### tx_thread_sleep **Icon**  **Description** This event represents suspending the current thread for a specified number of timer ticks via tx_thread_sleep. **Information Fields** - Info Field 1: Number of ticks to suspend for. - Info Field 2: Thread's state at time of call. - Info Field 3: Stack pointer at time of call. - Info Field 4: Not used. ### Thread Stack Error Notify #### tx_thread_stack_error_notify_event **Icon**  **Description** This event represents registering a thread stack error notification routine via tx_thread_stack_error_notify_event. **Information Fields** - Info Field 1: Not used. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Thread Suspend #### tx_thread_suspend **Icon**  **Description** This event represents suspending a thread via tx_thread_suspend. **Information Fields** - Info Field 1: Pointer to thread to suspend. - Info Field 2: Thread's state at time of call. - Info Field 3: Stack pointer at time of call. - Info Field 4: Not used. ### Thread Terminate #### tx_thread_terminate **Icon**  **Description** This event represents terminating a thread via tx_thread_terminate. **Information Fields** - Info Field 1: Pointer to thread to terminate. - Info Field 2: Thread's state at time of call. - Info Field 3: Stack pointer at time of call. - Info Field 4: Not used. ### Thread Time-Slice Change #### tx_thread_time_slice_change **Icon**  **Description** This event represents changing a thread's time-slice via tx_thread_time_slice_change. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: New time-slice. - Info Field 3: Previous time-slice. - Info Field 4: Not used. ### Thread Wait Abort #### tx_thread_wait_abort **Icon**  **Description** This event represents aborting a thread's suspension via tx_thread_wait_abort. **Information Fields** - Info Field 1: Pointer to thread. - Info Field 2: Thread's state at time of call. - Info Field 3: Stack pointer at time of call. - Info Field 4: Not used. ### Time Get #### tx_time_get **Icon**  **Description** This event represents getting the current number of timer ticks via tx_time_get. **Information Fields** - Info Field 1: Current number of timer ticks. - Info Field 2: Stack pointer at time of call. - Info Field 3: Not used. - Info Field 4: Not used. ### Time Set #### tx_time_set **Icon**  **Description** This event represents setting the current number of timer ticks via tx_time_set. **Information Fields** - Info Field 1: New number of timer ticks. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Timer Activate #### tx_timer_activate **Icon**  **Description** This event represents activating the specified timer via tx_timer_activate. **Information Fields** - Info Field 1: Pointer to timer. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Timer Change #### tx_timer_change **Icon**  **Description** This event represents changing the specified timer via tx_timer_change. **Information Fields** - Info Field 1: Pointer to timer. - Info Field 2: Initial expiration ticks. - Info Field 3: Reschedule expiration ticks. - Info Field 4: Not used. ### Timer Create #### tx_timer_create **Icon**  **Description** This event represents creating a timer via tx_timer_create. **Information Fields** - Info Field 1: Pointer to timer control block. - Info Field 2: Initial expiration ticks. - Info Field 3: Reschedule expiration ticks. - Info Field 4: Automatic enable value—either TX_AUTO_ACTIVATE (1) or TX_NO_ACTIVATE (0). ### Timer Deactivate #### tx_timer_deactivate **Icon**  **Description** This event represents deactivating a timer via tx_timer_deactivate. **Information Fields** - Info Field 1: Pointer to timer. - Info Field 2: Stack pointer at time of call. - Info Field 3: Not used. - Info Field 4: Not used. ### Timer Delete #### tx_timer_delete **Icon**  **Description** This event represents deleting a timer via tx_timer_delete. **Information Fields** - Info Field 1: Pointer to timer. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Timer Information Get #### tx_timer_info_get **Icon**  **Description** This event represents getting timer information via tx_timer_info_get. **Information Fields** - Info Field 1: Pointer to timer. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used. ### Timer Performance Information Get #### tx_timer_performance_info_get **Icon**  **Description** This event represents getting timer performance information via tx_timer_performance_info_get. **Information Fields** - Info Field 1: Pointer to timer. - Info Field 2: Stack pointer at time of call. - Info Field 3: Not used. - Info Field 4: Not used. ### Timer System Performance Info Get #### tx_timer_performance_system_info_get **Icon**  **Description** This event represents getting all timer performance information via tx_timer_performance_system_info_get. **Information Fields** - Info Field 1: Not used. - Info Field 2: Not used. - Info Field 3: Not used. - Info Field 4: Not used.