📄 tx_api.h
字号:
/* 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. */
VOID *tx_thread_filex_ptr;
/* 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_original_priority;
UINT tx_thread_original_preempt_threshold;
ULONG 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
#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 *, UINT);
#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 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. */
ULONG tx_block_pool_available;
/* Save the initial number of blocks. */
ULONG 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. */
ULONG 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;
ULONG 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;
/* 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. */
ULONG 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;
ULONG 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;
ULONG 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 *);
#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;
/* 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. */
ULONG 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 and
threshold. */
UINT tx_mutex_original_priority;
UINT tx_mutex_original_threshold;
/* Define the mutex suspension list head along with a count of
how many threads are suspended. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -