Select one of the symbols to view example projects that use it.
 
Outline
...
...
...
...
...
#define TX_API_H
#define TX_PARAMETER_NOT_USED
#include "tx_port.h"
#define AZURE_RTOS_THREADX
#define THREADX_MAJOR_VERSION
#define THREADX_MINOR_VERSION
#define THREADX_PATCH_VERSION
#define EL_PRODUCT_THREADX
#define TX_NO_WAIT
#define TX_WAIT_FOREVER
#define TX_AND
#define TX_AND_CLEAR
#define TX_OR
#define TX_OR_CLEAR
#define TX_1_ULONG
#define TX_2_ULONG
#define TX_4_ULONG
#define TX_8_ULONG
#define TX_16_ULONG
#define TX_NO_TIME_SLICE
#define TX_AUTO_START
#define TX_DONT_START
#define TX_AUTO_ACTIVATE
#define TX_NO_ACTIVATE
#define TX_TRUE
#define TX_FALSE
#define TX_NULL
#define TX_INHERIT
#define TX_NO_INHERIT
#define TX_THREAD_ENTRY
#define TX_THREAD_EXIT
#define TX_NO_SUSPENSIONS
#define TX_NO_MESSAGES
#define TX_EMPTY
#define TX_CLEAR_ID
#define TX_STACK_FILL
#define TX_READY
#define TX_COMPLETED
#define TX_TERMINATED
#define TX_SUSPENDED
#define TX_SLEEP
#define TX_QUEUE_SUSP
#define TX_SEMAPHORE_SUSP
#define TX_EVENT_FLAG
#define TX_BLOCK_MEMORY
#define TX_BYTE_MEMORY
#define TX_IO_DRIVER
#define TX_FILE
#define TX_TCP_IP
#define TX_MUTEX_SUSP
#define TX_PRIORITY_CHANGE
#define TX_SUCCESS
#define TX_DELETED
#define TX_POOL_ERROR
#define TX_PTR_ERROR
#define TX_WAIT_ERROR
#define TX_SIZE_ERROR
#define TX_GROUP_ERROR
#define TX_NO_EVENTS
#define TX_OPTION_ERROR
#define TX_QUEUE_ERROR
#define TX_QUEUE_EMPTY
#define TX_QUEUE_FULL
#define TX_SEMAPHORE_ERROR
#define TX_NO_INSTANCE
#define TX_THREAD_ERROR
#define TX_PRIORITY_ERROR
#define TX_NO_MEMORY
#define TX_START_ERROR
#define TX_DELETE_ERROR
#define TX_RESUME_ERROR
#define TX_CALLER_ERROR
#define TX_SUSPEND_ERROR
#define TX_TIMER_ERROR
#define TX_TICK_ERROR
#define TX_ACTIVATE_ERROR
#define TX_THRESH_ERROR
#define TX_SUSPEND_LIFTED
#define TX_WAIT_ABORTED
#define TX_WAIT_ABORT_ERROR
#define TX_MUTEX_ERROR
#define TX_NOT_AVAILABLE
#define TX_NOT_OWNED
#define TX_INHERIT_ERROR
#define TX_NOT_DONE
#define TX_CEILING_EXCEEDED
#define TX_INVALID_CEILING
#define TX_FEATURE_NOT_ENABLED
#define TX_TIMER_TICKS_PER_SECOND
#define TX_TRACE_USER_EVENT_START
#define TX_TRACE_USER_EVENT_END
#define TX_TRACE_ALL_EVENTS
#define TX_TRACE_INTERNAL_EVENTS
#define TX_TRACE_BLOCK_POOL_EVENTS
#define TX_TRACE_BYTE_POOL_EVENTS
#define TX_TRACE_EVENT_FLAGS_EVENTS
#define TX_TRACE_INTERRUPT_CONTROL_EVENT
#define TX_TRACE_MUTEX_EVENTS
#define TX_TRACE_QUEUE_EVENTS
#define TX_TRACE_SEMAPHORE_EVENTS
#define TX_TRACE_THREAD_EVENTS
#define TX_TRACE_TIME_EVENTS
#define TX_TRACE_TIMER_EVENTS
#define TX_TRACE_USER_EVENTS
#define ALIGN_TYPE
#define TX_TIMER_INTERNAL_EXTENSION
TX_TIMER_INTERNAL_STRUCT
#define TX_TIMER_EXTENSION
TX_TIMER_STRUCT
TX_THREAD_STRUCT
TX_BLOCK_POOL_STRUCT
#define TX_BYTE_ALLOCATE_EXTENSION
#define TX_BYTE_RELEASE_EXTENSION
TX_BYTE_POOL_STRUCT
TX_EVENT_FLAGS_GROUP_STRUCT
#define TX_MUTEX_PUT_EXTENSION_1
#define TX_MUTEX_PUT_EXTENSION_2
#define TX_MUTEX_PRIORITY_CHANGE_EXTENSION
TX_MUTEX_STRUCT
TX_QUEUE_STRUCT
TX_SEMAPHORE_STRUCT
#define tx_kernel_enter
#define tx_block_allocate
#define tx_block_pool_create
#define tx_block_pool_delete
#define tx_block_pool_info_get
#define tx_block_pool_performance_info_get
#define tx_block_pool_performance_system_info_get
#define tx_block_pool_prioritize
#define tx_block_release
#define tx_byte_allocate
#define tx_byte_pool_create
#define tx_byte_pool_delete
#define tx_byte_pool_info_get
#define tx_byte_pool_performance_info_get
#define tx_byte_pool_performance_system_info_get
#define tx_byte_pool_prioritize
#define tx_byte_release
#define tx_event_flags_create
#define tx_event_flags_delete
#define tx_event_flags_get
#define tx_event_flags_info_get
#define tx_event_flags_performance_info_get
#define tx_event_flags_performance_system_info_get
#define tx_event_flags_set
#define tx_event_flags_set_notify
#define tx_interrupt_control
#define tx_interrupt_control
#define tx_interrupt_control
#define tx_mutex_create
#define tx_mutex_delete
#define tx_mutex_get
#define tx_mutex_info_get
#define tx_mutex_performance_info_get
#define tx_mutex_performance_system_info_get
#define tx_mutex_prioritize
#define tx_mutex_put
#define tx_queue_create
#define tx_queue_delete
#define tx_queue_flush
#define tx_queue_info_get
#define tx_queue_performance_info_get
#define tx_queue_performance_system_info_get
#define tx_queue_receive
#define tx_queue_send
#define tx_queue_send_notify
#define tx_queue_front_send
#define tx_queue_prioritize
#define tx_semaphore_ceiling_put
#define tx_semaphore_create
#define tx_semaphore_delete
#define tx_semaphore_get
#define tx_semaphore_info_get
#define tx_semaphore_performance_info_get
#define tx_semaphore_performance_system_info_get
#define tx_semaphore_prioritize
#define tx_semaphore_put
#define tx_semaphore_put_notify
#define tx_thread_create
#define tx_thread_delete
#define tx_thread_entry_exit_notify
#define tx_thread_identify
#define tx_thread_info_get
#define tx_thread_performance_info_get
#define tx_thread_performance_system_info_get
#define tx_thread_preemption_change
#define tx_thread_priority_change
#define tx_thread_relinquish
#define tx_thread_reset
#define tx_thread_resume
#define tx_thread_sleep
#define tx_thread_stack_error_notify
#define tx_thread_suspend
#define tx_thread_terminate
#define tx_thread_time_slice_change
#define tx_thread_wait_abort
#define tx_time_get
#define tx_time_set
#define tx_timer_activate
#define tx_timer_change
#define tx_timer_create
#define tx_timer_deactivate
#define tx_timer_delete
#define tx_timer_info_get
#define tx_timer_performance_info_get
#define tx_timer_performance_system_info_get
#define tx_trace_enable
#define tx_trace_event_filter
#define tx_trace_event_unfilter
#define tx_trace_disable
#define tx_trace_isr_enter_insert
#define tx_trace_isr_exit_insert
#define tx_trace_buffer_full_notify
#define tx_trace_user_event_insert
#define tx_kernel_enter
#define tx_block_allocate
#define tx_block_pool_create
#define tx_block_pool_delete
#define tx_block_pool_info_get
#define tx_block_pool_performance_info_get
#define tx_block_pool_performance_system_info_get
#define tx_block_pool_prioritize
#define tx_block_release
#define tx_byte_allocate
#define tx_byte_pool_create
#define tx_byte_pool_delete
#define tx_byte_pool_info_get
#define tx_byte_pool_performance_info_get
#define tx_byte_pool_performance_system_info_get
#define tx_byte_pool_prioritize
#define tx_byte_release
#define tx_event_flags_create
#define tx_event_flags_delete
#define tx_event_flags_get
#define tx_event_flags_info_get
#define tx_event_flags_performance_info_get
#define tx_event_flags_performance_system_info_get
#define tx_event_flags_set
#define tx_event_flags_set_notify
#define tx_interrupt_control
#define tx_interrupt_control
#define tx_interrupt_control
#define tx_mutex_create
#define tx_mutex_delete
#define tx_mutex_get
#define tx_mutex_info_get
#define tx_mutex_performance_info_get
#define tx_mutex_performance_system_info_get
#define tx_mutex_prioritize
#define tx_mutex_put
#define tx_queue_create
#define tx_queue_delete
#define tx_queue_flush
#define tx_queue_info_get
#define tx_queue_performance_info_get
#define tx_queue_performance_system_info_get
#define tx_queue_receive
#define tx_queue_send
#define tx_queue_send_notify
#define tx_queue_front_send
#define tx_queue_prioritize
#define tx_semaphore_ceiling_put
#define tx_semaphore_create
#define tx_semaphore_delete
#define tx_semaphore_get
#define tx_semaphore_info_get
#define tx_semaphore_performance_info_get
#define tx_semaphore_performance_system_info_get
#define tx_semaphore_prioritize
#define tx_semaphore_put
#define tx_semaphore_put_notify
#define tx_thread_create
#define tx_thread_delete
#define tx_thread_entry_exit_notify
#define tx_thread_identify
#define tx_thread_info_get
#define tx_thread_performance_info_get
#define tx_thread_performance_system_info_get
#define tx_thread_preemption_change
#define tx_thread_priority_change
#define tx_thread_relinquish
#define tx_thread_reset
#define tx_thread_resume
#define tx_thread_sleep
#define tx_thread_stack_error_notify
#define tx_thread_suspend
#define tx_thread_terminate
#define tx_thread_time_slice_change
#define tx_thread_wait_abort
#define tx_time_get
#define tx_time_set
#define tx_timer_activate
#define tx_timer_change
#define tx_timer_create
#define tx_timer_deactivate
#define tx_timer_delete
#define tx_timer_info_get
#define tx_timer_performance_info_get
#define tx_timer_performance_system_info_get
#define tx_trace_enable
#define tx_trace_event_filter
#define tx_trace_event_unfilter
#define tx_trace_disable
#define tx_trace_isr_enter_insert
#define tx_trace_isr_exit_insert
#define tx_trace_buffer_full_notify
#define tx_trace_user_event_insert
#define tx_block_allocate
#define tx_block_pool_create
#define tx_block_pool_delete
#define tx_block_pool_info_get
#define tx_block_pool_performance_info_get
#define tx_block_pool_performance_system_info_get
#define tx_block_pool_prioritize
#define tx_block_release
#define tx_byte_allocate
#define tx_byte_pool_create
#define tx_byte_pool_delete
#define tx_byte_pool_info_get
#define tx_byte_pool_performance_info_get
#define tx_byte_pool_performance_system_info_get
#define tx_byte_pool_prioritize
#define tx_byte_release
#define tx_event_flags_create
#define tx_event_flags_delete
#define tx_event_flags_get
#define tx_event_flags_info_get
#define tx_event_flags_performance_info_get
#define tx_event_flags_performance_system_info_get
#define tx_event_flags_set
#define tx_event_flags_set_notify
#define tx_interrupt_control
#define tx_interrupt_control
#define tx_interrupt_control
#define tx_mutex_create
#define tx_mutex_delete
#define tx_mutex_get
#define tx_mutex_info_get
#define tx_mutex_performance_info_get
#define tx_mutex_performance_system_info_get
#define tx_mutex_prioritize
#define tx_mutex_put
#define tx_queue_create
#define tx_queue_delete
#define tx_queue_flush
#define tx_queue_info_get
#define tx_queue_performance_info_get
#define tx_queue_performance_system_info_get
#define tx_queue_receive
#define tx_queue_send
#define tx_queue_send_notify
#define tx_queue_front_send
#define tx_queue_prioritize
#define tx_semaphore_ceiling_put
#define tx_semaphore_create
#define tx_semaphore_delete
#define tx_semaphore_get
#define tx_semaphore_info_get
#define tx_semaphore_performance_info_get
#define tx_semaphore_performance_system_info_get
#define tx_semaphore_prioritize
#define tx_semaphore_put
#define tx_semaphore_put_notify
#define tx_thread_create
#define tx_thread_delete
#define tx_thread_entry_exit_notify
#define tx_thread_identify
#define tx_thread_info_get
#define tx_thread_performance_info_get
#define tx_thread_performance_system_info_get
#define tx_thread_preemption_change
#define tx_thread_priority_change
#define tx_thread_relinquish
#define tx_thread_reset
#define tx_thread_resume
#define tx_thread_sleep
#define tx_thread_stack_error_notify
#define tx_thread_suspend
#define tx_thread_terminate
#define tx_thread_time_slice_change
#define tx_thread_wait_abort
#define tx_time_get
#define tx_time_set
#define tx_timer_activate
#define tx_timer_change
#define tx_timer_create
#define tx_timer_deactivate
#define tx_timer_delete
#define tx_timer_info_get
#define tx_timer_performance_info_get
#define tx_timer_performance_system_info_get
#define tx_trace_enable
#define tx_trace_event_filter
#define tx_trace_event_unfilter
#define tx_trace_disable
#define tx_trace_isr_enter_insert
#define tx_trace_isr_exit_insert
#define tx_trace_buffer_full_notify
#define tx_trace_user_event_insert
tx_application_define(void *);
_tx_block_allocate(TX_BLOCK_POOL *, void **, ULONG);
_tx_block_pool_create(TX_BLOCK_POOL *, CHAR *, ULONG, void *, ULONG);
_tx_block_pool_delete(TX_BLOCK_POOL *);
_tx_block_pool_info_get(TX_BLOCK_POOL *, CHAR **, ULONG *, ULONG *, TX_THREAD **, ULONG *, TX_BLOCK_POOL **);
_tx_block_pool_performance_info_get(TX_BLOCK_POOL *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_block_pool_performance_system_info_get(ULONG *, ULONG *, ULONG *, ULONG *);
_tx_block_pool_prioritize(TX_BLOCK_POOL *);
_tx_block_release(void *);
_txe_block_allocate(TX_BLOCK_POOL *, void **, ULONG);
_txe_block_pool_create(TX_BLOCK_POOL *, CHAR *, ULONG, void *, ULONG, UINT);
_txe_block_pool_delete(TX_BLOCK_POOL *);
_txe_block_pool_info_get(TX_BLOCK_POOL *, CHAR **, ULONG *, ULONG *, TX_THREAD **, ULONG *, TX_BLOCK_POOL **);
_txe_block_pool_prioritize(TX_BLOCK_POOL *);
_txe_block_release(void *);
_tx_byte_allocate(TX_BYTE_POOL *, void **, ULONG, ULONG);
_tx_byte_pool_create(TX_BYTE_POOL *, CHAR *, void *, ULONG);
_tx_byte_pool_delete(TX_BYTE_POOL *);
_tx_byte_pool_info_get(TX_BYTE_POOL *, CHAR **, ULONG *, ULONG *, TX_THREAD **, ULONG *, TX_BYTE_POOL **);
_tx_byte_pool_performance_info_get(TX_BYTE_POOL *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_byte_pool_performance_system_info_get(ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_byte_pool_prioritize(TX_BYTE_POOL *);
_tx_byte_release(void *);
_txe_byte_allocate(TX_BYTE_POOL *, void **, ULONG, ULONG);
_txe_byte_pool_create(TX_BYTE_POOL *, CHAR *, void *, ULONG, UINT);
_txe_byte_pool_delete(TX_BYTE_POOL *);
_txe_byte_pool_info_get(TX_BYTE_POOL *, CHAR **, ULONG *, ULONG *, TX_THREAD **, ULONG *, TX_BYTE_POOL **);
_txe_byte_pool_prioritize(TX_BYTE_POOL *);
_txe_byte_release(void *);
_tx_event_flags_create(TX_EVENT_FLAGS_GROUP *, CHAR *);
_tx_event_flags_delete(TX_EVENT_FLAGS_GROUP *);
_tx_event_flags_get(TX_EVENT_FLAGS_GROUP *, ULONG, UINT, ULONG *, ULONG);
_tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *, CHAR **, ULONG *, TX_THREAD **, ULONG *, TX_EVENT_FLAGS_GROUP **);
_tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_event_flags_performance_system_info_get(ULONG *, ULONG *, ULONG *, ULONG *);
_tx_event_flags_set(TX_EVENT_FLAGS_GROUP *, ULONG, UINT);
_tx_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *, void (*)(TX_EVENT_FLAGS_GROUP *));
_txe_event_flags_create(TX_EVENT_FLAGS_GROUP *, CHAR *, UINT);
_txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *);
_txe_event_flags_get(TX_EVENT_FLAGS_GROUP *, ULONG, UINT, ULONG *, ULONG);
_txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *, CHAR **, ULONG *, TX_THREAD **, ULONG *, TX_EVENT_FLAGS_GROUP **);
_txe_event_flags_set(TX_EVENT_FLAGS_GROUP *, ULONG, UINT);
_txe_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *, void (*)(TX_EVENT_FLAGS_GROUP *));
_tx_initialize_kernel_enter();
_tx_mutex_create(TX_MUTEX *, CHAR *, UINT);
_tx_mutex_delete(TX_MUTEX *);
_tx_mutex_get(TX_MUTEX *, ULONG);
_tx_mutex_info_get(TX_MUTEX *, CHAR **, ULONG *, TX_THREAD **, TX_THREAD **, ULONG *, TX_MUTEX **);
_tx_mutex_performance_info_get(TX_MUTEX *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_mutex_performance_system_info_get(ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_mutex_prioritize(TX_MUTEX *);
_tx_mutex_put(TX_MUTEX *);
_txe_mutex_create(TX_MUTEX *, CHAR *, UINT, UINT);
_txe_mutex_delete(TX_MUTEX *);
_txe_mutex_get(TX_MUTEX *, ULONG);
_txe_mutex_info_get(TX_MUTEX *, CHAR **, ULONG *, TX_THREAD **, TX_THREAD **, ULONG *, TX_MUTEX **);
_txe_mutex_prioritize(TX_MUTEX *);
_txe_mutex_put(TX_MUTEX *);
_tx_queue_create(TX_QUEUE *, CHAR *, UINT, void *, ULONG);
_tx_queue_delete(TX_QUEUE *);
_tx_queue_flush(TX_QUEUE *);
_tx_queue_info_get(TX_QUEUE *, CHAR **, ULONG *, ULONG *, TX_THREAD **, ULONG *, TX_QUEUE **);
_tx_queue_performance_info_get(TX_QUEUE *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_queue_performance_system_info_get(ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_queue_prioritize(TX_QUEUE *);
_tx_queue_receive(TX_QUEUE *, void *, ULONG);
_tx_queue_send(TX_QUEUE *, void *, ULONG);
_tx_queue_send_notify(TX_QUEUE *, void (*)(TX_QUEUE *));
_tx_queue_front_send(TX_QUEUE *, void *, ULONG);
_txe_queue_create(TX_QUEUE *, CHAR *, UINT, void *, ULONG, UINT);
_txe_queue_delete(TX_QUEUE *);
_txe_queue_flush(TX_QUEUE *);
_txe_queue_info_get(TX_QUEUE *, CHAR **, ULONG *, ULONG *, TX_THREAD **, ULONG *, TX_QUEUE **);
_txe_queue_prioritize(TX_QUEUE *);
_txe_queue_receive(TX_QUEUE *, void *, ULONG);
_txe_queue_send(TX_QUEUE *, void *, ULONG);
_txe_queue_send_notify(TX_QUEUE *, void (*)(TX_QUEUE *));
_txe_queue_front_send(TX_QUEUE *, void *, ULONG);
_tx_semaphore_ceiling_put(TX_SEMAPHORE *, ULONG);
_tx_semaphore_create(TX_SEMAPHORE *, CHAR *, ULONG);
_tx_semaphore_delete(TX_SEMAPHORE *);
_tx_semaphore_get(TX_SEMAPHORE *, ULONG);
_tx_semaphore_info_get(TX_SEMAPHORE *, CHAR **, ULONG *, TX_THREAD **, ULONG *, TX_SEMAPHORE **);
_tx_semaphore_performance_info_get(TX_SEMAPHORE *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_semaphore_performance_system_info_get(ULONG *, ULONG *, ULONG *, ULONG *);
_tx_semaphore_prioritize(TX_SEMAPHORE *);
_tx_semaphore_put(TX_SEMAPHORE *);
_tx_semaphore_put_notify(TX_SEMAPHORE *, void (*)(TX_SEMAPHORE *));
_txe_semaphore_ceiling_put(TX_SEMAPHORE *, ULONG);
_txe_semaphore_create(TX_SEMAPHORE *, CHAR *, ULONG, UINT);
_txe_semaphore_delete(TX_SEMAPHORE *);
_txe_semaphore_get(TX_SEMAPHORE *, ULONG);
_txe_semaphore_info_get(TX_SEMAPHORE *, CHAR **, ULONG *, TX_THREAD **, ULONG *, TX_SEMAPHORE **);
_txe_semaphore_prioritize(TX_SEMAPHORE *);
_txe_semaphore_put(TX_SEMAPHORE *);
_txe_semaphore_put_notify(TX_SEMAPHORE *, void (*)(TX_SEMAPHORE *));
_tx_thread_context_save();
_tx_thread_context_restore();
_tx_thread_create(TX_THREAD *, CHAR *, void (*)(ULONG), ULONG, void *, ULONG, UINT, UINT, ULONG, UINT);
_tx_thread_delete(TX_THREAD *);
_tx_thread_entry_exit_notify(TX_THREAD *, void (*)(TX_THREAD *, UINT));
_tx_thread_identify();
_tx_thread_info_get(TX_THREAD *, CHAR **, UINT *, ULONG *, UINT *, UINT *, ULONG *, TX_THREAD **, TX_THREAD **);
_tx_thread_interrupt_control(UINT);
_tx_thread_performance_info_get(TX_THREAD *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, TX_THREAD **);
_tx_thread_performance_system_info_get(ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_thread_preemption_change(TX_THREAD *, UINT, UINT *);
_tx_thread_priority_change(TX_THREAD *, UINT, UINT *);
_tx_thread_relinquish();
_tx_thread_reset(TX_THREAD *);
_tx_thread_resume(TX_THREAD *);
_tx_thread_sleep(ULONG);
_tx_thread_stack_error_notify(void (*)(TX_THREAD *));
_tx_thread_suspend(TX_THREAD *);
_tx_thread_terminate(TX_THREAD *);
_tx_thread_time_slice_change(TX_THREAD *, ULONG, ULONG *);
_tx_thread_wait_abort(TX_THREAD *);
_txe_thread_create(TX_THREAD *, CHAR *, void (*)(ULONG), ULONG, void *, ULONG, UINT, UINT, ULONG, UINT, UINT);
_txe_thread_delete(TX_THREAD *);
_txe_thread_entry_exit_notify(TX_THREAD *, void (*)(TX_THREAD *, UINT));
_txe_thread_info_get(TX_THREAD *, CHAR **, UINT *, ULONG *, UINT *, UINT *, ULONG *, TX_THREAD **, TX_THREAD **);
_txe_thread_preemption_change(TX_THREAD *, UINT, UINT *);
_txe_thread_priority_change(TX_THREAD *, UINT, UINT *);
_txe_thread_relinquish();
_txe_thread_reset(TX_THREAD *);
_txe_thread_resume(TX_THREAD *);
_txe_thread_suspend(TX_THREAD *);
_txe_thread_terminate(TX_THREAD *);
_txe_thread_time_slice_change(TX_THREAD *, ULONG, ULONG *);
_txe_thread_wait_abort(TX_THREAD *);
_tx_timer_activate(TX_TIMER *);
_tx_timer_change(TX_TIMER *, ULONG, ULONG);
_tx_timer_create(TX_TIMER *, CHAR *, void (*)(ULONG), ULONG, ULONG, ULONG, UINT);
_tx_timer_deactivate(TX_TIMER *);
_tx_timer_delete(TX_TIMER *);
_tx_timer_info_get(TX_TIMER *, CHAR **, UINT *, ULONG *, ULONG *, TX_TIMER **);
_tx_timer_performance_info_get(TX_TIMER *, ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_timer_performance_system_info_get(ULONG *, ULONG *, ULONG *, ULONG *, ULONG *);
_tx_time_get();
_tx_time_set(ULONG);
_txe_timer_activate(TX_TIMER *);
_txe_timer_change(TX_TIMER *, ULONG, ULONG);
_txe_timer_create(TX_TIMER *, CHAR *, void (*)(ULONG), ULONG, ULONG, ULONG, UINT, UINT);
_txe_timer_deactivate(TX_TIMER *);
_txe_timer_delete(TX_TIMER *);
_txe_timer_info_get(TX_TIMER *, CHAR **, UINT *, ULONG *, ULONG *, TX_TIMER **);
_tx_trace_enable(void *, ULONG, ULONG);
_tx_trace_event_filter(ULONG);
_tx_trace_event_unfilter(ULONG);
_tx_trace_disable();
_tx_trace_isr_enter_insert(ULONG);
_tx_trace_isr_exit_insert(ULONG);
_tx_trace_buffer_full_notify(void (*)(void *));
_tx_trace_user_event_insert(ULONG, ULONG, ULONG, ULONG, ULONG);
_tx_trace_interrupt_control(UINT);
#define TX_THREAD_STARTED_EXTENSION
#define TX_THREAD_STACK_ANALYZE_EXTENSION
#define TX_INITIALIZE_KERNEL_ENTER_EXTENSION
#define TX_MEMSET
#define TX_UCHAR_POINTER_ADD
#define TX_UCHAR_POINTER_SUB
#define TX_UCHAR_POINTER_DIF
#define TX_ULONG_POINTER_ADD
#define TX_ULONG_POINTER_SUB
#define TX_ULONG_POINTER_DIF
#define TX_POINTER_TO_ULONG_CONVERT
#define TX_ULONG_TO_POINTER_CONVERT
#define TX_QUEUE_MESSAGE_COPY
#define TX_TIMER_POINTER_DIF
#define TX_TIMER_POINTER_ADD
#define TX_USER_TIMER_POINTER_GET
#define TX_THREAD_STACK_CHECK
#define TX_TRACE_IN_LINE_INSERT
#define TX_LOOP_FOREVER
#define TX_INDIRECT_VOID_TO_UCHAR_POINTER_CONVERT
#define TX_UCHAR_TO_INDIRECT_UCHAR_POINTER_CONVERT
#define TX_BLOCK_POOL_TO_UCHAR_POINTER_CONVERT
#define TX_VOID_TO_BLOCK_POOL_POINTER_CONVERT
#define TX_VOID_TO_UCHAR_POINTER_CONVERT
#define TX_UCHAR_TO_BLOCK_POOL_POINTER_CONVERT
#define TX_VOID_TO_INDIRECT_UCHAR_POINTER_CONVERT
#define TX_VOID_TO_BYTE_POOL_POINTER_CONVERT
#define TX_BYTE_POOL_TO_UCHAR_POINTER_CONVERT
#define TX_UCHAR_TO_ALIGN_TYPE_POINTER_CONVERT
#define TX_UCHAR_TO_INDIRECT_BYTE_POOL_POINTER
#define TX_VOID_TO_EVENT_FLAGS_POINTER_CONVERT
#define TX_VOID_TO_ULONG_POINTER_CONVERT
#define TX_VOID_TO_MUTEX_POINTER_CONVERT
#define TX_MUTEX_PRIORITIZE_MISRA_EXTENSION
#define TX_VOID_TO_QUEUE_POINTER_CONVERT
#define TX_VOID_TO_SEMAPHORE_POINTER_CONVERT
#define TX_UCHAR_TO_VOID_POINTER_CONVERT
#define TX_ULONG_TO_THREAD_POINTER_CONVERT
#define TX_TIMER_INDIRECT_TO_VOID_POINTER_CONVERT
#define TX_TIMER_INITIALIZE_EXTENSION
#define TX_CONST_CHAR_TO_CHAR_POINTER_CONVERT
#define TX_VOID_TO_THREAD_POINTER_CONVERT
#define TX_CHAR_TO_UCHAR_POINTER_CONVERT
#define TX_EVENT_FLAGS_GROUP_NOT_USED
#define TX_EVENT_FLAGS_SET_NOTIFY_NOT_USED
#define TX_QUEUE_NOT_USED
#define TX_QUEUE_SEND_NOTIFY_NOT_USED
#define TX_SEMAPHORE_NOT_USED
#define TX_SEMAPHORE_PUT_NOTIFY_NOT_USED
#define TX_THREAD_NOT_USED
#define TX_THREAD_ENTRY_EXIT_NOTIFY_NOT_USED
#define TX_MEMSET
#define TX_UCHAR_POINTER_ADD
#define TX_UCHAR_POINTER_SUB
#define TX_UCHAR_POINTER_DIF
#define TX_ULONG_POINTER_ADD
#define TX_ULONG_POINTER_SUB
#define TX_ULONG_POINTER_DIF
#define TX_POINTER_TO_ULONG_CONVERT
#define TX_ULONG_TO_POINTER_CONVERT
#define TX_POINTER_TO_ALIGN_TYPE_CONVERT
#define TX_ALIGN_TYPE_TO_POINTER_CONVERT
#define TX_TIMER_POINTER_DIF
#define TX_TIMER_POINTER_ADD
#define TX_LOOP_FOREVER
#define TX_INDIRECT_VOID_TO_UCHAR_POINTER_CONVERT
#define TX_UCHAR_TO_INDIRECT_UCHAR_POINTER_CONVERT
#define TX_BLOCK_POOL_TO_UCHAR_POINTER_CONVERT
#define TX_VOID_TO_BLOCK_POOL_POINTER_CONVERT
#define TX_VOID_TO_UCHAR_POINTER_CONVERT
#define TX_UCHAR_TO_BLOCK_POOL_POINTER_CONVERT
#define TX_VOID_TO_INDIRECT_UCHAR_POINTER_CONVERT
#define TX_VOID_TO_BYTE_POOL_POINTER_CONVERT
#define TX_BYTE_POOL_TO_UCHAR_POINTER_CONVERT
#define TX_UCHAR_TO_ALIGN_TYPE_POINTER_CONVERT
#define TX_UCHAR_TO_INDIRECT_BYTE_POOL_POINTER
#define TX_VOID_TO_EVENT_FLAGS_POINTER_CONVERT
#define TX_VOID_TO_ULONG_POINTER_CONVERT
#define TX_VOID_TO_MUTEX_POINTER_CONVERT
#define TX_VOID_TO_QUEUE_POINTER_CONVERT
#define TX_VOID_TO_SEMAPHORE_POINTER_CONVERT
#define TX_UCHAR_TO_VOID_POINTER_CONVERT
#define TX_ULONG_TO_THREAD_POINTER_CONVERT
#define TX_TIMER_INDIRECT_TO_VOID_POINTER_CONVERT
#define TX_TIMER_INITIALIZE_EXTENSION
#define TX_CONST_CHAR_TO_CHAR_POINTER_CONVERT
#define TX_VOID_TO_THREAD_POINTER_CONVERT
#define TX_CHAR_TO_UCHAR_POINTER_CONVERT
#define TX_EVENT_FLAGS_GROUP_NOT_USED
#define TX_EVENT_FLAGS_SET_NOTIFY_NOT_USED
#define TX_QUEUE_NOT_USED
#define TX_QUEUE_SEND_NOTIFY_NOT_USED
#define TX_SEMAPHORE_NOT_USED
#define TX_SEMAPHORE_PUT_NOTIFY_NOT_USED
#define TX_THREAD_NOT_USED
#define TX_THREAD_ENTRY_EXIT_NOTIFY_NOT_USED
#include "tx_api_extension.h"
#define TX_SAFETY_CRITICAL_EXCEPTION
#include "tx_el.h"
#define _tx_el_user_event_insert
#define TX_EL_INITIALIZE
#define TX_EL_THREAD_REGISTER
#define TX_EL_THREAD_UNREGISTER
#define TX_EL_THREAD_STATUS_CHANGE_INSERT
#define TX_EL_BYTE_ALLOCATE_INSERT
#define TX_EL_BYTE_POOL_CREATE_INSERT
#define TX_EL_BYTE_POOL_DELETE_INSERT
#define TX_EL_BYTE_RELEASE_INSERT
#define TX_EL_BLOCK_ALLOCATE_INSERT
#define TX_EL_BLOCK_POOL_CREATE_INSERT
#define TX_EL_BLOCK_POOL_DELETE_INSERT
#define TX_EL_BLOCK_RELEASE_INSERT
#define TX_EL_EVENT_FLAGS_CREATE_INSERT
#define TX_EL_EVENT_FLAGS_DELETE_INSERT
#define TX_EL_EVENT_FLAGS_GET_INSERT
#define TX_EL_EVENT_FLAGS_SET_INSERT
#define TX_EL_INTERRUPT_CONTROL_INSERT
#define TX_EL_QUEUE_CREATE_INSERT
#define TX_EL_QUEUE_DELETE_INSERT
#define TX_EL_QUEUE_FLUSH_INSERT
#define TX_EL_QUEUE_RECEIVE_INSERT
#define TX_EL_QUEUE_SEND_INSERT
#define TX_EL_SEMAPHORE_CREATE_INSERT
#define TX_EL_SEMAPHORE_DELETE_INSERT
#define TX_EL_SEMAPHORE_GET_INSERT
#define TX_EL_SEMAPHORE_PUT_INSERT
#define TX_EL_THREAD_CREATE_INSERT
#define TX_EL_THREAD_DELETE_INSERT
#define TX_EL_THREAD_IDENTIFY_INSERT
#define TX_EL_THREAD_PREEMPTION_CHANGE_INSERT
#define TX_EL_THREAD_PRIORITY_CHANGE_INSERT
#define TX_EL_THREAD_RELINQUISH_INSERT
#define TX_EL_THREAD_RESUME_INSERT
#define TX_EL_THREAD_SLEEP_INSERT
#define TX_EL_THREAD_SUSPEND_INSERT
#define TX_EL_THREAD_TERMINATE_INSERT
#define TX_EL_THREAD_TIME_SLICE_CHANGE_INSERT
#define TX_EL_TIME_GET_INSERT
#define TX_EL_TIME_SET_INSERT
#define TX_EL_TIMER_ACTIVATE_INSERT
#define TX_EL_TIMER_CHANGE_INSERT
#define TX_EL_TIMER_CREATE_INSERT
#define TX_EL_TIMER_DEACTIVATE_INSERT
#define TX_EL_TIMER_DELETE_INSERT
#define TX_EL_BLOCK_POOL_INFO_GET_INSERT
#define TX_EL_BLOCK_POOL_PRIORITIZE_INSERT
#define TX_EL_BYTE_POOL_INFO_GET_INSERT
#define TX_EL_BYTE_POOL_PRIORITIZE_INSERT
#define TX_EL_EVENT_FLAGS_INFO_GET_INSERT
#define TX_EL_MUTEX_CREATE_INSERT
#define TX_EL_MUTEX_DELETE_INSERT
#define TX_EL_MUTEX_GET_INSERT
#define TX_EL_MUTEX_INFO_GET_INSERT
#define TX_EL_MUTEX_PRIORITIZE_INSERT
#define TX_EL_MUTEX_PUT_INSERT
#define TX_EL_QUEUE_INFO_GET_INSERT
#define TX_EL_QUEUE_FRONT_SEND_INSERT
#define TX_EL_QUEUE_PRIORITIZE_INSERT
#define TX_EL_SEMAPHORE_INFO_GET_INSERT
#define TX_EL_SEMAPHORE_PRIORITIZE_INSERT
#define TX_EL_THREAD_INFO_GET_INSERT
#define TX_EL_THREAD_WAIT_ABORT_INSERT
#define TX_EL_TIMER_INFO_GET_INSERT
#define TX_EL_BLOCK_POOL_PERFORMANCE_INFO_GET_INSERT
#define TX_EL_BLOCK_POOL_PERFORMANCE_SYSTEM_INFO_GET_INSERT
#define TX_EL_BYTE_POOL_PERFORMANCE_INFO_GET_INSERT
#define TX_EL_BYTE_POOL_PERFORMANCE_SYSTEM_INFO_GET_INSERT
#define TX_EL_EVENT_FLAGS_PERFORMANCE_INFO_GET_INSERT
#define TX_EL_EVENT_FLAGS__PERFORMANCE_SYSTEM_INFO_GET_INSERT
#define TX_EL_EVENT_FLAGS_SET_NOTIFY_INSERT
#define TX_EL_MUTEX_PERFORMANCE_INFO_GET_INSERT
#define TX_EL_MUTEX_PERFORMANCE_SYSTEM_INFO_GET_INSERT
#define TX_EL_QUEUE_PERFORMANCE_INFO_GET_INSERT
#define TX_EL_QUEUE_PERFORMANCE_SYSTEM_INFO_GET_INSERT
#define TX_EL_QUEUE_SEND_NOTIFY_INSERT
#define TX_EL_SEMAPHORE_CEILING_PUT_INSERT
#define TX_EL_SEMAPHORE_PERFORMANCE_INFO_GET_INSERT
#define TX_EL_SEMAPHORE_PERFORMANCE_SYSTEM_INFO_GET_INSERT
#define TX_EL_SEMAPHORE_PUT_NOTIFY_INSERT
#define TX_EL_THREAD_ENTRY_EXIT_NOTIFY_INSERT
#define TX_EL_THREAD_RESET_INSERT
#define TX_EL_THREAD_PERFORMANCE_INFO_GET_INSERT
#define TX_EL_THREAD_PERFORMANCE_SYSTEM_INFO_GET_INSERT
#define TX_EL_THREAD_STACK_ERROR_NOTIFY_INSERT
#define TX_EL_TIMER_PERFORMANCE_INFO_GET_INSERT
#define TX_EL_TIMER_PERFORMANCE_SYSTEM_INFO_GET_INSERT
#define TX_THREAD_GET_SYSTEM_STATE
Files
loading...
CodeScopeSTM32 Libraries and Samplesthreadxcommon/inc/tx_api.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/**************************************************************************/ /* */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* */ /* This software is licensed under the Microsoft Software License */ /* Terms for Microsoft Azure RTOS. Full text of the license can be */ /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ /* and in the root directory of this software. */ /* */... /**************************************************************************/ ... /**************************************************************************/ /**************************************************************************/ /** */ /** ThreadX Component */ /** */ /** Application Interface (API) */ /** */... /**************************************************************************/ /**************************************************************************/ ... /**************************************************************************/ /* */ /* APPLICATION INTERFACE DEFINITION RELEASE */ /* */ /* tx_api.h PORTABLE C */ /* 6.1.10 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This file defines the basic Application Interface (API) to the */ /* high-performance ThreadX real-time kernel. All service prototypes */ /* and data structure definitions are defined in this file. */ /* Please note that basic data type definitions and other architecture-*/ /* specific information is contained in the file tx_port.h. */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), and */ /* updated product constants, */ /* added new thread execution */ /* state TX_PRIORITY_CHANGE, */ /* added macros for casting */ /* pointers to ALIGN_TYPE, */ /* resulting in version 6.1 */ /* 10-16-2020 William E. Lamie Modified comment(s), and */ /* increased patch version, */ /* resulting in version 6.1.1 */ /* 11-09-2020 Yuxin Zhou Modified comment(s), and */ /* moved TX_THREAD_GET_SYSTEM_ */ /* STATE to tx_api.h, */ /* resulting in version 6.1.2 */ /* 12-31-2020 William E. Lamie Modified comment(s), and */ /* increased patch version, */ /* resulting in version 6.1.3 */ /* 03-02-2021 Scott Larson Modified comment(s), and */ /* order defines numerically, */ /* add option to remove FileX */ /* pointer, */ /* resulting in version 6.1.5 */ /* 04-02-2021 Scott Larson Modified comment(s), and */ /* update patch number, */ /* resulting in version 6.1.6 */ /* 06-02-2021 Yuxin Zhou Modified comment(s), added */ /* Execution Profile support, */ /* resulting in version 6.1.7 */ /* 08-02-2021 Scott Larson Modified comment(s), and */ /* update patch number, */ /* resulting in version 6.1.8 */ /* 10-15-2021 Yuxin Zhou Modified comment(s), */ /* update patch number, */ /* resulting in version 6.1.9 */ /* 01-31-2022 Scott Larson Modified comment(s), */ /* add unused parameter macro, */ /* update patch number, */ /* resulting in version 6.1.10 */ /* */... /**************************************************************************/ #ifndef TX_API_H #define TX_API_H /* Determine if a C++ compiler is being used. If so, ensure that standard C is used to process the API information. *//* ... */ #ifdef __cplusplus /* Yes, C++ compiler is present. Use standard C. */ extern "C" { #endif /* Disable warning of parameter not used. */ #ifndef TX_PARAMETER_NOT_USED #define TX_PARAMETER_NOT_USED(p) ((void)(p)) #endif /* TX_PARAMETER_NOT_USED */ /* Include the port-specific data type file. */ #include "tx_port.h" /* Define basic constants for the ThreadX kernel. */ /* Define the major/minor version information that can be used by the application and the ThreadX source as well. *//* ... */ #define AZURE_RTOS_THREADX #define THREADX_MAJOR_VERSION 6 #define THREADX_MINOR_VERSION 1 #define THREADX_PATCH_VERSION 10 /* Define the following symbol for backward compatibility */ #define EL_PRODUCT_THREADX /* API input parameters and general constants. */ #define TX_NO_WAIT ((ULONG) 0) #define TX_WAIT_FOREVER ((ULONG) 0xFFFFFFFFUL) #define TX_AND ((UINT) 2) #define TX_AND_CLEAR ((UINT) 3) #define TX_OR ((UINT) 0) #define TX_OR_CLEAR ((UINT) 1) #define TX_1_ULONG ((UINT) 1) #define TX_2_ULONG ((UINT) 2) #define TX_4_ULONG ((UINT) 4) #define TX_8_ULONG ((UINT) 8) #define TX_16_ULONG ((UINT) 16) #define TX_NO_TIME_SLICE ((ULONG) 0) #define TX_AUTO_START ((UINT) 1) #define TX_DONT_START ((UINT) 0) #define TX_AUTO_ACTIVATE ((UINT) 1) #define TX_NO_ACTIVATE ((UINT) 0) #define TX_TRUE ((UINT) 1) #define TX_FALSE ((UINT) 0) #define TX_NULL ((void *) 0) #define TX_INHERIT ((UINT) 1) #define TX_NO_INHERIT ((UINT) 0) #define TX_THREAD_ENTRY ((UINT) 0) #define TX_THREAD_EXIT ((UINT) 1) #define TX_NO_SUSPENSIONS ((UINT) 0) #define TX_NO_MESSAGES ((UINT) 0) #define TX_EMPTY ((ULONG) 0) #define TX_CLEAR_ID ((ULONG) 0) #define TX_STACK_FILL ((ULONG) 0xEFEFEFEFUL) /* Thread execution state values. */ #define TX_READY ((UINT) 0) #define TX_COMPLETED ((UINT) 1) #define TX_TERMINATED ((UINT) 2) #define TX_SUSPENDED ((UINT) 3) #define TX_SLEEP ((UINT) 4) #define TX_QUEUE_SUSP ((UINT) 5) #define TX_SEMAPHORE_SUSP ((UINT) 6) #define TX_EVENT_FLAG ((UINT) 7) #define TX_BLOCK_MEMORY ((UINT) 8) #define TX_BYTE_MEMORY ((UINT) 9) #define TX_IO_DRIVER ((UINT) 10) #define TX_FILE ((UINT) 11) #define TX_TCP_IP ((UINT) 12) #define TX_MUTEX_SUSP ((UINT) 13) #define TX_PRIORITY_CHANGE ((UINT) 14) /* API return values. */ #define TX_SUCCESS ((UINT) 0x00) #define TX_DELETED ((UINT) 0x01) #define TX_POOL_ERROR ((UINT) 0x02) #define TX_PTR_ERROR ((UINT) 0x03) #define TX_WAIT_ERROR ((UINT) 0x04) #define TX_SIZE_ERROR ((UINT) 0x05) #define TX_GROUP_ERROR ((UINT) 0x06) #define TX_NO_EVENTS ((UINT) 0x07) #define TX_OPTION_ERROR ((UINT) 0x08) #define TX_QUEUE_ERROR ((UINT) 0x09) #define TX_QUEUE_EMPTY ((UINT) 0x0A) #define TX_QUEUE_FULL ((UINT) 0x0B) #define TX_SEMAPHORE_ERROR ((UINT) 0x0C) #define TX_NO_INSTANCE ((UINT) 0x0D) #define TX_THREAD_ERROR ((UINT) 0x0E) #define TX_PRIORITY_ERROR ((UINT) 0x0F) #define TX_NO_MEMORY ((UINT) 0x10) #define TX_START_ERROR ((UINT) 0x10) #define TX_DELETE_ERROR ((UINT) 0x11) #define TX_RESUME_ERROR ((UINT) 0x12) #define TX_CALLER_ERROR ((UINT) 0x13) #define TX_SUSPEND_ERROR ((UINT) 0x14) #define TX_TIMER_ERROR ((UINT) 0x15) #define TX_TICK_ERROR ((UINT) 0x16) #define TX_ACTIVATE_ERROR ((UINT) 0x17) #define TX_THRESH_ERROR ((UINT) 0x18) #define TX_SUSPEND_LIFTED ((UINT) 0x19) #define TX_WAIT_ABORTED ((UINT) 0x1A) #define TX_WAIT_ABORT_ERROR ((UINT) 0x1B) #define TX_MUTEX_ERROR ((UINT) 0x1C) #define TX_NOT_AVAILABLE ((UINT) 0x1D) #define TX_NOT_OWNED ((UINT) 0x1E) #define TX_INHERIT_ERROR ((UINT) 0x1F) #define TX_NOT_DONE ((UINT) 0x20) #define TX_CEILING_EXCEEDED ((UINT) 0x21) #define TX_INVALID_CEILING ((UINT) 0x22) #define TX_FEATURE_NOT_ENABLED ((UINT) 0xFF) 85 defines /* Define the common timer tick reference for use by other middleware components. The default value is 10ms, but may be replaced by a port specific version in tx_port.h or by the user as a compilation option. *//* ... */ #ifndef TX_TIMER_TICKS_PER_SECOND #define TX_TIMER_TICKS_PER_SECOND ((ULONG) 100) #endif /* Event numbers 0 through 4095 are reserved by Azure RTOS. Specific event assignments are: ThreadX events: 1-199 FileX events: 200-299 NetX events: 300-599 USBX events: 600-999 GUIX events: 1000-1500 User-defined event numbers start at 4096 and continue through 65535, as defined by the constants TX_TRACE_USER_EVENT_START and TX_TRACE_USER_EVENT_END, respectively. User events should be based on these constants in case the user event number assignment is changed in future releases. *//* ... */ #define TX_TRACE_USER_EVENT_START 4096 /* I1, I2, I3, I4 are user defined */ #define TX_TRACE_USER_EVENT_END 65535 /* I1, I2, I3, I4 are user defined */ /* Define event filters that can be used to selectively disable certain events or groups of events. */ #define TX_TRACE_ALL_EVENTS 0x000007FF /* All ThreadX events */ #define TX_TRACE_INTERNAL_EVENTS 0x00000001 /* ThreadX internal events */ #define TX_TRACE_BLOCK_POOL_EVENTS 0x00000002 /* ThreadX Block Pool events */ #define TX_TRACE_BYTE_POOL_EVENTS 0x00000004 /* ThreadX Byte Pool events */ #define TX_TRACE_EVENT_FLAGS_EVENTS 0x00000008 /* ThreadX Event Flags events */ #define TX_TRACE_INTERRUPT_CONTROL_EVENT 0x00000010 /* ThreadX Interrupt Control events */ #define TX_TRACE_MUTEX_EVENTS 0x00000020 /* ThreadX Mutex events */ #define TX_TRACE_QUEUE_EVENTS 0x00000040 /* ThreadX Queue events */ #define TX_TRACE_SEMAPHORE_EVENTS 0x00000080 /* ThreadX Semaphore events */ #define TX_TRACE_THREAD_EVENTS 0x00000100 /* ThreadX Thread events */ #define TX_TRACE_TIME_EVENTS 0x00000200 /* ThreadX Time events */ #define TX_TRACE_TIMER_EVENTS 0x00000400 /* ThreadX Timer events */ #define TX_TRACE_USER_EVENTS 0x80000000UL /* ThreadX User Events */ 15 defines /* Define basic alignment type used in block and byte pool operations. This data type must be at least 32-bits in size and also be large enough to hold a pointer type. *//* ... */ #ifndef ALIGN_TYPE_DEFINED #define ALIGN_TYPE ULONG #endif /* Define the control block definitions for all system objects. */ /* Define the basic timer management structures. These are the structures used to manage thread sleep, timeout, and user timer requests. *//* ... */ /* Determine if the internal timer control block has an extension defined. If not, define the extension to whitespace. *//* ... */ #ifndef TX_TIMER_INTERNAL_EXTENSION #define TX_TIMER_INTERNAL_EXTENSION #endif /* Define the common internal timer control block. */ typedef struct TX_TIMER_INTERNAL_STRUCT { /* Define the remaining ticks and re-initialization tick values. */ ULONG tx_timer_internal_remaining_ticks; ULONG tx_timer_internal_re_initialize_ticks; /* Define the timeout function and timeout function parameter. */ VOID (*tx_timer_internal_timeout_function)(ULONG id); ULONG tx_timer_internal_timeout_param; /* Define the next and previous internal link pointers for active internal timers. *//* ... */ struct TX_TIMER_INTERNAL_STRUCT *tx_timer_internal_active_next, *tx_timer_internal_active_previous; /* Keep track of the pointer to the head of this list as well. */ struct TX_TIMER_INTERNAL_STRUCT **tx_timer_internal_list_head; /* Define optional extension to internal timer control block. */ TX_TIMER_INTERNAL_EXTENSION ...} TX_TIMER_INTERNAL; /* Determine if the timer control block has an extension defined. If not, define the extension to whitespace. *//* ... */ #ifndef TX_TIMER_EXTENSION #define TX_TIMER_EXTENSION #endif /* Define the timer structure utilized by the application. */ typedef struct TX_TIMER_STRUCT { /* Define the timer ID used for error checking. */ ULONG tx_timer_id; /* Define the timer's name. */ CHAR *tx_timer_name; /* Define the actual contents of the timer. This is the block that is used in the actual timer expiration processing. *//* ... */ TX_TIMER_INTERNAL tx_timer_internal; /* Define the pointers for the created list. */ struct TX_TIMER_STRUCT *tx_timer_created_next, *tx_timer_created_previous; /* Define optional extension to timer control block. */ TX_TIMER_EXTENSION #ifdef TX_TIMER_ENABLE_PERFORMANCE_INFO /* Define the number of timer activations. */ ULONG tx_timer_performance_activate_count; /* Define the number of timer reactivations. */ ULONG tx_timer_performance_reactivate_count; /* Define the number of timer deactivations. */ ULONG tx_timer_performance_deactivate_count; /* Define the number of timer expirations. */ ULONG tx_timer_performance_expiration_count; /* Define the total number of timer expiration adjustments. */ ULONG tx_timer_performance__expiration_adjust_count;/* ... */ #endif ...} TX_TIMER; /* ThreadX thread control block structure follows. Additional fields can be added providing they are added after the information that is referenced in the port-specific assembly code. *//* ... */ typedef struct TX_THREAD_STRUCT { /* The first section of the control block contains critical information that is referenced by the port-specific assembly language code. Any changes in this section could necessitate changes in the assembly language. *//* ... */ ULONG tx_thread_id; /* Control block ID */ ULONG tx_thread_run_count; /* Thread's run counter */ VOID *tx_thread_stack_ptr; /* Thread's stack pointer */ VOID *tx_thread_stack_start; /* Stack starting address */ VOID *tx_thread_stack_end; /* Stack ending address */ ULONG tx_thread_stack_size; /* Stack size */ ULONG tx_thread_time_slice; /* Current time-slice */ ULONG tx_thread_new_time_slice; /* New time-slice */ /* Define pointers to the next and previous ready threads. */ struct TX_THREAD_STRUCT *tx_thread_ready_next, *tx_thread_ready_previous; /***************************************************************/ /* Define the first port extension in the thread control block. This is typically defined to whitespace or a pointer type in tx_port.h. *//* ... */ TX_THREAD_EXTENSION_0 CHAR *tx_thread_name; /* Pointer to thread's name */ UINT tx_thread_priority; /* Priority of thread (0-1023) */ UINT tx_thread_state; /* Thread's execution state */ UINT tx_thread_delayed_suspend; /* Delayed suspend flag */ UINT tx_thread_suspending; /* Thread suspending flag */ UINT tx_thread_preempt_threshold; /* Preemption threshold */ /* Define the thread schedule hook. The usage of this is port/application specific, but when used, the function pointer designated is called whenever the thread is scheduled and unscheduled. *//* ... */ VOID (*tx_thread_schedule_hook)(struct TX_THREAD_STRUCT *thread_ptr, ULONG id); /* Nothing after this point is referenced by the target-specific assembly language. Hence, information after this point can be added to the control block providing the complete system is recompiled. *//* ... */ /* Define the thread's entry point and input parameter. */ VOID (*tx_thread_entry)(ULONG id); ULONG tx_thread_entry_parameter; /* Define the thread's timer block. This is used for thread sleep and timeout requests. *//* ... */ TX_TIMER_INTERNAL tx_thread_timer; /* Define the thread's cleanup function and associated data. This is used to cleanup various data structures when a thread suspension is lifted or terminated either by the user or a timeout. *//* ... */ VOID (*tx_thread_suspend_cleanup)(struct TX_THREAD_STRUCT *thread_ptr, ULONG suspension_sequence); VOID *tx_thread_suspend_control_block; struct TX_THREAD_STRUCT *tx_thread_suspended_next, *tx_thread_suspended_previous; ULONG tx_thread_suspend_info; VOID *tx_thread_additional_suspend_info; UINT tx_thread_suspend_option; UINT tx_thread_suspend_status; /* Define the second port extension in the thread control block. This is typically defined to whitespace or a pointer type in tx_port.h. *//* ... */ TX_THREAD_EXTENSION_1 /* Define pointers to the next and previous threads in the created list. *//* ... */ struct TX_THREAD_STRUCT *tx_thread_created_next, *tx_thread_created_previous; /* Define the third port extension in the thread control block. This is typically defined to whitespace in tx_port.h. *//* ... */ TX_THREAD_EXTENSION_2 /* Define a pointer type for FileX extensions. */ #ifndef TX_NO_FILEX_POINTER VOID *tx_thread_filex_ptr; #endif /* Define the priority inheritance variables. These will be used to manage priority inheritance changes applied to this thread as a result of mutex get operations. *//* ... */ UINT tx_thread_user_priority; UINT tx_thread_user_preempt_threshold; UINT tx_thread_inherit_priority; /* Define the owned mutex count and list head pointer. */ UINT tx_thread_owned_mutex_count; struct TX_MUTEX_STRUCT *tx_thread_owned_mutex_list; #ifdef TX_THREAD_ENABLE_PERFORMANCE_INFO /* Define the number of times this thread is resumed. */ ULONG tx_thread_performance_resume_count; /* Define the number of times this thread suspends. */ ULONG tx_thread_performance_suspend_count; /* Define the number of times this thread is preempted by calling a ThreadX API service. *//* ... */ ULONG tx_thread_performance_solicited_preemption_count; /* Define the number of times this thread is preempted by an ISR calling a ThreadX API service. *//* ... */ ULONG tx_thread_performance_interrupt_preemption_count; /* Define the number of priority inversions for this thread. */ ULONG tx_thread_performance_priority_inversion_count; /* Define the last thread pointer to preempt this thread. */ struct TX_THREAD_STRUCT *tx_thread_performance_last_preempting_thread; /* Define the total number of times this thread was time-sliced. */ ULONG tx_thread_performance_time_slice_count; /* Define the total number of times this thread relinquishes. */ ULONG tx_thread_performance_relinquish_count; /* Define the total number of times this thread had a timeout. */ ULONG tx_thread_performance_timeout_count; /* Define the total number of times this thread had suspension lifted because of the tx_thread_wait_abort service. *//* ... */ ULONG tx_thread_performance_wait_abort_count;/* ... */ #endif /* Define the highest stack pointer variable. */ VOID *tx_thread_stack_highest_ptr; /* Stack highest usage pointer */ #ifndef TX_DISABLE_NOTIFY_CALLBACKS /* Define the application callback routine used to notify the application when the thread is entered or exits. *//* ... */ VOID (*tx_thread_entry_exit_notify)(struct TX_THREAD_STRUCT *thread_ptr, UINT type);/* ... */ #endif /* Define the fourth port extension in the thread control block. This is typically defined to whitespace in tx_port.h. *//* ... */ TX_THREAD_EXTENSION_3 /* Define variables for supporting execution profile. */ /* Note that in ThreadX 5.x, user would define TX_ENABLE_EXECUTION_CHANGE_NOTIFY and use TX_THREAD_EXTENSION_3 to define the following two variables. For Azure RTOS 6, user shall use TX_EXECUTION_PROFILE_ENABLE instead of TX_ENABLE_EXECUTION_CHANGE_NOTIFY, and SHALL NOT add variables to TX_THREAD_EXTENSION_3. *//* ... */ #if (defined(TX_EXECUTION_PROFILE_ENABLE) && !defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY)) unsigned long long tx_thread_execution_time_total; unsigned long long tx_thread_execution_time_last_start;/* ... */ #endif /* Define suspension sequence number. This is used to ensure suspension is still valid when cleanup routine executes. *//* ... */ ULONG tx_thread_suspension_sequence; /* Define the user extension field. This typically is defined to white space, but some ports of ThreadX may need to have additional fields in the thread control block. This is defined in the file tx_port.h. *//* ... */ TX_THREAD_USER_EXTENSION ...} TX_THREAD; /* Define the block memory pool structure utilized by the application. */ typedef struct TX_BLOCK_POOL_STRUCT { /* Define the block pool ID used for error checking. */ ULONG tx_block_pool_id; /* Define the block pool's name. */ CHAR *tx_block_pool_name; /* Define the number of available memory blocks in the pool. */ UINT tx_block_pool_available; /* Save the initial number of blocks. */ UINT tx_block_pool_total; /* Define the head pointer of the available block pool. */ UCHAR *tx_block_pool_available_list; /* Save the start address of the block pool's memory area. */ UCHAR *tx_block_pool_start; /* Save the block pool's size in bytes. */ ULONG tx_block_pool_size; /* Save the individual memory block size - rounded for alignment. */ UINT tx_block_pool_block_size; /* Define the block pool suspension list head along with a count of how many threads are suspended. *//* ... */ struct TX_THREAD_STRUCT *tx_block_pool_suspension_list; UINT tx_block_pool_suspended_count; /* Define the created list next and previous pointers. */ struct TX_BLOCK_POOL_STRUCT *tx_block_pool_created_next, *tx_block_pool_created_previous; #ifdef TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO /* Define the number of block allocates. */ ULONG tx_block_pool_performance_allocate_count; /* Define the number of block releases. */ ULONG tx_block_pool_performance_release_count; /* Define the number of block pool suspensions. */ ULONG tx_block_pool_performance_suspension_count; /* Define the number of block pool timeouts. */ ULONG tx_block_pool_performance_timeout_count;/* ... */ #endif /* Define the port extension in the block pool control block. This is typically defined to whitespace in tx_port.h. *//* ... */ TX_BLOCK_POOL_EXTENSION ...} TX_BLOCK_POOL; /* Determine if the byte allocate extension is defined. If not, define the extension to whitespace. *//* ... */ #ifndef TX_BYTE_ALLOCATE_EXTENSION #define TX_BYTE_ALLOCATE_EXTENSION #endif /* Determine if the byte release extension is defined. If not, define the extension to whitespace. *//* ... */ #ifndef TX_BYTE_RELEASE_EXTENSION #define TX_BYTE_RELEASE_EXTENSION #endif /* Define the byte memory pool structure utilized by the application. */ typedef struct TX_BYTE_POOL_STRUCT { /* Define the byte pool ID used for error checking. */ ULONG tx_byte_pool_id; /* Define the byte pool's name. */ CHAR *tx_byte_pool_name; /* Define the number of available bytes in the pool. */ ULONG tx_byte_pool_available; /* Define the number of fragments in the pool. */ UINT tx_byte_pool_fragments; /* Define the head pointer of byte pool. */ UCHAR *tx_byte_pool_list; /* Define the search pointer used for initial searching for memory in a byte pool. *//* ... */ UCHAR *tx_byte_pool_search; /* Save the start address of the byte pool's memory area. */ UCHAR *tx_byte_pool_start; /* Save the byte pool's size in bytes. */ ULONG tx_byte_pool_size; /* This is used to mark the owner of the byte memory pool during a search. If this value changes during the search, the local search pointer must be reset. *//* ... */ struct TX_THREAD_STRUCT *tx_byte_pool_owner; /* Define the byte pool suspension list head along with a count of how many threads are suspended. *//* ... */ struct TX_THREAD_STRUCT *tx_byte_pool_suspension_list; UINT tx_byte_pool_suspended_count; /* Define the created list next and previous pointers. */ struct TX_BYTE_POOL_STRUCT *tx_byte_pool_created_next, *tx_byte_pool_created_previous; #ifdef TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO /* Define the number of allocates. */ ULONG tx_byte_pool_performance_allocate_count; /* Define the number of releases. */ ULONG tx_byte_pool_performance_release_count; /* Define the number of adjacent memory fragment merges. */ ULONG tx_byte_pool_performance_merge_count; /* Define the number of memory fragment splits. */ ULONG tx_byte_pool_performance_split_count; /* Define the number of memory fragments searched that either were not free or could not satisfy the request. *//* ... */ ULONG tx_byte_pool_performance_search_count; /* Define the number of byte pool suspensions. */ ULONG tx_byte_pool_performance_suspension_count; /* Define the number of byte pool timeouts. */ ULONG tx_byte_pool_performance_timeout_count;/* ... */ #endif /* Define the port extension in the byte pool control block. This is typically defined to whitespace in tx_port.h. *//* ... */ TX_BYTE_POOL_EXTENSION ...} TX_BYTE_POOL; /* Define the event flags group structure utilized by the application. */ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT { /* Define the event flags group ID used for error checking. */ ULONG tx_event_flags_group_id; /* Define the event flags group's name. */ CHAR *tx_event_flags_group_name; /* Define the actual current event flags in this group. A zero in a particular bit indicates the event flag is not set. *//* ... */ ULONG tx_event_flags_group_current; /* Define the reset search flag that is set when an ISR sets flags during the search of the suspended threads list. *//* ... */ UINT tx_event_flags_group_reset_search; /* Define the event flags group suspension list head along with a count of how many threads are suspended. *//* ... */ struct TX_THREAD_STRUCT *tx_event_flags_group_suspension_list; UINT tx_event_flags_group_suspended_count; /* Define the created list next and previous pointers. */ struct TX_EVENT_FLAGS_GROUP_STRUCT *tx_event_flags_group_created_next, *tx_event_flags_group_created_previous; /* Define the delayed clearing event flags. */ ULONG tx_event_flags_group_delayed_clear; #ifdef TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO /* Define the number of event flag sets. */ ULONG tx_event_flags_group_performance_set_count; /* Define the number of event flag gets. */ ULONG tx_event_flags_group__performance_get_count; /* Define the number of event flag suspensions. */ ULONG tx_event_flags_group___performance_suspension_count; /* Define the number of event flag timeouts. */ ULONG tx_event_flags_group____performance_timeout_count;/* ... */ #endif #ifndef TX_DISABLE_NOTIFY_CALLBACKS /* Define the application callback routine used to notify the application when an event flag is set. *//* ... */ VOID (*tx_event_flags_group_set_notify)(struct TX_EVENT_FLAGS_GROUP_STRUCT *group_ptr);/* ... */ #endif /* Define the port extension in the event flags group control block. This is typically defined to whitespace in tx_port.h. *//* ... */ TX_EVENT_FLAGS_GROUP_EXTENSION ...} TX_EVENT_FLAGS_GROUP; /* Determine if the mutex put extension 1 is defined. If not, define the extension to whitespace. *//* ... */ #ifndef TX_MUTEX_PUT_EXTENSION_1 #define TX_MUTEX_PUT_EXTENSION_1 #endif /* Determine if the mutex put extension 2 is defined. If not, define the extension to whitespace. *//* ... */ #ifndef TX_MUTEX_PUT_EXTENSION_2 #define TX_MUTEX_PUT_EXTENSION_2 #endif /* Determine if the mutex priority change extension is defined. If not, define the extension to whitespace. *//* ... */ #ifndef TX_MUTEX_PRIORITY_CHANGE_EXTENSION #define TX_MUTEX_PRIORITY_CHANGE_EXTENSION #endif /* Define the mutex structure utilized by the application. */ typedef struct TX_MUTEX_STRUCT { /* Define the mutex ID used for error checking. */ ULONG tx_mutex_id; /* Define the mutex's name. */ CHAR *tx_mutex_name; /* Define the mutex ownership count. */ UINT tx_mutex_ownership_count; /* Define the mutex ownership pointer. This pointer points to the the thread that owns the mutex. *//* ... */ TX_THREAD *tx_mutex_owner; /* Define the priority inheritance flag. If this flag is set, priority inheritance will be in effect. *//* ... */ UINT tx_mutex_inherit; /* Define the save area for the owning thread's original priority. */ UINT tx_mutex_original_priority; /* Define the mutex suspension list head along with a count of how many threads are suspended. *//* ... */ struct TX_THREAD_STRUCT *tx_mutex_suspension_list; UINT tx_mutex_suspended_count; /* Define the created list next and previous pointers. */ struct TX_MUTEX_STRUCT *tx_mutex_created_next, *tx_mutex_created_previous; /* Define the priority of the highest priority thread waiting for this mutex. *//* ... */ UINT tx_mutex_highest_priority_waiting; /* Define the owned list next and previous pointers. */ struct TX_MUTEX_STRUCT *tx_mutex_owned_next, *tx_mutex_owned_previous; #ifdef TX_MUTEX_ENABLE_PERFORMANCE_INFO /* Define the number of mutex puts. */ ULONG tx_mutex_performance_put_count; /* Define the total number of mutex gets. */ ULONG tx_mutex_performance_get_count; /* Define the total number of mutex suspensions. */ ULONG tx_mutex_performance_suspension_count; /* Define the total number of mutex timeouts. */ ULONG tx_mutex_performance_timeout_count; /* Define the total number of priority inversions. */ ULONG tx_mutex_performance_priority_inversion_count; /* Define the total number of priority inheritance conditions. */ ULONG tx_mutex_performance__priority_inheritance_count;/* ... */ #endif /* Define the port extension in the mutex control block. This is typically defined to whitespace in tx_port.h. *//* ... */ TX_MUTEX_EXTENSION ...} TX_MUTEX; /* Define the queue structure utilized by the application. */ typedef struct TX_QUEUE_STRUCT { /* Define the queue ID used for error checking. */ ULONG tx_queue_id; /* Define the queue's name. */ CHAR *tx_queue_name; /* Define the message size that was specified in queue creation. */ UINT tx_queue_message_size; /* Define the total number of messages in the queue. */ UINT tx_queue_capacity; /* Define the current number of messages enqueued and the available queue storage space. *//* ... */ UINT tx_queue_enqueued; UINT tx_queue_available_storage; /* Define pointers that represent the start and end for the queue's message area. *//* ... */ ULONG *tx_queue_start; ULONG *tx_queue_end; /* Define the queue read and write pointers. Send requests use the write pointer while receive requests use the read pointer. *//* ... */ ULONG *tx_queue_read; ULONG *tx_queue_write; /* Define the queue suspension list head along with a count of how many threads are suspended. *//* ... */ struct TX_THREAD_STRUCT *tx_queue_suspension_list; UINT tx_queue_suspended_count; /* Define the created list next and previous pointers. */ struct TX_QUEUE_STRUCT *tx_queue_created_next, *tx_queue_created_previous; #ifdef TX_QUEUE_ENABLE_PERFORMANCE_INFO /* Define the number of messages sent to this queue. */ ULONG tx_queue_performance_messages_sent_count; /* Define the number of messages received from this queue. */ ULONG tx_queue_performance_messages_received_count; /* Define the number of empty suspensions on this queue. */ ULONG tx_queue_performance_empty_suspension_count; /* Define the number of full suspensions on this queue. */ ULONG tx_queue_performance_full_suspension_count; /* Define the number of full non-suspensions on this queue. These messages are rejected with an appropriate error code. *//* ... */ ULONG tx_queue_performance_full_error_count; /* Define the number of queue timeouts. */ ULONG tx_queue_performance_timeout_count;/* ... */ #endif #ifndef TX_DISABLE_NOTIFY_CALLBACKS /* Define the application callback routine used to notify the application when the a message is sent to the queue. *//* ... */ VOID (*tx_queue_send_notify)(struct TX_QUEUE_STRUCT *queue_ptr);/* ... */ #endif /* Define the port extension in the queue control block. This is typically defined to whitespace in tx_port.h. *//* ... */ TX_QUEUE_EXTENSION ...} TX_QUEUE; /* Define the semaphore structure utilized by the application. */ typedef struct TX_SEMAPHORE_STRUCT { /* Define the semaphore ID used for error checking. */ ULONG tx_semaphore_id; /* Define the semaphore's name. */ CHAR *tx_semaphore_name; /* Define the actual semaphore count. A zero means that no semaphore instance is available. *//* ... */ ULONG tx_semaphore_count; /* Define the semaphore suspension list head along with a count of how many threads are suspended. *//* ... */ struct TX_THREAD_STRUCT *tx_semaphore_suspension_list; UINT tx_semaphore_suspended_count; /* Define the created list next and previous pointers. */ struct TX_SEMAPHORE_STRUCT *tx_semaphore_created_next, *tx_semaphore_created_previous; #ifdef TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO /* Define the number of semaphore puts. */ ULONG tx_semaphore_performance_put_count; /* Define the number of semaphore gets. */ ULONG tx_semaphore_performance_get_count; /* Define the number of semaphore suspensions. */ ULONG tx_semaphore_performance_suspension_count; /* Define the number of semaphore timeouts. */ ULONG tx_semaphore_performance_timeout_count;/* ... */ #endif #ifndef TX_DISABLE_NOTIFY_CALLBACKS /* Define the application callback routine used to notify the application when the a semaphore is put. *//* ... */ VOID (*tx_semaphore_put_notify)(struct TX_SEMAPHORE_STRUCT *semaphore_ptr);/* ... */ #endif /* Define the port extension in the semaphore control block. This is typically defined to whitespace in tx_port.h. *//* ... */ TX_SEMAPHORE_EXTENSION ...} TX_SEMAPHORE; /* Define the system API mappings based on the error checking selected by the user. Note: this section is only applicable to application source code, hence the conditional that turns off this stuff when the include file is processed by the ThreadX source. *//* ... */ #ifndef TX_SOURCE_CODE /* Determine if error checking is desired. If so, map API functions to the appropriate error checking front-ends. Otherwise, map API functions to the core functions that actually perform the work. Note: error checking is enabled by default. *//* ... */ #ifdef TX_DISABLE_ERROR_CHECKING /* Services without error checking. */ #define tx_kernel_enter _tx_initialize_kernel_enter #define tx_block_allocate _tx_block_allocate #define tx_block_pool_create _tx_block_pool_create #define tx_block_pool_delete _tx_block_pool_delete #define tx_block_pool_info_get _tx_block_pool_info_get #define tx_block_pool_performance_info_get _tx_block_pool_performance_info_get #define tx_block_pool_performance_system_info_get _tx_block_pool_performance_system_info_get #define tx_block_pool_prioritize _tx_block_pool_prioritize #define tx_block_release _tx_block_release #define tx_byte_allocate _tx_byte_allocate #define tx_byte_pool_create _tx_byte_pool_create #define tx_byte_pool_delete _tx_byte_pool_delete #define tx_byte_pool_info_get _tx_byte_pool_info_get #define tx_byte_pool_performance_info_get _tx_byte_pool_performance_info_get #define tx_byte_pool_performance_system_info_get _tx_byte_pool_performance_system_info_get #define tx_byte_pool_prioritize _tx_byte_pool_prioritize #define tx_byte_release _tx_byte_release #define tx_event_flags_create _tx_event_flags_create #define tx_event_flags_delete _tx_event_flags_delete #define tx_event_flags_get _tx_event_flags_get #define tx_event_flags_info_get _tx_event_flags_info_get #define tx_event_flags_performance_info_get _tx_event_flags_performance_info_get #define tx_event_flags_performance_system_info_get _tx_event_flags_performance_system_info_get #define tx_event_flags_set _tx_event_flags_set #define tx_event_flags_set_notify _tx_event_flags_set_notify 25 defines #ifdef TX_ENABLE_EVENT_LOGGING UINT _tx_el_interrupt_control(UINT new_posture); #define tx_interrupt_control _tx_el_interrupt_control /* ... */#else #ifdef TX_ENABLE_EVENT_TRACE UINT _tx_trace_interrupt_control(UINT new_posture); #define tx_interrupt_control _tx_trace_interrupt_control /* ... */#else #define tx_interrupt_control _tx_thread_interrupt_control #endif/* ... */ #endif #define tx_mutex_create _tx_mutex_create #define tx_mutex_delete _tx_mutex_delete #define tx_mutex_get _tx_mutex_get #define tx_mutex_info_get _tx_mutex_info_get #define tx_mutex_performance_info_get _tx_mutex_performance_info_get #define tx_mutex_performance_system_info_get _tx_mutex_performance_system_info_get #define tx_mutex_prioritize _tx_mutex_prioritize #define tx_mutex_put _tx_mutex_put #define tx_queue_create _tx_queue_create #define tx_queue_delete _tx_queue_delete #define tx_queue_flush _tx_queue_flush #define tx_queue_info_get _tx_queue_info_get #define tx_queue_performance_info_get _tx_queue_performance_info_get #define tx_queue_performance_system_info_get _tx_queue_performance_system_info_get #define tx_queue_receive _tx_queue_receive #define tx_queue_send _tx_queue_send #define tx_queue_send_notify _tx_queue_send_notify #define tx_queue_front_send _tx_queue_front_send #define tx_queue_prioritize _tx_queue_prioritize #define tx_semaphore_ceiling_put _tx_semaphore_ceiling_put #define tx_semaphore_create _tx_semaphore_create #define tx_semaphore_delete _tx_semaphore_delete #define tx_semaphore_get _tx_semaphore_get #define tx_semaphore_info_get _tx_semaphore_info_get #define tx_semaphore_performance_info_get _tx_semaphore_performance_info_get #define tx_semaphore_performance_system_info_get _tx_semaphore_performance_system_info_get #define tx_semaphore_prioritize _tx_semaphore_prioritize #define tx_semaphore_put _tx_semaphore_put #define tx_semaphore_put_notify _tx_semaphore_put_notify #define tx_thread_create _tx_thread_create #define tx_thread_delete _tx_thread_delete #define tx_thread_entry_exit_notify _tx_thread_entry_exit_notify #define tx_thread_identify _tx_thread_identify #define tx_thread_info_get _tx_thread_info_get #define tx_thread_performance_info_get _tx_thread_performance_info_get #define tx_thread_performance_system_info_get _tx_thread_performance_system_info_get #define tx_thread_preemption_change _tx_thread_preemption_change #define tx_thread_priority_change _tx_thread_priority_change #define tx_thread_relinquish _tx_thread_relinquish #define tx_thread_reset _tx_thread_reset #define tx_thread_resume _tx_thread_resume #define tx_thread_sleep _tx_thread_sleep #define tx_thread_stack_error_notify _tx_thread_stack_error_notify #define tx_thread_suspend _tx_thread_suspend #define tx_thread_terminate _tx_thread_terminate #define tx_thread_time_slice_change _tx_thread_time_slice_change #define tx_thread_wait_abort _tx_thread_wait_abort #define tx_time_get _tx_time_get #define tx_time_set _tx_time_set #define tx_timer_activate _tx_timer_activate #define tx_timer_change _tx_timer_change #define tx_timer_create _tx_timer_create #define tx_timer_deactivate _tx_timer_deactivate #define tx_timer_delete _tx_timer_delete #define tx_timer_info_get _tx_timer_info_get #define tx_timer_performance_info_get _tx_timer_performance_info_get #define tx_timer_performance_system_info_get _tx_timer_performance_system_info_get #define tx_trace_enable _tx_trace_enable #define tx_trace_event_filter _tx_trace_event_filter #define tx_trace_event_unfilter _tx_trace_event_unfilter #define tx_trace_disable _tx_trace_disable #define tx_trace_isr_enter_insert _tx_trace_isr_enter_insert #define tx_trace_isr_exit_insert _tx_trace_isr_exit_insert #define tx_trace_buffer_full_notify _tx_trace_buffer_full_notify #define tx_trace_user_event_insert _tx_trace_user_event_insert 65 defines /* ... */#else /* Services with error checking. */ #define tx_kernel_enter _tx_initialize_kernel_enter /* Define the system API mappings depending on the runtime error checking behavior selected by the user. *//* ... */ #ifdef TX_ENABLE_MULTI_ERROR_CHECKING /* Services with MULTI runtime error checking ThreadX. */ #define tx_block_allocate _txr_block_allocate #define tx_block_pool_create(p,n,b,s,l) _txr_block_pool_create((p),(n),(b),(s),(l),(sizeof(TX_BLOCK_POOL))) #define tx_block_pool_delete _txr_block_pool_delete #define tx_block_pool_info_get _txr_block_pool_info_get #define tx_block_pool_performance_info_get _tx_block_pool_performance_info_get #define tx_block_pool_performance_system_info_get _tx_block_pool_performance_system_info_get #define tx_block_pool_prioritize _txr_block_pool_prioritize #define tx_block_release _txr_block_release #define tx_byte_allocate _txr_byte_allocate #define tx_byte_pool_create(p,n,s,l) _txr_byte_pool_create((p),(n),(s),(l),(sizeof(TX_BYTE_POOL))) #define tx_byte_pool_delete _txr_byte_pool_delete #define tx_byte_pool_info_get _txr_byte_pool_info_get #define tx_byte_pool_performance_info_get _tx_byte_pool_performance_info_get #define tx_byte_pool_performance_system_info_get _tx_byte_pool_performance_system_info_get #define tx_byte_pool_prioritize _txr_byte_pool_prioritize #define tx_byte_release _txr_byte_release #define tx_event_flags_create(g,n) _txr_event_flags_create((g),(n),(sizeof(TX_EVENT_FLAGS_GROUP))) #define tx_event_flags_delete _txr_event_flags_delete #define tx_event_flags_get _txr_event_flags_get #define tx_event_flags_info_get _txr_event_flags_info_get #define tx_event_flags_performance_info_get _tx_event_flags_performance_info_get #define tx_event_flags_performance_system_info_get _tx_event_flags_performance_system_info_get #define tx_event_flags_set _txr_event_flags_set #define tx_event_flags_set_notify _txr_event_flags_set_notify 24 defines #ifdef TX_ENABLE_EVENT_LOGGING UINT _tx_el_interrupt_control(UINT new_posture); #define tx_interrupt_control _tx_el_interrupt_control /* ... */#else #ifdef TX_ENABLE_EVENT_TRACE UINT _tx_trace_interrupt_control(UINT new_posture); #define tx_interrupt_control _tx_trace_interrupt_control /* ... */#else #define tx_interrupt_control _tx_thread_interrupt_control #endif/* ... */ #endif #define tx_mutex_create(m,n,i) _txr_mutex_create((m),(n),(i),(sizeof(TX_MUTEX))) #define tx_mutex_delete _txr_mutex_delete #define tx_mutex_get _txr_mutex_get #define tx_mutex_info_get _txr_mutex_info_get #define tx_mutex_performance_info_get _tx_mutex_performance_info_get #define tx_mutex_performance_system_info_get _tx_mutex_performance_system_info_get #define tx_mutex_prioritize _txr_mutex_prioritize #define tx_mutex_put _txr_mutex_put #define tx_queue_create(q,n,m,s,l) _txr_queue_create((q),(n),(m),(s),(l),(sizeof(TX_QUEUE))) #define tx_queue_delete _txr_queue_delete #define tx_queue_flush _txr_queue_flush #define tx_queue_info_get _txr_queue_info_get #define tx_queue_performance_info_get _tx_queue_performance_info_get #define tx_queue_performance_system_info_get _tx_queue_performance_system_info_get #define tx_queue_receive _txr_queue_receive #define tx_queue_send _txr_queue_send #define tx_queue_send_notify _txr_queue_send_notify #define tx_queue_front_send _txr_queue_front_send #define tx_queue_prioritize _txr_queue_prioritize #define tx_semaphore_ceiling_put _txr_semaphore_ceiling_put #define tx_semaphore_create(s,n,i) _txr_semaphore_create((s),(n),(i),(sizeof(TX_SEMAPHORE))) #define tx_semaphore_delete _txr_semaphore_delete #define tx_semaphore_get _txr_semaphore_get #define tx_semaphore_info_get _txr_semaphore_info_get #define tx_semaphore_performance_info_get _tx_semaphore_performance_info_get #define tx_semaphore_performance_system_info_get _tx_semaphore_performance_system_info_get #define tx_semaphore_prioritize _txr_semaphore_prioritize #define tx_semaphore_put _txr_semaphore_put #define tx_semaphore_put_notify _txr_semaphore_put_notify #define tx_thread_create(t,n,e,i,s,l,p,r,c,a) _txr_thread_create((t),(n),(e),(i),(s),(l),(p),(r),(c),(a),(sizeof(TX_THREAD))) #define tx_thread_delete _txr_thread_delete #define tx_thread_entry_exit_notify _txr_thread_entry_exit_notify #define tx_thread_identify _tx_thread_identify #define tx_thread_info_get _txr_thread_info_get #define tx_thread_performance_info_get _tx_thread_performance_info_get #define tx_thread_performance_system_info_get _tx_thread_performance_system_info_get #define tx_thread_preemption_change _txr_thread_preemption_change #define tx_thread_priority_change _txr_thread_priority_change #define tx_thread_relinquish _txe_thread_relinquish #define tx_thread_reset _txr_thread_reset #define tx_thread_resume _txr_thread_resume #define tx_thread_sleep _tx_thread_sleep #define tx_thread_stack_error_notify _tx_thread_stack_error_notify #define tx_thread_suspend _txr_thread_suspend #define tx_thread_terminate _txr_thread_terminate #define tx_thread_time_slice_change _txr_thread_time_slice_change #define tx_thread_wait_abort _txr_thread_wait_abort #define tx_time_get _tx_time_get #define tx_time_set _tx_time_set #define tx_timer_activate _txr_timer_activate #define tx_timer_change _txr_timer_change #define tx_timer_create(t,n,e,i,c,r,a) _txr_timer_create((t),(n),(e),(i),(c),(r),(a),(sizeof(TX_TIMER))) #define tx_timer_deactivate _txr_timer_deactivate #define tx_timer_delete _txr_timer_delete #define tx_timer_info_get _txr_timer_info_get #define tx_timer_performance_info_get _tx_timer_performance_info_get #define tx_timer_performance_system_info_get _tx_timer_performance_system_info_get #define tx_trace_enable _tx_trace_enable #define tx_trace_event_filter _tx_trace_event_filter #define tx_trace_event_unfilter _tx_trace_event_unfilter #define tx_trace_disable _tx_trace_disable #define tx_trace_isr_enter_insert _tx_trace_isr_enter_insert #define tx_trace_isr_exit_insert _tx_trace_isr_exit_insert #define tx_trace_buffer_full_notify _tx_trace_buffer_full_notify #define tx_trace_user_event_insert _tx_trace_user_event_insert 65 defines /* ... */#else #define tx_block_allocate _txe_block_allocate #define tx_block_pool_create(p,n,b,s,l) _txe_block_pool_create((p),(n),(b),(s),(l),(sizeof(TX_BLOCK_POOL))) #define tx_block_pool_delete _txe_block_pool_delete #define tx_block_pool_info_get _txe_block_pool_info_get #define tx_block_pool_performance_info_get _tx_block_pool_performance_info_get #define tx_block_pool_performance_system_info_get _tx_block_pool_performance_system_info_get #define tx_block_pool_prioritize _txe_block_pool_prioritize #define tx_block_release _txe_block_release #define tx_byte_allocate _txe_byte_allocate #define tx_byte_pool_create(p,n,s,l) _txe_byte_pool_create((p),(n),(s),(l),(sizeof(TX_BYTE_POOL))) #define tx_byte_pool_delete _txe_byte_pool_delete #define tx_byte_pool_info_get _txe_byte_pool_info_get #define tx_byte_pool_performance_info_get _tx_byte_pool_performance_info_get #define tx_byte_pool_performance_system_info_get _tx_byte_pool_performance_system_info_get #define tx_byte_pool_prioritize _txe_byte_pool_prioritize #define tx_byte_release _txe_byte_release #define tx_event_flags_create(g,n) _txe_event_flags_create((g),(n),(sizeof(TX_EVENT_FLAGS_GROUP))) #define tx_event_flags_delete _txe_event_flags_delete #define tx_event_flags_get _txe_event_flags_get #define tx_event_flags_info_get _txe_event_flags_info_get #define tx_event_flags_performance_info_get _tx_event_flags_performance_info_get #define tx_event_flags_performance_system_info_get _tx_event_flags_performance_system_info_get #define tx_event_flags_set _txe_event_flags_set #define tx_event_flags_set_notify _txe_event_flags_set_notify 24 defines #ifdef TX_ENABLE_EVENT_LOGGING UINT _tx_el_interrupt_control(UINT new_posture); #define tx_interrupt_control _tx_el_interrupt_control /* ... */#else #ifdef TX_ENABLE_EVENT_TRACE #define tx_interrupt_control _tx_trace_interrupt_control #else #define tx_interrupt_control _tx_thread_interrupt_control #endif/* ... */ #endif #define tx_mutex_create(m,n,i) _txe_mutex_create((m),(n),(i),(sizeof(TX_MUTEX))) #define tx_mutex_delete _txe_mutex_delete #define tx_mutex_get _txe_mutex_get #define tx_mutex_info_get _txe_mutex_info_get #define tx_mutex_performance_info_get _tx_mutex_performance_info_get #define tx_mutex_performance_system_info_get _tx_mutex_performance_system_info_get #define tx_mutex_prioritize _txe_mutex_prioritize #define tx_mutex_put _txe_mutex_put #define tx_queue_create(q,n,m,s,l) _txe_queue_create((q),(n),(m),(s),(l),(sizeof(TX_QUEUE))) #define tx_queue_delete _txe_queue_delete #define tx_queue_flush _txe_queue_flush #define tx_queue_info_get _txe_queue_info_get #define tx_queue_performance_info_get _tx_queue_performance_info_get #define tx_queue_performance_system_info_get _tx_queue_performance_system_info_get #define tx_queue_receive _txe_queue_receive #define tx_queue_send _txe_queue_send #define tx_queue_send_notify _txe_queue_send_notify #define tx_queue_front_send _txe_queue_front_send #define tx_queue_prioritize _txe_queue_prioritize #define tx_semaphore_ceiling_put _txe_semaphore_ceiling_put #define tx_semaphore_create(s,n,i) _txe_semaphore_create((s),(n),(i),(sizeof(TX_SEMAPHORE))) #define tx_semaphore_delete _txe_semaphore_delete #define tx_semaphore_get _txe_semaphore_get #define tx_semaphore_info_get _txe_semaphore_info_get #define tx_semaphore_performance_info_get _tx_semaphore_performance_info_get #define tx_semaphore_performance_system_info_get _tx_semaphore_performance_system_info_get #define tx_semaphore_prioritize _txe_semaphore_prioritize #define tx_semaphore_put _txe_semaphore_put #define tx_semaphore_put_notify _txe_semaphore_put_notify #define tx_thread_create(t,n,e,i,s,l,p,r,c,a) _txe_thread_create((t),(n),(e),(i),(s),(l),(p),(r),(c),(a),(sizeof(TX_THREAD))) #define tx_thread_delete _txe_thread_delete #define tx_thread_entry_exit_notify _txe_thread_entry_exit_notify #define tx_thread_identify _tx_thread_identify #define tx_thread_info_get _txe_thread_info_get #define tx_thread_performance_info_get _tx_thread_performance_info_get #define tx_thread_performance_system_info_get _tx_thread_performance_system_info_get #define tx_thread_preemption_change _txe_thread_preemption_change #define tx_thread_priority_change _txe_thread_priority_change #define tx_thread_relinquish _txe_thread_relinquish #define tx_thread_reset _txe_thread_reset #define tx_thread_resume _txe_thread_resume #define tx_thread_sleep _tx_thread_sleep #define tx_thread_stack_error_notify _tx_thread_stack_error_notify #define tx_thread_suspend _txe_thread_suspend #define tx_thread_terminate _txe_thread_terminate #define tx_thread_time_slice_change _txe_thread_time_slice_change #define tx_thread_wait_abort _txe_thread_wait_abort #define tx_time_get _tx_time_get #define tx_time_set _tx_time_set #define tx_timer_activate _txe_timer_activate #define tx_timer_change _txe_timer_change #define tx_timer_create(t,n,e,i,c,r,a) _txe_timer_create((t),(n),(e),(i),(c),(r),(a),(sizeof(TX_TIMER))) #define tx_timer_deactivate _txe_timer_deactivate #define tx_timer_delete _txe_timer_delete #define tx_timer_info_get _txe_timer_info_get #define tx_timer_performance_info_get _tx_timer_performance_info_get #define tx_timer_performance_system_info_get _tx_timer_performance_system_info_get #define tx_trace_enable _tx_trace_enable #define tx_trace_event_filter _tx_trace_event_filter #define tx_trace_event_unfilter _tx_trace_event_unfilter #define tx_trace_disable _tx_trace_disable #define tx_trace_isr_enter_insert _tx_trace_isr_enter_insert #define tx_trace_isr_exit_insert _tx_trace_isr_exit_insert #define tx_trace_buffer_full_notify _tx_trace_buffer_full_notify #define tx_trace_user_event_insert _tx_trace_user_event_insert 65 defines /* ... */#endif/* ... */ #endif /* ... */ #endif /* Declare the tx_application_define function as having C linkage. */ VOID tx_application_define(VOID *first_unused_memory); /* Define the function prototypes of the ThreadX API. */ /* Define block memory pool management function prototypes. */ UINT _tx_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size); UINT _tx_block_pool_delete(TX_BLOCK_POOL *pool_ptr); UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases, ULONG *suspensions, ULONG *timeouts); UINT _tx_block_pool_performance_system_info_get(ULONG *allocates, ULONG *releases, ULONG *suspensions, ULONG *timeouts); UINT _tx_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); UINT _tx_block_release(VOID *block_ptr); /* Define error checking shells for API services. These are only referenced by the application. *//* ... */ UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr); UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); UINT _txe_block_release(VOID *block_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); UINT _txr_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txr_block_pool_delete(TX_BLOCK_POOL *pool_ptr); UINT _txr_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); UINT _txr_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); UINT _txr_block_release(VOID *block_ptr);/* ... */ #endif /* Define byte memory pool management function prototypes. */ UINT _tx_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size); UINT _tx_byte_pool_delete(TX_BYTE_POOL *pool_ptr); UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool); UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases, ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts); UINT _tx_byte_pool_performance_system_info_get(ULONG *allocates, ULONG *releases, ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts); UINT _tx_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); UINT _tx_byte_release(VOID *memory_ptr); /* Define error checking shells for API services. These are only referenced by the application. *//* ... */ UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr); UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool); UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); UINT _txe_byte_release(VOID *memory_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); UINT _txr_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txr_byte_pool_delete(TX_BYTE_POOL *pool_ptr); UINT _txr_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool); UINT _txr_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); UINT _txr_byte_release(VOID *memory_ptr);/* ... */ #endif /* Define event flags management function prototypes. */ UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr); UINT _tx_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group); UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets, ULONG *suspensions, ULONG *timeouts); UINT _tx_event_flags_performance_system_info_get(ULONG *sets, ULONG *gets, ULONG *suspensions, ULONG *timeouts); UINT _tx_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option); UINT _tx_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); /* Define error checking shells for API services. These are only referenced by the application. *//* ... */ UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _txe_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group); UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option); UINT _txe_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); UINT _txr_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _txr_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); UINT _txr_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group); UINT _txr_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option); UINT _txr_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr));/* ... */ #endif /* Define initialization function prototypes. */ VOID _tx_initialize_kernel_enter(VOID); /* Define mutex management function prototypes. */ UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit); UINT _tx_mutex_delete(TX_MUTEX *mutex_ptr); UINT _tx_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex); UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances); UINT _tx_mutex_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances); UINT _tx_mutex_prioritize(TX_MUTEX *mutex_ptr); UINT _tx_mutex_put(TX_MUTEX *mutex_ptr); /* Define error checking shells for API services. These are only referenced by the application. *//* ... */ UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr); UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex); UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr); UINT _txe_mutex_put(TX_MUTEX *mutex_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); UINT _txr_mutex_delete(TX_MUTEX *mutex_ptr); UINT _txr_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); UINT _txr_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex); UINT _txr_mutex_prioritize(TX_MUTEX *mutex_ptr); UINT _txr_mutex_put(TX_MUTEX *mutex_ptr);/* ... */ #endif /* Define queue management function prototypes. */ UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size); UINT _tx_queue_delete(TX_QUEUE *queue_ptr); UINT _tx_queue_flush(TX_QUEUE *queue_ptr); UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue); UINT _tx_queue_performance_info_get(TX_QUEUE *queue_ptr, ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts); UINT _tx_queue_performance_system_info_get(ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts); UINT _tx_queue_prioritize(TX_QUEUE *queue_ptr); UINT _tx_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); UINT _tx_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option); UINT _tx_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr)); UINT _tx_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option); /* Define error checking shells for API services. These are only referenced by the application. *//* ... */ UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size); UINT _txe_queue_delete(TX_QUEUE *queue_ptr); UINT _txe_queue_flush(TX_QUEUE *queue_ptr); UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue); UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr); UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); UINT _txe_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option); UINT _txe_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr)); UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size); UINT _txr_queue_delete(TX_QUEUE *queue_ptr); UINT _txr_queue_flush(TX_QUEUE *queue_ptr); UINT _txr_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue); UINT _txr_queue_prioritize(TX_QUEUE *queue_ptr); UINT _txr_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); UINT _txr_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option); UINT _txr_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr)); UINT _txr_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option);/* ... */ #endif /* Define semaphore management function prototypes. */ UINT _tx_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count); UINT _tx_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _tx_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore); UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts); UINT _tx_semaphore_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts); UINT _tx_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); UINT _tx_semaphore_put(TX_SEMAPHORE *semaphore_ptr); UINT _tx_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr)); /* Define error checking shells for API services. These are only referenced by the application. *//* ... */ UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore); UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_put(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr)); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); UINT _txr_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); UINT _txr_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _txr_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); UINT _txr_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore); UINT _txr_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); UINT _txr_semaphore_put(TX_SEMAPHORE *semaphore_ptr); UINT _txr_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr));/* ... */ #endif /* Define thread control function prototypes. */ VOID _tx_thread_context_save(VOID); VOID _tx_thread_context_restore(VOID); UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, ULONG time_slice, UINT auto_start); UINT _tx_thread_delete(TX_THREAD *thread_ptr); UINT _tx_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); TX_THREAD *_tx_thread_identify(VOID); UINT _tx_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread); UINT _tx_thread_interrupt_control(UINT new_posture); UINT _tx_thread_performance_info_get(TX_THREAD *thread_ptr, ULONG *resumptions, ULONG *suspensions, ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions, ULONG *time_slices, ULONG *relinquishes, ULONG *timeouts, ULONG *wait_aborts, TX_THREAD **last_preempted_by); UINT _tx_thread_performance_system_info_get(ULONG *resumptions, ULONG *suspensions, ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions, ULONG *time_slices, ULONG *relinquishes, ULONG *timeouts, ULONG *wait_aborts, ULONG *non_idle_returns, ULONG *idle_returns); UINT _tx_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold); UINT _tx_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority); VOID _tx_thread_relinquish(VOID); UINT _tx_thread_reset(TX_THREAD *thread_ptr); UINT _tx_thread_resume(TX_THREAD *thread_ptr); UINT _tx_thread_sleep(ULONG timer_ticks); UINT _tx_thread_stack_error_notify(VOID (*stack_error_handler)(TX_THREAD *thread_ptr)); UINT _tx_thread_suspend(TX_THREAD *thread_ptr); UINT _tx_thread_terminate(TX_THREAD *thread_ptr); UINT _tx_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice); UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr); /* Define error checking shells for API services. These are only referenced by the application. *//* ... */ UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, ULONG time_slice, UINT auto_start, UINT thread_control_block_size); UINT _txe_thread_delete(TX_THREAD *thread_ptr); UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread); UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold); UINT _txe_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority); VOID _txe_thread_relinquish(VOID); UINT _txe_thread_reset(TX_THREAD *thread_ptr); UINT _txe_thread_resume(TX_THREAD *thread_ptr); UINT _txe_thread_suspend(TX_THREAD *thread_ptr); UINT _txe_thread_terminate(TX_THREAD *thread_ptr); UINT _txe_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice); UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, ULONG time_slice, UINT auto_start, UINT thread_control_block_size); UINT _txr_thread_delete(TX_THREAD *thread_ptr); UINT _txr_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); UINT _txr_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread); UINT _txr_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold); UINT _txr_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority); UINT _txr_thread_reset(TX_THREAD *thread_ptr); UINT _txr_thread_resume(TX_THREAD *thread_ptr); UINT _txr_thread_suspend(TX_THREAD *thread_ptr); UINT _txr_thread_terminate(TX_THREAD *thread_ptr); UINT _txr_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice); UINT _txr_thread_wait_abort(TX_THREAD *thread_ptr);/* ... */ #endif /* Define timer management function prototypes. */ UINT _tx_timer_activate(TX_TIMER *timer_ptr); UINT _tx_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); UINT _tx_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate); UINT _tx_timer_deactivate(TX_TIMER *timer_ptr); UINT _tx_timer_delete(TX_TIMER *timer_ptr); UINT _tx_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer); UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts); UINT _tx_timer_performance_system_info_get(ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts); ULONG _tx_time_get(VOID); VOID _tx_time_set(ULONG new_time); /* Define error checking shells for API services. These are only referenced by the application. *//* ... */ UINT _txe_timer_activate(TX_TIMER *timer_ptr); UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT _txe_timer_deactivate(TX_TIMER *timer_ptr); UINT _txe_timer_delete(TX_TIMER *timer_ptr); UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_timer_activate(TX_TIMER *timer_ptr); UINT _txr_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); UINT _txr_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT _txr_timer_deactivate(TX_TIMER *timer_ptr); UINT _txr_timer_delete(TX_TIMER *timer_ptr); UINT _txr_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer);/* ... */ #endif /* Define trace API function prototypes. */ UINT _tx_trace_enable(VOID *trace_buffer_start, ULONG trace_buffer_size, ULONG registry_entries); UINT _tx_trace_event_filter(ULONG event_filter_bits); UINT _tx_trace_event_unfilter(ULONG event_unfilter_bits); UINT _tx_trace_disable(VOID); VOID _tx_trace_isr_enter_insert(ULONG isr_id); VOID _tx_trace_isr_exit_insert(ULONG isr_id); UINT _tx_trace_buffer_full_notify(VOID (*full_buffer_callback)(VOID *buffer)); UINT _tx_trace_user_event_insert(ULONG event_id, ULONG info_field_1, ULONG info_field_2, ULONG info_field_3, ULONG info_field_4); UINT _tx_trace_interrupt_control(UINT new_posture); /* Add a default macro that can be re-defined in tx_port.h to add default processing when a thread starts. Common usage would be for enabling floating point for a thread by default, however, the additional processing could be anything defined in tx_port.h. *//* ... */ #ifndef TX_THREAD_STARTED_EXTENSION #define TX_THREAD_STARTED_EXTENSION(thread_ptr) #endif /* Add a default macro that can be re-defined in tx_port.h to add processing to the thread stack analyze function. By default, this is simply defined as whitespace. *//* ... */ #ifndef TX_THREAD_STACK_ANALYZE_EXTENSION #define TX_THREAD_STACK_ANALYZE_EXTENSION #endif /* Add a default macro that can be re-defined in tx_port.h to add processing to the initialize kernel enter function. By default, this is simply defined as whitespace. *//* ... */ #ifndef TX_INITIALIZE_KERNEL_ENTER_EXTENSION #define TX_INITIALIZE_KERNEL_ENTER_EXTENSION #endif /* Check for MISRA compliance requirements. */ #ifdef TX_MISRA_ENABLE /* Define MISRA-specific routines. */ VOID _tx_misra_memset(VOID *ptr, UINT value, UINT size); UCHAR *_tx_misra_uchar_pointer_add(UCHAR *ptr, ULONG amount); UCHAR *_tx_misra_uchar_pointer_sub(UCHAR *ptr, ULONG amount); ULONG _tx_misra_uchar_pointer_dif(UCHAR *ptr1, UCHAR *ptr2); ULONG _tx_misra_pointer_to_ulong_convert(VOID *ptr); ULONG *_tx_misra_ulong_pointer_add(ULONG *ptr, ULONG amount); ULONG *_tx_misra_ulong_pointer_sub(ULONG *ptr, ULONG amount); ULONG _tx_misra_ulong_pointer_dif(ULONG *ptr1, ULONG *ptr2); VOID *_tx_misra_ulong_to_pointer_convert(ULONG input); VOID _tx_misra_message_copy(ULONG **source, ULONG **destination, UINT size); ULONG _tx_misra_timer_pointer_dif(TX_TIMER_INTERNAL **ptr1, TX_TIMER_INTERNAL **ptr2); TX_TIMER_INTERNAL **_tx_misra_timer_pointer_add(TX_TIMER_INTERNAL **ptr1, ULONG size); VOID _tx_misra_user_timer_pointer_get(TX_TIMER_INTERNAL *internal_timer, TX_TIMER **user_timer); VOID _tx_misra_thread_stack_check(TX_THREAD *thread_ptr, VOID **highest_stack); VOID _tx_misra_trace_event_insert(ULONG event_id, VOID *info_field_1, ULONG info_field_2, ULONG info_field_3, ULONG info_field_4, ULONG filter, ULONG time_stamp); UINT _tx_misra_always_true(void); UCHAR **_tx_misra_indirect_void_to_uchar_pointer_convert(VOID **pointer); UCHAR **_tx_misra_uchar_to_indirect_uchar_pointer_convert(UCHAR *pointer); UCHAR *_tx_misra_block_pool_to_uchar_pointer_convert(TX_BLOCK_POOL *pool); TX_BLOCK_POOL *_tx_misra_void_to_block_pool_pointer_convert(VOID *pointer); UCHAR *_tx_misra_void_to_uchar_pointer_convert(VOID *pointer); TX_BLOCK_POOL *_tx_misra_uchar_to_block_pool_pointer_convert(UCHAR *pointer); UCHAR **_tx_misra_void_to_indirect_uchar_pointer_convert(VOID *pointer); TX_BYTE_POOL *_tx_misra_void_to_byte_pool_pointer_convert(VOID *pointer); UCHAR *_tx_misra_byte_pool_to_uchar_pointer_convert(TX_BYTE_POOL *pool); ALIGN_TYPE *_tx_misra_uchar_to_align_type_pointer_convert(UCHAR *pointer); TX_BYTE_POOL **_tx_misra_uchar_to_indirect_byte_pool_pointer_convert(UCHAR *pointer); TX_EVENT_FLAGS_GROUP *_tx_misra_void_to_event_flags_pointer_convert(VOID *pointer); ULONG *_tx_misra_void_to_ulong_pointer_convert(VOID *pointer); TX_MUTEX *_tx_misra_void_to_mutex_pointer_convert(VOID *pointer); UINT _tx_misra_status_get(UINT status); TX_QUEUE *_tx_misra_void_to_queue_pointer_convert(VOID *pointer); TX_SEMAPHORE *_tx_misra_void_to_semaphore_pointer_convert(VOID *pointer); VOID *_tx_misra_uchar_to_void_pointer_convert(UCHAR *pointer); TX_THREAD *_tx_misra_ulong_to_thread_pointer_convert(ULONG value); VOID *_tx_misra_timer_indirect_to_void_pointer_convert(TX_TIMER_INTERNAL **pointer); CHAR *_tx_misra_const_char_to_char_pointer_convert(const char *pointer); TX_THREAD *_tx_misra_void_to_thread_pointer_convert(VOID *pointer); UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer); VOID _tx_misra_event_flags_group_not_used(TX_EVENT_FLAGS_GROUP *group_ptr); VOID _tx_misra_event_flags_set_notify_not_used(VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); VOID _tx_misra_queue_not_used(TX_QUEUE *queue_ptr); VOID _tx_misra_queue_send_notify_not_used(VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr)); VOID _tx_misra_semaphore_not_used(TX_SEMAPHORE *semaphore_ptr); VOID _tx_misra_semaphore_put_notify_not_used(VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr)); VOID _tx_misra_thread_not_used(TX_THREAD *thread_ptr); VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT id)); #define TX_MEMSET(a,b,c) _tx_misra_memset((a), (UINT) (b), (UINT) (c)) #define TX_UCHAR_POINTER_ADD(a,b) _tx_misra_uchar_pointer_add((UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_SUB(a,b) _tx_misra_uchar_pointer_sub((UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_DIF(a,b) _tx_misra_uchar_pointer_dif((UCHAR *) (a), (UCHAR *) (b)) #define TX_ULONG_POINTER_ADD(a,b) _tx_misra_ulong_pointer_add((ULONG *) (a), (ULONG) (b)) #define TX_ULONG_POINTER_SUB(a,b) _tx_misra_ulong_pointer_sub((ULONG *) (a), (ULONG) (b)) #define TX_ULONG_POINTER_DIF(a,b) _tx_misra_ulong_pointer_dif((ULONG *) (a), (ULONG *) (b)) #define TX_POINTER_TO_ULONG_CONVERT(a) _tx_misra_pointer_to_ulong_convert((VOID *) (a)) #define TX_ULONG_TO_POINTER_CONVERT(a) _tx_misra_ulong_to_pointer_convert((ULONG) (a)) #define TX_QUEUE_MESSAGE_COPY(s,d,z) _tx_misra_message_copy(&(s), &(d), (z)); #define TX_TIMER_POINTER_DIF(a,b) _tx_misra_timer_pointer_dif((TX_TIMER_INTERNAL **) (a), (TX_TIMER_INTERNAL **) (b)) #define TX_TIMER_POINTER_ADD(a,b) _tx_misra_timer_pointer_add((TX_TIMER_INTERNAL **) (a), (ULONG) (b)) #define TX_USER_TIMER_POINTER_GET(a,b) _tx_misra_user_timer_pointer_get((TX_TIMER_INTERNAL *) (a), (TX_TIMER **) &(b)); #define TX_THREAD_STACK_CHECK(a) _tx_misra_thread_stack_check((a), &((a)->tx_thread_stack_highest_ptr)); 14 defines#ifdef TX_ENABLE_EVENT_TRACE #define TX_TRACE_IN_LINE_INSERT(i,a,b,c,d,e) _tx_misra_trace_event_insert((ULONG) (i), (VOID *) (a), (ULONG) (b), (ULONG) (c), (ULONG) (d), (ULONG) (e), ((ULONG) TX_TRACE_TIME_SOURCE)); #endif #define TX_LOOP_FOREVER (_tx_misra_always_true() == TX_TRUE) #define TX_INDIRECT_VOID_TO_UCHAR_POINTER_CONVERT(a) _tx_misra_indirect_void_to_uchar_pointer_convert((a)) #define TX_UCHAR_TO_INDIRECT_UCHAR_POINTER_CONVERT(a) _tx_misra_uchar_to_indirect_uchar_pointer_convert((a)) #define TX_BLOCK_POOL_TO_UCHAR_POINTER_CONVERT(a) _tx_misra_block_pool_to_uchar_pointer_convert((a)) #define TX_VOID_TO_BLOCK_POOL_POINTER_CONVERT(a) _tx_misra_void_to_block_pool_pointer_convert((a)) #define TX_VOID_TO_UCHAR_POINTER_CONVERT(a) _tx_misra_void_to_uchar_pointer_convert((a)) #define TX_UCHAR_TO_BLOCK_POOL_POINTER_CONVERT(a) _tx_misra_uchar_to_block_pool_pointer_convert((a)) #define TX_VOID_TO_INDIRECT_UCHAR_POINTER_CONVERT(a) _tx_misra_void_to_indirect_uchar_pointer_convert((a)) #define TX_VOID_TO_BYTE_POOL_POINTER_CONVERT(a) _tx_misra_void_to_byte_pool_pointer_convert((a)) #define TX_BYTE_POOL_TO_UCHAR_POINTER_CONVERT(a) _tx_misra_byte_pool_to_uchar_pointer_convert((a)) #define TX_UCHAR_TO_ALIGN_TYPE_POINTER_CONVERT(a) _tx_misra_uchar_to_align_type_pointer_convert((a)) #define TX_UCHAR_TO_INDIRECT_BYTE_POOL_POINTER(a) _tx_misra_uchar_to_indirect_byte_pool_pointer_convert((a)) #define TX_VOID_TO_EVENT_FLAGS_POINTER_CONVERT(a) _tx_misra_void_to_event_flags_pointer_convert((a)) #define TX_VOID_TO_ULONG_POINTER_CONVERT(a) _tx_misra_void_to_ulong_pointer_convert((a)) #define TX_VOID_TO_MUTEX_POINTER_CONVERT(a) _tx_misra_void_to_mutex_pointer_convert((a)) #define TX_MUTEX_PRIORITIZE_MISRA_EXTENSION(a) _tx_misra_status_get((a)) #define TX_VOID_TO_QUEUE_POINTER_CONVERT(a) _tx_misra_void_to_queue_pointer_convert((a)) #define TX_VOID_TO_SEMAPHORE_POINTER_CONVERT(a) _tx_misra_void_to_semaphore_pointer_convert((a)) #define TX_UCHAR_TO_VOID_POINTER_CONVERT(a) _tx_misra_uchar_to_void_pointer_convert((a)) #define TX_ULONG_TO_THREAD_POINTER_CONVERT(a) _tx_misra_ulong_to_thread_pointer_convert((a)) #define TX_TIMER_INDIRECT_TO_VOID_POINTER_CONVERT(a) _tx_misra_timer_indirect_to_void_pointer_convert((a)) 21 defines#ifndef TX_TIMER_INITIALIZE_EXTENSION #define TX_TIMER_INITIALIZE_EXTENSION(a) status = _tx_misra_status_get((a)); #endif #define TX_CONST_CHAR_TO_CHAR_POINTER_CONVERT(a) _tx_misra_const_char_to_char_pointer_convert((a)) #define TX_VOID_TO_THREAD_POINTER_CONVERT(a) _tx_misra_void_to_thread_pointer_convert((a)) #define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) _tx_misra_char_to_uchar_pointer_convert((a)) #define TX_EVENT_FLAGS_GROUP_NOT_USED(a) _tx_misra_event_flags_group_not_used((a)) #define TX_EVENT_FLAGS_SET_NOTIFY_NOT_USED(a) _tx_misra_event_flags_set_notify_not_used((a)) #define TX_QUEUE_NOT_USED(a) _tx_misra_queue_not_used((a)) #define TX_QUEUE_SEND_NOTIFY_NOT_USED(a) _tx_misra_queue_send_notify_not_used((a)) #define TX_SEMAPHORE_NOT_USED(a) _tx_misra_semaphore_not_used((a)) #define TX_SEMAPHORE_PUT_NOTIFY_NOT_USED(a) _tx_misra_semaphore_put_notify_not_used((a)) #define TX_THREAD_NOT_USED(a) _tx_misra_thread_not_used((a)) #define TX_THREAD_ENTRY_EXIT_NOTIFY_NOT_USED(a) _tx_misra_thread_entry_exit_notify_not_used((a)) 11 defines /* ... */#else /* Define the TX_MEMSET macro to the standard library function, if not already defined. */ #ifndef TX_MEMSET #define TX_MEMSET(a,b,c) memset((a),(b),(c)) #endif #define TX_UCHAR_POINTER_ADD(a,b) (((UCHAR *) (a)) + ((UINT) (b))) #define TX_UCHAR_POINTER_SUB(a,b) (((UCHAR *) (a)) - ((UINT) (b))) #define TX_UCHAR_POINTER_DIF(a,b) ((ULONG)(((UCHAR *) (a)) - ((UCHAR *) (b)))) #define TX_ULONG_POINTER_ADD(a,b) (((ULONG *) (a)) + ((UINT) (b))) #define TX_ULONG_POINTER_SUB(a,b) (((ULONG *) (a)) - ((UINT) (b))) #define TX_ULONG_POINTER_DIF(a,b) ((ULONG)(((ULONG *) (a)) - ((ULONG *) (b)))) #define TX_POINTER_TO_ULONG_CONVERT(a) ((ULONG) ((VOID *) (a))) #define TX_ULONG_TO_POINTER_CONVERT(a) ((VOID *) ((ULONG) (a))) #define TX_POINTER_TO_ALIGN_TYPE_CONVERT(a) ((ALIGN_TYPE) ((VOID *) (a))) #define TX_ALIGN_TYPE_TO_POINTER_CONVERT(a) ((VOID *) ((ALIGN_TYPE) (a))) #define TX_TIMER_POINTER_DIF(a,b) ((ULONG)(((TX_TIMER_INTERNAL **) (a)) - ((TX_TIMER_INTERNAL **) (b)))) #define TX_TIMER_POINTER_ADD(a,b) (((TX_TIMER_INTERNAL **) (a)) + ((ULONG) (b))) #define TX_USER_TIMER_POINTER_GET(a,b) { \ UCHAR *working_ptr; \ working_ptr = (UCHAR *) (a); \ (b) = (TX_TIMER *) working_ptr; \ working_ptr = working_ptr - (((UCHAR *) &(b) -> tx_timer_internal) - ((UCHAR *) &(b) -> tx_timer_id)); \ (b) = (TX_TIMER *) working_ptr; \ ...}... #define TX_LOOP_FOREVER ((UINT) 1) #define TX_INDIRECT_VOID_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR **) ((VOID *) (a))) #define TX_UCHAR_TO_INDIRECT_UCHAR_POINTER_CONVERT(a) ((UCHAR **) ((VOID *) (a))) #define TX_BLOCK_POOL_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a))) #define TX_VOID_TO_BLOCK_POOL_POINTER_CONVERT(a) ((TX_BLOCK_POOL *) ((VOID *) (a))) #define TX_VOID_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a))) #define TX_UCHAR_TO_BLOCK_POOL_POINTER_CONVERT(a) ((TX_BLOCK_POOL *) ((VOID *) (a))) #define TX_VOID_TO_INDIRECT_UCHAR_POINTER_CONVERT(a) ((UCHAR **) ((VOID *) (a))) #define TX_VOID_TO_BYTE_POOL_POINTER_CONVERT(a) ((TX_BYTE_POOL *) ((VOID *) (a))) #define TX_BYTE_POOL_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a))) 23 defines#ifndef TX_UCHAR_TO_ALIGN_TYPE_POINTER_CONVERT #define TX_UCHAR_TO_ALIGN_TYPE_POINTER_CONVERT(a) ((ALIGN_TYPE *) ((VOID *) (a))) #endif #define TX_UCHAR_TO_INDIRECT_BYTE_POOL_POINTER(a) ((TX_BYTE_POOL **) ((VOID *) (a))) #define TX_VOID_TO_EVENT_FLAGS_POINTER_CONVERT(a) ((TX_EVENT_FLAGS_GROUP *) ((VOID *) (a))) #define TX_VOID_TO_ULONG_POINTER_CONVERT(a) ((ULONG *) ((VOID *) (a))) #define TX_VOID_TO_MUTEX_POINTER_CONVERT(a) ((TX_MUTEX *) ((VOID *) (a))) #define TX_VOID_TO_QUEUE_POINTER_CONVERT(a) ((TX_QUEUE *) ((VOID *) (a))) #define TX_VOID_TO_SEMAPHORE_POINTER_CONVERT(a) ((TX_SEMAPHORE *) ((VOID *) (a))) #define TX_UCHAR_TO_VOID_POINTER_CONVERT(a) ((VOID *) (a)) #define TX_ULONG_TO_THREAD_POINTER_CONVERT(a) ((TX_THREAD *) ((VOID *) (a))) 8 defines#ifndef TX_TIMER_INDIRECT_TO_VOID_POINTER_CONVERT #define TX_TIMER_INDIRECT_TO_VOID_POINTER_CONVERT(a) ((VOID *) (a)) #endif #ifndef TX_TIMER_INITIALIZE_EXTENSION #define TX_TIMER_INITIALIZE_EXTENSION(a) #endif #define TX_CONST_CHAR_TO_CHAR_POINTER_CONVERT(a) ((CHAR *) ((VOID *) (a))) #define TX_VOID_TO_THREAD_POINTER_CONVERT(a) ((TX_THREAD *) ((VOID *) (a))) #define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a))) #ifndef TX_EVENT_FLAGS_GROUP_NOT_USED #define TX_EVENT_FLAGS_GROUP_NOT_USED(a) ((void)(a)) #endif #ifndef TX_EVENT_FLAGS_SET_NOTIFY_NOT_USED #define TX_EVENT_FLAGS_SET_NOTIFY_NOT_USED(a) ((void)(a)) #endif #ifndef TX_QUEUE_NOT_USED #define TX_QUEUE_NOT_USED(a) ((void)(a)) #endif #ifndef TX_QUEUE_SEND_NOTIFY_NOT_USED #define TX_QUEUE_SEND_NOTIFY_NOT_USED(a) ((void)(a)) #endif #ifndef TX_SEMAPHORE_NOT_USED #define TX_SEMAPHORE_NOT_USED(a) ((void)(a)) #endif #ifndef TX_SEMAPHORE_PUT_NOTIFY_NOT_USED #define TX_SEMAPHORE_PUT_NOTIFY_NOT_USED(a) ((void)(a)) #endif #ifndef TX_THREAD_NOT_USED #define TX_THREAD_NOT_USED(a) ((void)(a)) #endif #ifndef TX_THREAD_ENTRY_EXIT_NOTIFY_NOT_USED #define TX_THREAD_ENTRY_EXIT_NOTIFY_NOT_USED(a) ((void)(a)) #endif /* ... */ #endif /* Determine if there is an tx_api.h extension file to include. */ #ifdef TX_THREAD_API_EXTENSION /* Yes, bring in the tx_api.h extension file. */ #include "tx_api_extension.h" /* ... */ #endif /* Define safety critical configuration and exception handling. */ #ifdef TX_SAFETY_CRITICAL /* Ensure the maximum number of priorities is defined in safety critical mode. */ #ifndef TX_MAX_PRIORITIES #error "tx_port.h: TX_MAX_PRIORITIES not defined." #endif /* Ensure the maximum number of priorities is a multiple of 32. */ #if (TX_MAX_PRIORITIES %32) != 0 #error "tx_port.h: TX_MAX_PRIORITIES must be a multiple of 32." #endif /* Ensure error checking is enabled. */ #ifdef TX_DISABLE_ERROR_CHECKING #error "TX_DISABLE_ERROR_CHECKING must not be defined." #endif /* Ensure timer ISR processing is not defined. */ #ifdef TX_TIMER_PROCESS_IN_ISR #error "TX_TIMER_PROCESS_IN_ISR must not be defined." #endif /* Ensure timer reactivation in-line is not defined. */ #ifdef TX_REACTIVATE_INLINE #error "TX_REACTIVATE_INLINE must not be defined." #endif /* Ensure disable stack filling is not defined. */ #ifdef TX_DISABLE_STACK_FILLING #error "TX_DISABLE_STACK_FILLING must not be defined." #endif /* Ensure enable stack checking is not defined. */ #ifdef TX_ENABLE_STACK_CHECKING #error "TX_ENABLE_STACK_CHECKING must not be defined." #endif /* Ensure disable preemption-threshold is not defined. */ #ifdef TX_DISABLE_PREEMPTION_THRESHOLD #error "TX_DISABLE_PREEMPTION_THRESHOLD must not be defined." #endif /* Ensure disable redundant clearing is not defined. */ #ifdef TX_DISABLE_REDUNDANT_CLEARING #error "TX_DISABLE_REDUNDANT_CLEARING must not be defined." #endif /* Ensure no timer is not defined. */ #ifdef TX_NO_TIMER #error "TX_NO_TIMER must not be defined." #endif /* Ensure disable notify callbacks is not defined. */ #ifdef TX_DISABLE_NOTIFY_CALLBACKS #error "TX_DISABLE_NOTIFY_CALLBACKS must not be defined." #endif /* Ensure in-line thread suspend/resume is not defined. */ #ifdef TX_INLINE_THREAD_RESUME_SUSPEND #error "TX_INLINE_THREAD_RESUME_SUSPEND must not be defined." #endif /* Ensure not interruptable is not defined. */ #ifdef TX_NOT_INTERRUPTABLE #error "TX_NOT_INTERRUPTABLE must not be defined." #endif /* Ensure event trace enable is not defined. */ #ifdef TX_ENABLE_EVENT_TRACE #error "TX_ENABLE_EVENT_TRACE must not be defined." #endif /* Ensure block pool performance info enable is not defined. */ #ifdef TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO #error "TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO must not be defined." #endif /* Ensure byte pool performance info enable is not defined. */ #ifdef TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO #error "TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO must not be defined." #endif /* Ensure event flag performance info enable is not defined. */ #ifdef TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO #error "TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO must not be defined." #endif /* Ensure mutex performance info enable is not defined. */ #ifdef TX_MUTEX_ENABLE_PERFORMANCE_INFO #error "TX_MUTEX_ENABLE_PERFORMANCE_INFO must not be defined." #endif /* Ensure queue performance info enable is not defined. */ #ifdef TX_QUEUE_ENABLE_PERFORMANCE_INFO #error "TX_QUEUE_ENABLE_PERFORMANCE_INFO must not be defined." #endif /* Ensure semaphore performance info enable is not defined. */ #ifdef TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO #error "TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO must not be defined." #endif /* Ensure thread performance info enable is not defined. */ #ifdef TX_THREAD_ENABLE_PERFORMANCE_INFO #error "TX_THREAD_ENABLE_PERFORMANCE_INFO must not be defined." #endif /* Ensure timer performance info enable is not defined. */ #ifdef TX_TIMER_ENABLE_PERFORMANCE_INFO #error "TX_TIMER_ENABLE_PERFORMANCE_INFO must not be defined." #endif /* Now define the safety critical exception handler. */ VOID _tx_safety_critical_exception_handler(CHAR *file_name, INT line_number, UINT status); #ifndef TX_SAFETY_CRITICAL_EXCEPTION #define TX_SAFETY_CRITICAL_EXCEPTION(a, b, c) _tx_safety_critical_exception_handler(a, b, c); #endif #ifndef TX_SAFETY_CRITICAL_EXCEPTION_HANDLER #define TX_SAFETY_CRITICAL_EXCEPTION_HANDLER VOID _tx_safety_critical_exception_handler(CHAR *file_name, INT line_number, UINT status) \ { \ while(1) \ { \ ...} \ ...}... /* ... */#endif/* ... */ #endif #ifdef TX_ENABLE_MULTI_ERROR_CHECKING /* Define ThreadX API MULTI run-time error checking function. */ void __ghs_rnerr(char *errMsg, int stackLevels, int stackTraceDisplay, void *hexVal); /* ... */ #endif /* Bring in the event logging constants and prototypes. Note that TX_ENABLE_EVENT_LOGGING must be defined when building the ThreadX library components in order to enable event logging. *//* ... */ #ifdef TX_ENABLE_EVENT_LOGGING #include "tx_el.h" #else #ifndef TX_SOURCE_CODE #ifndef TX_MISRA_ENABLE #define _tx_el_user_event_insert(a,b,c,d,e) #endif/* ... */ #endif #define TX_EL_INITIALIZE #define TX_EL_THREAD_REGISTER(a) #define TX_EL_THREAD_UNREGISTER(a) #define TX_EL_THREAD_STATUS_CHANGE_INSERT(a, b) #define TX_EL_BYTE_ALLOCATE_INSERT #define TX_EL_BYTE_POOL_CREATE_INSERT #define TX_EL_BYTE_POOL_DELETE_INSERT #define TX_EL_BYTE_RELEASE_INSERT #define TX_EL_BLOCK_ALLOCATE_INSERT #define TX_EL_BLOCK_POOL_CREATE_INSERT #define TX_EL_BLOCK_POOL_DELETE_INSERT #define TX_EL_BLOCK_RELEASE_INSERT #define TX_EL_EVENT_FLAGS_CREATE_INSERT #define TX_EL_EVENT_FLAGS_DELETE_INSERT #define TX_EL_EVENT_FLAGS_GET_INSERT #define TX_EL_EVENT_FLAGS_SET_INSERT #define TX_EL_INTERRUPT_CONTROL_INSERT #define TX_EL_QUEUE_CREATE_INSERT #define TX_EL_QUEUE_DELETE_INSERT #define TX_EL_QUEUE_FLUSH_INSERT #define TX_EL_QUEUE_RECEIVE_INSERT #define TX_EL_QUEUE_SEND_INSERT #define TX_EL_SEMAPHORE_CREATE_INSERT #define TX_EL_SEMAPHORE_DELETE_INSERT #define TX_EL_SEMAPHORE_GET_INSERT #define TX_EL_SEMAPHORE_PUT_INSERT #define TX_EL_THREAD_CREATE_INSERT #define TX_EL_THREAD_DELETE_INSERT #define TX_EL_THREAD_IDENTIFY_INSERT #define TX_EL_THREAD_PREEMPTION_CHANGE_INSERT #define TX_EL_THREAD_PRIORITY_CHANGE_INSERT #define TX_EL_THREAD_RELINQUISH_INSERT #define TX_EL_THREAD_RESUME_INSERT #define TX_EL_THREAD_SLEEP_INSERT #define TX_EL_THREAD_SUSPEND_INSERT #define TX_EL_THREAD_TERMINATE_INSERT #define TX_EL_THREAD_TIME_SLICE_CHANGE_INSERT #define TX_EL_TIME_GET_INSERT #define TX_EL_TIME_SET_INSERT #define TX_EL_TIMER_ACTIVATE_INSERT #define TX_EL_TIMER_CHANGE_INSERT #define TX_EL_TIMER_CREATE_INSERT #define TX_EL_TIMER_DEACTIVATE_INSERT #define TX_EL_TIMER_DELETE_INSERT #define TX_EL_BLOCK_POOL_INFO_GET_INSERT #define TX_EL_BLOCK_POOL_PRIORITIZE_INSERT #define TX_EL_BYTE_POOL_INFO_GET_INSERT #define TX_EL_BYTE_POOL_PRIORITIZE_INSERT #define TX_EL_EVENT_FLAGS_INFO_GET_INSERT #define TX_EL_MUTEX_CREATE_INSERT #define TX_EL_MUTEX_DELETE_INSERT #define TX_EL_MUTEX_GET_INSERT #define TX_EL_MUTEX_INFO_GET_INSERT #define TX_EL_MUTEX_PRIORITIZE_INSERT #define TX_EL_MUTEX_PUT_INSERT #define TX_EL_QUEUE_INFO_GET_INSERT #define TX_EL_QUEUE_FRONT_SEND_INSERT #define TX_EL_QUEUE_PRIORITIZE_INSERT #define TX_EL_SEMAPHORE_INFO_GET_INSERT #define TX_EL_SEMAPHORE_PRIORITIZE_INSERT #define TX_EL_THREAD_INFO_GET_INSERT #define TX_EL_THREAD_WAIT_ABORT_INSERT #define TX_EL_TIMER_INFO_GET_INSERT #define TX_EL_BLOCK_POOL_PERFORMANCE_INFO_GET_INSERT #define TX_EL_BLOCK_POOL_PERFORMANCE_SYSTEM_INFO_GET_INSERT #define TX_EL_BYTE_POOL_PERFORMANCE_INFO_GET_INSERT #define TX_EL_BYTE_POOL_PERFORMANCE_SYSTEM_INFO_GET_INSERT #define TX_EL_EVENT_FLAGS_PERFORMANCE_INFO_GET_INSERT #define TX_EL_EVENT_FLAGS__PERFORMANCE_SYSTEM_INFO_GET_INSERT #define TX_EL_EVENT_FLAGS_SET_NOTIFY_INSERT #define TX_EL_MUTEX_PERFORMANCE_INFO_GET_INSERT #define TX_EL_MUTEX_PERFORMANCE_SYSTEM_INFO_GET_INSERT #define TX_EL_QUEUE_PERFORMANCE_INFO_GET_INSERT #define TX_EL_QUEUE_PERFORMANCE_SYSTEM_INFO_GET_INSERT #define TX_EL_QUEUE_SEND_NOTIFY_INSERT #define TX_EL_SEMAPHORE_CEILING_PUT_INSERT #define TX_EL_SEMAPHORE_PERFORMANCE_INFO_GET_INSERT #define TX_EL_SEMAPHORE_PERFORMANCE_SYSTEM_INFO_GET_INSERT #define TX_EL_SEMAPHORE_PUT_NOTIFY_INSERT #define TX_EL_THREAD_ENTRY_EXIT_NOTIFY_INSERT #define TX_EL_THREAD_RESET_INSERT #define TX_EL_THREAD_PERFORMANCE_INFO_GET_INSERT #define TX_EL_THREAD_PERFORMANCE_SYSTEM_INFO_GET_INSERT #define TX_EL_THREAD_STACK_ERROR_NOTIFY_INSERT #define TX_EL_TIMER_PERFORMANCE_INFO_GET_INSERT #define TX_EL_TIMER_PERFORMANCE_SYSTEM_INFO_GET_INSERT 86 defines /* ... */#endif /* Define the get system state macro. By default, it simply maps to the variable _tx_thread_system_state. */ /* Note that prior to Azure RTOS 6.1, this symbol was defined in tx_thread.h. */ #ifndef TX_THREAD_GET_SYSTEM_STATE #define TX_THREAD_GET_SYSTEM_STATE() _tx_thread_system_state #endif /* Determine if a C++ compiler is being used. If so, complete the standard C conditional started above. *//* ... */ #ifdef __cplusplus }extern "C" { ... } #endif /* ... */ #endif