📄 tx_api.h
字号:
struct TX_THREAD_STRUCT
*tx_mutex_suspension_list;
ULONG 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. */
ULONG 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. */
ULONG tx_queue_capacity;
/* Define the current number of messages enqueue and the available
queue storage space. */
ULONG tx_queue_enqueued;
ULONG 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;
ULONG 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 *);
#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;
ULONG 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 *);
#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
#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
#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_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_user_event_insert _tx_trace_user_event_insert
#else
/* Services with error checking. */
#define tx_kernel_enter _tx_initialize_kernel_enter
#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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -