Release 6.1.9

This commit is contained in:
Yuxin Zhou
2021-10-14 00:51:26 +00:00
parent 215df45d4b
commit 1af8404c54
1812 changed files with 60698 additions and 249862 deletions

View File

@@ -26,7 +26,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */
/* */
/* tx_api.h PORTABLE SMP */
/* 6.1.8 */
/* 6.1.9 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
@@ -64,6 +64,9 @@
/* 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 */
/* */
/**************************************************************************/
@@ -106,13 +109,13 @@ extern "C" {
/* Define basic constants for the ThreadX kernel. */
/* Define the major/minor version information that can be used by the application
/* 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 8
#define THREADX_PATCH_VERSION 9
/* Define the following symbol for backward compatibility */
#define EL_PRODUCT_THREADX
@@ -219,16 +222,16 @@ extern "C" {
#endif
/* Event numbers 0 through 4095 are reserved by Azure RTOS. Specific event assignments are:
ThreadX events: 1-199
/* 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
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 */
@@ -254,7 +257,7 @@ extern "C" {
/* 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
@@ -263,10 +266,10 @@ extern "C" {
/* Define the control block definitions for all system objects. */
/* Define the basic timer management structures. These are the structures
/* 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,
/* Determine if the internal timer control block has an extension defined. If not,
define the extension to whitespace. */
#ifndef TX_TIMER_INTERNAL_EXTENSION
@@ -311,7 +314,7 @@ typedef struct TX_TIMER_INTERNAL_STRUCT
} TX_TIMER_INTERNAL;
/* Determine if the timer control block has an extension defined. If not,
/* Determine if the timer control block has an extension defined. If not,
define the extension to whitespace. */
#ifndef TX_TIMER_EXTENSION
@@ -363,7 +366,7 @@ typedef struct TX_TIMER_STRUCT
} TX_TIMER;
/* Determine if the thread priority change extension is defined. If not, define the
/* Determine if the thread priority change extension is defined. If not, define the
extension to whitespace. */
#ifndef TX_THREAD_PRIORITY_CHANGE_EXTENSION
@@ -378,7 +381,7 @@ typedef struct TX_TIMER_STRUCT
typedef struct TX_THREAD_STRUCT
{
/* The first section of the control block contains critical
information that is referenced by the port-specific
information that is referenced by the port-specific
assembly language code. Any changes in this section could
necessitate changes in the assembly language. */
@@ -398,38 +401,38 @@ typedef struct TX_THREAD_STRUCT
/***************************************************************/
/* Define the first port extension in the thread control block. This
/* 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,
/* 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
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
/* 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
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;
@@ -441,11 +444,11 @@ typedef struct TX_THREAD_STRUCT
UINT tx_thread_suspend_option;
UINT tx_thread_suspend_status;
/* Define the second port extension in the thread control block. This
/* 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
/* Define pointers to the next and previous threads in the
created list. */
struct TX_THREAD_STRUCT
*tx_thread_created_next,
@@ -454,12 +457,12 @@ typedef struct TX_THREAD_STRUCT
/************* Define ThreadX SMP thread control block extensions. *************/
UINT tx_thread_smp_core_mapped;
ULONG tx_thread_smp_core_control;
ULONG tx_thread_smp_core_control;
UINT tx_thread_smp_core_executing;
/************* End of ThreadX SMP thread control block extensions. *************/
/* Define the third port extension in the thread control block. This
/* Define the third port extension in the thread control block. This
is typically defined to whitespace in tx_port.h. */
TX_THREAD_EXTENSION_2
@@ -475,14 +478,14 @@ typedef struct TX_THREAD_STRUCT
#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
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
@@ -496,7 +499,7 @@ typedef struct TX_THREAD_STRUCT
/* 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
/* Define the number of times this thread is preempted by calling
a ThreadX API service. */
ULONG tx_thread_performance_solicited_preemption_count;
@@ -531,22 +534,22 @@ typedef struct TX_THREAD_STRUCT
#ifndef TX_DISABLE_NOTIFY_CALLBACKS
/* Define the application callback routine used to notify the application when
/* 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
/* 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 suspension sequence number. This is used to ensure suspension is still valid when
/* 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
/* 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
@@ -608,14 +611,14 @@ typedef struct TX_BLOCK_POOL_STRUCT
ULONG tx_block_pool_performance_timeout_count;
#endif
/* Define the port extension in the block pool control block. This
/* 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
/* Determine if the byte allocate extension is defined. If not, define the
extension to whitespace. */
#ifndef TX_BYTE_ALLOCATE_EXTENSION
@@ -623,7 +626,7 @@ typedef struct TX_BLOCK_POOL_STRUCT
#endif
/* Determine if the byte release extension is defined. If not, define the
/* Determine if the byte release extension is defined. If not, define the
extension to whitespace. */
#ifndef TX_BYTE_RELEASE_EXTENSION
@@ -703,7 +706,7 @@ typedef struct TX_BYTE_POOL_STRUCT
ULONG tx_byte_pool_performance_timeout_count;
#endif
/* Define the port extension in the byte pool control block. This
/* Define the port extension in the byte pool control block. This
is typically defined to whitespace in tx_port.h. */
TX_BYTE_POOL_EXTENSION
@@ -721,7 +724,7 @@ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT
/* 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
/* 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;
@@ -760,19 +763,19 @@ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT
#ifndef TX_DISABLE_NOTIFY_CALLBACKS
/* Define the application callback routine used to notify the application when
/* 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
/* 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
/* Determine if the mutex put extension 1 is defined. If not, define the
extension to whitespace. */
#ifndef TX_MUTEX_PUT_EXTENSION_1
@@ -780,7 +783,7 @@ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT
#endif
/* Determine if the mutex put extension 2 is defined. If not, define the
/* Determine if the mutex put extension 2 is defined. If not, define the
extension to whitespace. */
#ifndef TX_MUTEX_PUT_EXTENSION_2
@@ -788,7 +791,7 @@ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT
#endif
/* Determine if the mutex priority change extension is defined. If not, define the
/* Determine if the mutex priority change extension is defined. If not, define the
extension to whitespace. */
#ifndef TX_MUTEX_PRIORITY_CHANGE_EXTENSION
@@ -862,7 +865,7 @@ typedef struct TX_MUTEX_STRUCT
ULONG tx_mutex_performance__priority_inheritance_count;
#endif
/* Define the port extension in the mutex control block. This
/* Define the port extension in the mutex control block. This
is typically defined to whitespace in tx_port.h. */
TX_MUTEX_EXTENSION
@@ -891,7 +894,7 @@ typedef struct TX_QUEUE_STRUCT
UINT tx_queue_enqueued;
UINT tx_queue_available_storage;
/* Define pointers that represent the start and end for the queue's
/* Define pointers that represent the start and end for the queue's
message area. */
ULONG *tx_queue_start;
ULONG *tx_queue_end;
@@ -936,12 +939,12 @@ typedef struct TX_QUEUE_STRUCT
#ifndef TX_DISABLE_NOTIFY_CALLBACKS
/* Define the application callback routine used to notify the application when
/* 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
/* Define the port extension in the queue control block. This
is typically defined to whitespace in tx_port.h. */
TX_QUEUE_EXTENSION
@@ -991,12 +994,12 @@ typedef struct TX_SEMAPHORE_STRUCT
#ifndef TX_DISABLE_NOTIFY_CALLBACKS
/* Define the application callback routine used to notify the application when
/* 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
/* Define the port extension in the semaphore control block. This
is typically defined to whitespace in tx_port.h. */
TX_SEMAPHORE_EXTENSION
@@ -1042,7 +1045,7 @@ ULONG _tx_thread_smp_current_state_get(void);
ULONG _tx_thread_smp_time_get(void);
/* Determine if SMP Debug is selected. If so, the function prototype is setup. Otherwise, the debug call is
/* Determine if SMP Debug is selected. If so, the function prototype is setup. Otherwise, the debug call is
simply mapped to whitespace. */
#ifdef TX_THREAD_SMP_DEBUG_ENABLE
@@ -1063,17 +1066,17 @@ void _tx_thread_smp_debug_entry_insert(ULONG id, ULONG suspend, VOID *thr
/************* End of ThreadX SMP function prototypes and remapping. *************/
/* Define the system API mappings based on the error checking
selected by the user. Note: this section is only applicable to
/* 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
/* 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.
functions to the core functions that actually perform the work.
Note: error checking is enabled by default. */
#ifdef TX_DISABLE_ERROR_CHECKING
@@ -1463,8 +1466,8 @@ UINT _tx_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG
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,
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);
@@ -1474,15 +1477,15 @@ 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
/* 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,
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);
@@ -1495,8 +1498,8 @@ UINT _tx_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG m
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,
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);
@@ -1506,7 +1509,7 @@ 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
/* 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,
@@ -1514,8 +1517,8 @@ UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG
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,
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);
@@ -1527,29 +1530,29 @@ UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_p
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,
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 _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
/* 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,
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 _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));
@@ -1564,8 +1567,8 @@ VOID _tx_initialize_kernel_enter(VOID);
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,
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);
@@ -1575,14 +1578,14 @@ 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
/* 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,
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);
@@ -1590,7 +1593,7 @@ UINT _txe_mutex_put(TX_MUTEX *mutex_ptr);
/* Define queue management function prototypes. */
UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size,
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);
@@ -1607,10 +1610,10 @@ UINT _tx_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)
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
/* 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,
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);
@@ -1629,8 +1632,8 @@ 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,
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);
@@ -1640,15 +1643,15 @@ 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
/* 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,
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);
@@ -1659,19 +1662,19 @@ UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaph
VOID _tx_thread_context_save(VOID);
VOID _tx_thread_context_restore(VOID);
UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr,
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,
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,
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,
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,
@@ -1693,18 +1696,18 @@ UINT _tx_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_s
UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr);
/* Define error checking shells for API services. These are only referenced by the
/* 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,
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,
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,
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);
@@ -1723,12 +1726,12 @@ UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr);
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,
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,
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);
@@ -1739,17 +1742,17 @@ 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
/* 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,
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,
UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks,
ULONG *reschedule_ticks, TX_TIMER **next_timer);
@@ -1769,13 +1772,13 @@ 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.
/* 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
@@ -1783,7 +1786,7 @@ UINT _tx_trace_interrupt_control(UINT new_posture);
#endif
/* Add a default macro that can be re-defined in tx_port.h to add processing to the initialize kernel enter function.
/* 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

View File

@@ -12,7 +12,7 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** */
/** ThreadX Component */
/** */
/** Block Memory */
@@ -21,27 +21,29 @@
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_block_pool.h PORTABLE C */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_block_pool.h PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX block memory management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This file defines the ThreadX block memory management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -54,12 +56,12 @@
#define TX_BLOCK_POOL_ID ((ULONG) 0x424C4F43)
/* Determine if in-line component initialization is supported by the
/* Determine if in-line component initialization is supported by the
caller. */
#ifdef TX_INVOKE_INLINE_INITIALIZATION
/* Yes, in-line initialization is supported, remap the block memory pool
/* Yes, in-line initialization is supported, remap the block memory pool
initialization function. */
#ifndef TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO
@@ -95,7 +97,7 @@ VOID _tx_block_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_seque
make them extern so other functions in the component can access them. */
#ifdef TX_BLOCK_POOL_INIT
#define BLOCK_POOL_DECLARE
#define BLOCK_POOL_DECLARE
#else
#define BLOCK_POOL_DECLARE extern
#endif

View File

@@ -12,7 +12,7 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** */
/** ThreadX Component */
/** */
/** Byte Memory */
@@ -21,27 +21,29 @@
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_byte_pool.h PORTABLE C */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_byte_pool.h PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX byte memory management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This file defines the ThreadX byte memory management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -66,12 +68,12 @@
#endif
/* Determine if in-line component initialization is supported by the
/* Determine if in-line component initialization is supported by the
caller. */
#ifdef TX_INVOKE_INLINE_INITIALIZATION
/* Yes, in-line initialization is supported, remap the byte memory pool
/* Yes, in-line initialization is supported, remap the byte memory pool
initialization function. */
#ifndef TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO
@@ -111,7 +113,7 @@ VOID _tx_byte_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequen
make them extern so other functions in the component can access them. */
#ifdef TX_BYTE_POOL_INIT
#define BYTE_POOL_DECLARE
#define BYTE_POOL_DECLARE
#else
#define BYTE_POOL_DECLARE extern
#endif

View File

@@ -12,7 +12,7 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** */
/** ThreadX Component */
/** */
/** Event Flags */
@@ -21,27 +21,29 @@
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_event_flags.h PORTABLE C */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_event_flags.h PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX event flags management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This file defines the ThreadX event flags management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -56,11 +58,11 @@
#define TX_EVENT_FLAGS_CLEAR_MASK ((UINT) 0x1)
/* Determine if in-line component initialization is supported by the
/* Determine if in-line component initialization is supported by the
caller. */
#ifdef TX_INVOKE_INLINE_INITIALIZATION
/* Yes, in-line initialization is supported, remap the event flag initialization
/* Yes, in-line initialization is supported, remap the event flag initialization
function. */
#ifndef TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO
@@ -96,7 +98,7 @@ VOID _tx_event_flags_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequ
make them extern so other functions in the component can access them. */
#ifdef TX_EVENT_FLAGS_INIT
#define EVENT_FLAGS_DECLARE
#define EVENT_FLAGS_DECLARE
#else
#define EVENT_FLAGS_DECLARE extern
#endif

View File

@@ -12,7 +12,7 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** */
/** ThreadX Component */
/** */
/** Initialize */
@@ -21,27 +21,29 @@
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_initialize.h PORTABLE C */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_initialize.h PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX initialization component, including */
/* */
/* This file defines the ThreadX initialization component, including */
/* data types and external references. It is assumed that tx_api.h */
/* and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -65,15 +67,15 @@ VOID _tx_initialize_low_level(VOID);
/* Define the macro for adding additional port-specific global data. This macro is defined
as white space, unless defined by tx_port.h. */
#ifndef TX_PORT_SPECIFIC_DATA
#define TX_PORT_SPECIFIC_DATA
#endif
/* Define the macro for adding additional port-specific pre and post initialization processing.
/* Define the macro for adding additional port-specific pre and post initialization processing.
These macros is defined as white space, unless defined by tx_port.h. */
#ifndef TX_PORT_SPECIFIC_PRE_INITIALIZATION
#define TX_PORT_SPECIFIC_PRE_INITIALIZATION
#endif
@@ -94,15 +96,15 @@ VOID _tx_initialize_low_level(VOID);
make them extern so other functions in the component can access them. */
#ifdef TX_INITIALIZE_INIT
#define INITIALIZE_DECLARE
#define INITIALIZE_DECLARE
#else
#define INITIALIZE_DECLARE extern
#endif
/* Define the unused memory pointer. The value of the first available
/* Define the unused memory pointer. The value of the first available
memory address is placed in this variable in the low-level
initialization function. The content of this variable is passed
initialization function. The content of this variable is passed
to the application's system definition function. */
INITIALIZE_DECLARE VOID *_tx_initialize_unused_memory;

View File

@@ -12,7 +12,7 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** */
/** ThreadX Component */
/** */
/** Mutex */
@@ -21,27 +21,29 @@
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_mutex.h PORTABLE C */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_mutex.h PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX mutex management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This file defines the ThreadX mutex management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -54,18 +56,18 @@
#define TX_MUTEX_ID ((ULONG) 0x4D555445)
/* Determine if in-line component initialization is supported by the
/* Determine if in-line component initialization is supported by the
caller. */
#ifdef TX_INVOKE_INLINE_INITIALIZATION
/* Yes, in-line initialization is supported, remap the mutex initialization
/* Yes, in-line initialization is supported, remap the mutex initialization
function. */
#ifndef TX_MUTEX_ENABLE_PERFORMANCE_INFO
#define _tx_mutex_initialize() \
_tx_mutex_created_ptr = TX_NULL; \
_tx_mutex_created_count = TX_EMPTY
_tx_mutex_created_count = TX_EMPTY
#else
#define _tx_mutex_initialize() \
_tx_mutex_created_ptr = TX_NULL; \
@@ -75,7 +77,7 @@
_tx_mutex_performance_suspension_count = ((ULONG) 0); \
_tx_mutex_performance_timeout_count = ((ULONG) 0); \
_tx_mutex_performance_priority_inversion_count = ((ULONG) 0); \
_tx_mutex_performance__priority_inheritance_count = ((ULONG) 0)
_tx_mutex_performance__priority_inheritance_count = ((ULONG) 0)
#endif
#define TX_MUTEX_INIT
#else
@@ -99,7 +101,7 @@ VOID _tx_mutex_priority_change(TX_THREAD *thread_ptr, UINT new_priority);
make them extern so other functions in the component can access them. */
#ifdef TX_MUTEX_INIT
#define MUTEX_DECLARE
#define MUTEX_DECLARE
#else
#define MUTEX_DECLARE extern
#endif

View File

@@ -12,7 +12,7 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** */
/** ThreadX Component */
/** */
/** Queue */
@@ -21,27 +21,29 @@
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_queue.h PORTABLE C */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_queue.h PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX queue management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This file defines the ThreadX queue management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -54,23 +56,23 @@
#define TX_QUEUE_ID ((ULONG) 0x51554555)
/* Determine if in-line component initialization is supported by the
/* Determine if in-line component initialization is supported by the
caller. */
#ifdef TX_INVOKE_INLINE_INITIALIZATION
/* Yes, in-line initialization is supported, remap the queue initialization
/* Yes, in-line initialization is supported, remap the queue initialization
function. */
#ifndef TX_QUEUE_ENABLE_PERFORMANCE_INFO
#define _tx_queue_initialize() \
_tx_queue_created_ptr = TX_NULL; \
_tx_queue_created_count = TX_EMPTY
_tx_queue_created_count = TX_EMPTY
#else
#define _tx_queue_initialize() \
_tx_queue_created_ptr = TX_NULL; \
_tx_queue_created_count = TX_EMPTY; \
_tx_queue_performance_messages_sent_count = ((ULONG) 0); \
_tx_queue_performance__messages_received_count = ((ULONG) 0); \
_tx_queue_performance__messages_received_count = ((ULONG) 0); \
_tx_queue_performance_empty_suspension_count = ((ULONG) 0); \
_tx_queue_performance_full_suspension_count = ((ULONG) 0); \
_tx_queue_performance_timeout_count = ((ULONG) 0)
@@ -83,7 +85,7 @@ VOID _tx_queue_initialize(VOID);
#endif
/* Define the message copy macro. Note that the source and destination
/* Define the message copy macro. Note that the source and destination
pointers must be modified since they are used subsequently. */
#ifndef TX_QUEUE_MESSAGE_COPY
@@ -111,7 +113,7 @@ VOID _tx_queue_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
make them extern so other functions in the component can access them. */
#ifdef TX_QUEUE_INIT
#define QUEUE_DECLARE
#define QUEUE_DECLARE
#else
#define QUEUE_DECLARE extern
#endif

View File

@@ -12,7 +12,7 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** */
/** ThreadX Component */
/** */
/** Semaphore */
@@ -21,27 +21,29 @@
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_semaphore.h PORTABLE C */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_semaphore.h PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX semaphore management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This file defines the ThreadX semaphore management component, */
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -54,15 +56,15 @@
#define TX_SEMAPHORE_ID ((ULONG) 0x53454D41)
/* Determine if in-line component initialization is supported by the
/* Determine if in-line component initialization is supported by the
caller. */
#ifdef TX_INVOKE_INLINE_INITIALIZATION
/* Yes, in-line initialization is supported, remap the
/* Yes, in-line initialization is supported, remap the
semaphore initialization function. */
#ifndef TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO
#define _tx_semaphore_initialize() \
_tx_semaphore_created_ptr = TX_NULL; \
_tx_semaphore_created_count = TX_EMPTY
_tx_semaphore_created_count = TX_EMPTY
#else
#define _tx_semaphore_initialize() \
_tx_semaphore_created_ptr = TX_NULL; \
@@ -74,7 +76,7 @@
#endif
#define TX_SEMAPHORE_INIT
#else
/* No in-line initialization is supported, use standard
/* No in-line initialization is supported, use standard
function call. */
VOID _tx_semaphore_initialize(VOID);
#endif
@@ -92,7 +94,7 @@ VOID _tx_semaphore_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequen
make them extern so other functions in the component can access them. */
#ifdef TX_SEMAPHORE_INIT
#define SEMAPHORE_DECLARE
#define SEMAPHORE_DECLARE
#else
#define SEMAPHORE_DECLARE extern
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** */
/** ThreadX Component */
/** */
/** Timer */
@@ -21,24 +21,24 @@
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_timer.h PORTABLE SMP */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_timer.h PORTABLE SMP */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX timer management component, including */
/* */
/* This file defines the ThreadX timer management component, including */
/* data types and external references. It is assumed that tx_api.h */
/* and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -73,14 +73,14 @@ VOID _tx_timer_thread_entry(ULONG timer_thread_input);
#define TIMER_DECLARE extern
/* Define the system clock value that is continually incremented by the
/* Define the system clock value that is continually incremented by the
periodic timer interrupt processing. */
TIMER_DECLARE volatile ULONG _tx_timer_system_clock;
/* Define the current time slice value. If non-zero, a time-slice is active.
Otherwise, the time_slice is not active. There is one of these entries
Otherwise, the time_slice is not active. There is one of these entries
per core. */
TIMER_DECLARE ULONG _tx_timer_time_slice[TX_THREAD_SMP_MAX_CORES];
@@ -116,7 +116,7 @@ TIMER_DECLARE TX_TIMER_INTERNAL **_tx_timer_list_end;
TIMER_DECLARE TX_TIMER_INTERNAL **_tx_timer_current_ptr;
/* Define the timer expiration flag. This is used to indicate that a timer
/* Define the timer expiration flag. This is used to indicate that a timer
has expired. */
TIMER_DECLARE UINT _tx_timer_expired;
@@ -195,14 +195,16 @@ TIMER_DECLARE ULONG _tx_timer_performance_expiration_count;
/* Define the total number of timer expiration adjustments. These are required
if the expiration time is greater than the size of the timer list. In such
cases, the timer is placed at the end of the list and then reactivated
if the expiration time is greater than the size of the timer list. In such
cases, the timer is placed at the end of the list and then reactivated
as many times as necessary to finally achieve the resulting timeout. */
TIMER_DECLARE ULONG _tx_timer_performance__expiration_adjust_count;
#endif
/* Define default post timer delete macro to whitespace, if it hasn't been defined previously (typically in tx_port.h). */
#ifndef TX_TIMER_DELETE_PORT_COMPLETION
@@ -211,4 +213,3 @@ TIMER_DECLARE ULONG _tx_timer_performance__expiration_adjust_count;
#endif

View File

@@ -12,35 +12,37 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** ThreadX Component */
/** */
/** Trace */
/** */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_trace.h PORTABLE SMP */
/**************************************************************************/
/* */
/* COMPONENT DEFINITION RELEASE */
/* */
/* tx_trace.h PORTABLE SMP */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This file defines the ThreadX trace component, including constants */
/* and structure definitions as well as external references. It is */
/* */
/* This file defines the ThreadX trace component, including constants */
/* and structure definitions as well as external references. It is */
/* assumed that tx_api.h and tx_port.h have already been included. */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
@@ -55,10 +57,10 @@
macros to whitespace. */
#ifndef TX_ENABLE_EVENT_TRACE
#define TX_TRACE_INITIALIZE
#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b)
#define TX_TRACE_OBJECT_UNREGISTER(o)
#define TX_TRACE_IN_LINE_INSERT(i,a,b,c,d,f)
#define TX_TRACE_INITIALIZE
#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b)
#define TX_TRACE_OBJECT_UNREGISTER(o)
#define TX_TRACE_IN_LINE_INSERT(i,a,b,c,d,f)
#else
/* Event tracing is enabled. */
@@ -76,8 +78,8 @@
#endif
/* Define the default clock source for trace event entry time stamp. The following two item are port specific.
For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
/* Define the default clock source for trace event entry time stamp. The following two item are port specific.
For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -99,8 +101,8 @@
/* ThreadX Trace Description. The ThreadX Trace feature is designed to capture
events in real-time in a circular event buffer. This buffer may be analyzed by other
tools. The high-level format of the Trace structure is:
events in real-time in a circular event buffer. This buffer may be analyzed by other
tools. The high-level format of the Trace structure is:
[Trace Control Header ]
[Trace Object Registry - Entry 0 ]
@@ -113,23 +115,23 @@
*/
/* Trace Control Header. The Trace Control Header contains information that
defines the format of the Trace Object Registry as well as the location and
current entry of the Trace Buffer itself. The high-level format of the
/* Trace Control Header. The Trace Control Header contains information that
defines the format of the Trace Object Registry as well as the location and
current entry of the Trace Buffer itself. The high-level format of the
Trace Control Header is:
Entry Size Description
[Trace ID] 4 This 4-byte field contains the ThreadX Trace
Identification. If the trace buffer is valid, the
contents are 0x54585442 (TXTB). Since it is written as
contents are 0x54585442 (TXTB). Since it is written as
a 32-bit unsigned word, this value is also used to
determine if the event trace information is in
determine if the event trace information is in
little or big endian format.
[Timer Valid Mask] 4 Mask of valid bits in the 32-bit time stamp. This
[Timer Valid Mask] 4 Mask of valid bits in the 32-bit time stamp. This
enables use of 32, 24, 16, or event 8-bit timers.
If the time source is 32-bits, the mask is
0xFFFFFFFF. If the time source is 16-bits, the
If the time source is 32-bits, the mask is
0xFFFFFFFF. If the time source is 16-bits, the
mask is 0x0000FFFF.
[Trace Base Address] 4 The base address for all trace pointer. Subtracting
the pointer and this address will yield the proper
@@ -141,7 +143,7 @@
[Trace Buffer Start Pointer] 4 Pointer to the start of the Trace Buffer Area
[Trace Buffer End Pointer] 4 Pointer to the end of the Trace Buffer Area
[Trace Buffer Current Pointer] 4 Pointer to the oldest entry in the Trace Buffer.
This entry will be overwritten on the next event and
This entry will be overwritten on the next event and
incremented to the next event (wrapping to the top
if the buffer end pointer is exceeded).
[Reserved] 4 Reserved 4 bytes, should be 0xAAAAAAAA
@@ -171,7 +173,7 @@ typedef struct TX_TRACE_HEADER_STRUCT
} TX_TRACE_HEADER;
/* Trace Object Registry. The Trace Object Registry is used to map the object pointer in the trace buffer to
/* Trace Object Registry. The Trace Object Registry is used to map the object pointer in the trace buffer to
the application's name for the object (defined during object creation in ThreadX). */
#ifndef TX_TRACE_OBJECT_REGISTRY_NAME
@@ -179,31 +181,31 @@ typedef struct TX_TRACE_HEADER_STRUCT
#endif
/* Define the object name types as well as the contents of any additional parameters that might be useful in
/* Define the object name types as well as the contents of any additional parameters that might be useful in
trace analysis. */
#define TX_TRACE_OBJECT_TYPE_NOT_VALID ((UCHAR) 0) /* Object is not valid */
#define TX_TRACE_OBJECT_TYPE_NOT_VALID ((UCHAR) 0) /* Object is not valid */
#define TX_TRACE_OBJECT_TYPE_THREAD ((UCHAR) 1) /* P1 = stack start address, P2 = stack size */
#define TX_TRACE_OBJECT_TYPE_TIMER ((UCHAR) 2) /* P1 = initial ticks, P2 = reschedule ticks */
#define TX_TRACE_OBJECT_TYPE_QUEUE ((UCHAR) 3) /* P1 = queue size, P2 = message size */
#define TX_TRACE_OBJECT_TYPE_SEMAPHORE ((UCHAR) 4) /* P1 = initial instances */
#define TX_TRACE_OBJECT_TYPE_MUTEX ((UCHAR) 5) /* P1 = priority inheritance flag */
#define TX_TRACE_OBJECT_TYPE_EVENT_FLAGS ((UCHAR) 6) /* none */
#define TX_TRACE_OBJECT_TYPE_BLOCK_POOL ((UCHAR) 7) /* P1 = total blocks, P2 = block size */
#define TX_TRACE_OBJECT_TYPE_BYTE_POOL ((UCHAR) 8) /* P1 = total bytes */
#define TX_TRACE_OBJECT_TYPE_TIMER ((UCHAR) 2) /* P1 = initial ticks, P2 = reschedule ticks */
#define TX_TRACE_OBJECT_TYPE_QUEUE ((UCHAR) 3) /* P1 = queue size, P2 = message size */
#define TX_TRACE_OBJECT_TYPE_SEMAPHORE ((UCHAR) 4) /* P1 = initial instances */
#define TX_TRACE_OBJECT_TYPE_MUTEX ((UCHAR) 5) /* P1 = priority inheritance flag */
#define TX_TRACE_OBJECT_TYPE_EVENT_FLAGS ((UCHAR) 6) /* none */
#define TX_TRACE_OBJECT_TYPE_BLOCK_POOL ((UCHAR) 7) /* P1 = total blocks, P2 = block size */
#define TX_TRACE_OBJECT_TYPE_BYTE_POOL ((UCHAR) 8) /* P1 = total bytes */
typedef struct TX_TRACE_OBJECT_ENTRY_STRUCT
{
UCHAR tx_trace_object_entry_available; /* TX_TRUE -> available */
UCHAR tx_trace_object_entry_type; /* Types defined above */
UCHAR tx_trace_object_entry_reserved1; /* Should be zero - except for thread */
UCHAR tx_trace_object_entry_reserved2; /* Should be zero - except for thread */
UCHAR tx_trace_object_entry_type; /* Types defined above */
UCHAR tx_trace_object_entry_reserved1; /* Should be zero - except for thread */
UCHAR tx_trace_object_entry_reserved2; /* Should be zero - except for thread */
ULONG tx_trace_object_entry_thread_pointer; /* ThreadX object pointer */
ULONG tx_trace_object_entry_param_1; /* Parameter value defined */
ULONG tx_trace_object_entry_param_2; /* according to type above */
UCHAR tx_trace_object_entry_name[TX_TRACE_OBJECT_REGISTRY_NAME]; /* Object name */
ULONG tx_trace_object_entry_param_1; /* Parameter value defined */
ULONG tx_trace_object_entry_param_2; /* according to type above */
UCHAR tx_trace_object_entry_name[TX_TRACE_OBJECT_REGISTRY_NAME]; /* Object name */
} TX_TRACE_OBJECT_ENTRY;
@@ -212,27 +214,27 @@ typedef struct TX_TRACE_OBJECT_ENTRY_STRUCT
Entry Size Description
[Thread Pointer] 4 This 4-byte field contains the pointer to the
ThreadX thread running that caused the event.
[Thread Pointer] 4 This 4-byte field contains the pointer to the
ThreadX thread running that caused the event.
If this field is NULL, the entry hasn't been used
yet. If this field is 0xFFFFFFFF, the event occurred
from within an ISR. If this entry is 0xF0F0F0F0, the
from within an ISR. If this entry is 0xF0F0F0F0, the
event occurred during initialization.
[Thread Priority or 4 This 4-byte field contains the current thread pointer for interrupt
Current Thread events or the thread preemption-threshold/priority for thread events.
Preemption-Threshold/
Priority]
[Event ID] 4 This 4-byte field contains the Event ID of the event. A value of
[Event ID] 4 This 4-byte field contains the Event ID of the event. A value of
0xFFFFFFFF indicates the event is invalid. All events are marked
as invalid during initialization.
[Time Stamp] 4 This 4-byte field contains the time stamp of the event.
[Information Field 1] 4 This 4-byte field contains the first 4-bytes of information
[Information Field 1] 4 This 4-byte field contains the first 4-bytes of information
specific to the event.
[Information Field 2] 4 This 4-byte field contains the second 4-bytes of information
[Information Field 2] 4 This 4-byte field contains the second 4-bytes of information
specific to the event.
[Information Field 3] 4 This 4-byte field contains the third 4-bytes of information
[Information Field 3] 4 This 4-byte field contains the third 4-bytes of information
specific to the event.
[Information Field 4] 4 This 4-byte field contains the fourth 4-bytes of information
[Information Field 4] 4 This 4-byte field contains the fourth 4-bytes of information
specific to the event.
*/
@@ -242,48 +244,48 @@ typedef struct TX_TRACE_OBJECT_ENTRY_STRUCT
/* Define ThreadX Trace Events, along with a brief description of the additional information fields,
where I1 -> Information Field 1, I2 -> Information Field 2, etc. */
/* Event numbers 0 through 4095 are reserved by Azure RTOS. Specific event assignments are:
ThreadX events: 1-199
/* 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
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
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 the basic ThreadX thread scheduling events first. */
#define TX_TRACE_THREAD_RESUME 1 /* I1 = thread ptr, I2 = previous_state, I3 = stack ptr, I4 = next thread */
#define TX_TRACE_THREAD_SUSPEND 2 /* I1 = thread ptr, I2 = new_state, I3 = stack ptr I4 = next thread */
#define TX_TRACE_ISR_ENTER 3 /* I1 = stack_ptr, I2 = ISR number, I3 = system state, I4 = preempt disable */
#define TX_TRACE_ISR_EXIT 4 /* I1 = stack_ptr, I2 = ISR number, I3 = system state, I4 = preempt disable */
#define TX_TRACE_TIME_SLICE 5 /* I1 = next thread ptr, I2 = system state, I3 = preempt disable, I4 = stack*/
#define TX_TRACE_RUNNING 6 /* None */
#define TX_TRACE_THREAD_RESUME 1 /* I1 = thread ptr, I2 = previous_state, I3 = stack ptr, I4 = next thread */
#define TX_TRACE_THREAD_SUSPEND 2 /* I1 = thread ptr, I2 = new_state, I3 = stack ptr I4 = next thread */
#define TX_TRACE_ISR_ENTER 3 /* I1 = stack_ptr, I2 = ISR number, I3 = system state, I4 = preempt disable */
#define TX_TRACE_ISR_EXIT 4 /* I1 = stack_ptr, I2 = ISR number, I3 = system state, I4 = preempt disable */
#define TX_TRACE_TIME_SLICE 5 /* I1 = next thread ptr, I2 = system state, I3 = preempt disable, I4 = stack*/
#define TX_TRACE_RUNNING 6 /* None */
/* Define the rest of the ThreadX system events. */
#define TX_TRACE_BLOCK_ALLOCATE 10 /* I1 = pool ptr, I2 = memory ptr, I3 = wait option, I4 = remaining blocks */
#define TX_TRACE_BLOCK_POOL_CREATE 11 /* I1 = pool ptr, I2 = pool_start, I3 = total blocks, I4 = block size */
#define TX_TRACE_BLOCK_POOL_DELETE 12 /* I1 = pool ptr, I2 = stack ptr */
#define TX_TRACE_BLOCK_ALLOCATE 10 /* I1 = pool ptr, I2 = memory ptr, I3 = wait option, I4 = remaining blocks */
#define TX_TRACE_BLOCK_POOL_CREATE 11 /* I1 = pool ptr, I2 = pool_start, I3 = total blocks, I4 = block size */
#define TX_TRACE_BLOCK_POOL_DELETE 12 /* I1 = pool ptr, I2 = stack ptr */
#define TX_TRACE_BLOCK_POOL_INFO_GET 13 /* I1 = pool ptr */
#define TX_TRACE_BLOCK_POOL_PERFORMANCE_INFO_GET 14 /* I1 = pool ptr */
#define TX_TRACE_BLOCK_POOL__PERFORMANCE_SYSTEM_INFO_GET 15 /* None */
#define TX_TRACE_BLOCK_POOL_PERFORMANCE_INFO_GET 14 /* I1 = pool ptr */
#define TX_TRACE_BLOCK_POOL__PERFORMANCE_SYSTEM_INFO_GET 15 /* None */
#define TX_TRACE_BLOCK_POOL_PRIORITIZE 16 /* I1 = pool ptr, I2 = suspended count, I3 = stack ptr */
#define TX_TRACE_BLOCK_RELEASE 17 /* I1 = pool ptr, I2 = memory ptr, I3 = suspended, I4 = stack ptr */
#define TX_TRACE_BYTE_ALLOCATE 20 /* I1 = pool ptr, I2 = memory ptr, I3 = size requested, I4 = wait option */
#define TX_TRACE_BYTE_POOL_CREATE 21 /* I1 = pool ptr, I2 = start ptr, I3 = pool size, I4 = stack ptr */
#define TX_TRACE_BYTE_POOL_DELETE 22 /* I1 = pool ptr, I2 = stack ptr */
#define TX_TRACE_BLOCK_RELEASE 17 /* I1 = pool ptr, I2 = memory ptr, I3 = suspended, I4 = stack ptr */
#define TX_TRACE_BYTE_ALLOCATE 20 /* I1 = pool ptr, I2 = memory ptr, I3 = size requested, I4 = wait option */
#define TX_TRACE_BYTE_POOL_CREATE 21 /* I1 = pool ptr, I2 = start ptr, I3 = pool size, I4 = stack ptr */
#define TX_TRACE_BYTE_POOL_DELETE 22 /* I1 = pool ptr, I2 = stack ptr */
#define TX_TRACE_BYTE_POOL_INFO_GET 23 /* I1 = pool ptr */
#define TX_TRACE_BYTE_POOL_PERFORMANCE_INFO_GET 24 /* I1 = pool ptr */
#define TX_TRACE_BYTE_POOL__PERFORMANCE_SYSTEM_INFO_GET 25 /* None */
#define TX_TRACE_BYTE_POOL_PRIORITIZE 26 /* I1 = pool ptr, I2 = suspended count, I3 = stack ptr */
#define TX_TRACE_BYTE_RELEASE 27 /* I1 = pool ptr, I2 = memory ptr, I3 = suspended, I4 = available bytes */
#define TX_TRACE_EVENT_FLAGS_CREATE 30 /* I1 = group ptr, I2 = stack ptr */
#define TX_TRACE_EVENT_FLAGS_DELETE 31 /* I1 = group ptr, I2 = stack ptr */
#define TX_TRACE_EVENT_FLAGS_GET 32 /* I1 = group ptr, I2 = requested flags, I3 = current flags, I4 = get option*/
#define TX_TRACE_BYTE_RELEASE 27 /* I1 = pool ptr, I2 = memory ptr, I3 = suspended, I4 = available bytes */
#define TX_TRACE_EVENT_FLAGS_CREATE 30 /* I1 = group ptr, I2 = stack ptr */
#define TX_TRACE_EVENT_FLAGS_DELETE 31 /* I1 = group ptr, I2 = stack ptr */
#define TX_TRACE_EVENT_FLAGS_GET 32 /* I1 = group ptr, I2 = requested flags, I3 = current flags, I4 = get option*/
#define TX_TRACE_EVENT_FLAGS_INFO_GET 33 /* I1 = group ptr */
#define TX_TRACE_EVENT_FLAGS_PERFORMANCE_INFO_GET 34 /* I1 = group ptr */
#define TX_TRACE_EVENT_FLAGS__PERFORMANCE_SYSTEM_INFO_GET 35 /* None */
@@ -340,7 +342,7 @@ typedef struct TX_TRACE_OBJECT_ENTRY_STRUCT
#define TX_TRACE_TIME_GET 120 /* I1 = current time, I2 = stack ptr */
#define TX_TRACE_TIME_SET 121 /* I1 = new time */
#define TX_TRACE_TIMER_ACTIVATE 122 /* I1 = timer ptr */
#define TX_TRACE_TIMER_CHANGE 123 /* I1 = timer ptr, I2 = initial ticks, I3= reschedule ticks */
#define TX_TRACE_TIMER_CHANGE 123 /* I1 = timer ptr, I2 = initial ticks, I3= reschedule ticks */
#define TX_TRACE_TIMER_CREATE 124 /* I1 = timer ptr, I2 = initial ticks, I3= reschedule ticks, I4 = enable */
#define TX_TRACE_TIMER_DEACTIVATE 125 /* I1 = timer ptr, I2 = stack ptr */
#define TX_TRACE_TIMER_DELETE 126 /* I1 = timer ptr */
@@ -379,7 +381,7 @@ typedef struct TX_TRACE_BUFFER_ENTRY_STRUCT
make them extern so other functions in the component can access them. */
#ifdef TX_TRACE_INIT
#define TRACE_DECLARE
#define TRACE_DECLARE
#else
#define TRACE_DECLARE extern
#endif
@@ -387,7 +389,7 @@ typedef struct TX_TRACE_BUFFER_ENTRY_STRUCT
/* Define the pointer to the start of the trace buffer control structure. */
TRACE_DECLARE TX_TRACE_HEADER *_tx_trace_header_ptr;
TRACE_DECLARE TX_TRACE_HEADER *_tx_trace_header_ptr;
/* Define the pointer to the start of the trace object registry area in the trace buffer. */
@@ -415,8 +417,8 @@ TRACE_DECLARE TX_TRACE_BUFFER_ENTRY *_tx_trace_buffer_end_ptr;
TRACE_DECLARE TX_TRACE_BUFFER_ENTRY *_tx_trace_buffer_current_ptr;
/* Define the trace event enable bits, where each bit represents a type of event that can be enabled
or disabled dynamically by the application. */
/* Define the trace event enable bits, where each bit represents a type of event that can be enabled
or disabled dynamically by the application. */
TRACE_DECLARE ULONG _tx_trace_event_enable_bits;
@@ -427,9 +429,9 @@ TRACE_DECLARE ULONG _tx_trace_event_enable_bits;
TRACE_DECLARE ULONG _tx_trace_simulated_time;
/* Define the function pointer used to call the application when the trace buffer wraps. If NULL,
/* Define the function pointer used to call the application when the trace buffer wraps. If NULL,
the application has not registered a callback function. */
TRACE_DECLARE VOID (*_tx_trace_full_notify_function)(VOID *buffer);
@@ -451,9 +453,9 @@ TRACE_DECLARE ULONG _tx_trace_registry_search_start
/* Define the event trace macros that are expanded in-line when event tracing is enabled. */
#ifdef TX_MISRA_ENABLE
#define TX_TRACE_INFO_FIELD_ASSIGNMENT(a,b,c,d) trace_event_ptr -> tx_trace_buffer_entry_info_1 = (ULONG) (a); trace_event_ptr -> tx_trace_buffer_entry_info_2 = (ULONG) (b); trace_event_ptr -> tx_trace_buffer_entry_info_3 = (ULONG) (c); trace_event_ptr -> tx_trace_buffer_entry_info_4 = (ULONG) (d);
#define TX_TRACE_INFO_FIELD_ASSIGNMENT(a,b,c,d) trace_event_ptr -> tx_trace_buffer_entry_info_1 = (ULONG) (a); trace_event_ptr -> tx_trace_buffer_entry_info_2 = (ULONG) (b); trace_event_ptr -> tx_trace_buffer_entry_info_3 = (ULONG) (c); trace_event_ptr -> tx_trace_buffer_entry_info_4 = (ULONG) (d);
#else
#define TX_TRACE_INFO_FIELD_ASSIGNMENT(a,b,c,d) trace_event_ptr -> tx_trace_buffer_entry_information_field_1 = (ULONG) (a); trace_event_ptr -> tx_trace_buffer_entry_information_field_2 = (ULONG) (b); trace_event_ptr -> tx_trace_buffer_entry_information_field_3 = (ULONG) (c); trace_event_ptr -> tx_trace_buffer_entry_information_field_4 = (ULONG) (d);
#define TX_TRACE_INFO_FIELD_ASSIGNMENT(a,b,c,d) trace_event_ptr -> tx_trace_buffer_entry_information_field_1 = (ULONG) (a); trace_event_ptr -> tx_trace_buffer_entry_information_field_2 = (ULONG) (b); trace_event_ptr -> tx_trace_buffer_entry_information_field_3 = (ULONG) (c); trace_event_ptr -> tx_trace_buffer_entry_information_field_4 = (ULONG) (d);
#endif
@@ -524,6 +526,7 @@ VOID _tx_trace_initialize(VOID);
VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2);
VOID _tx_trace_object_unregister(VOID *object_ptr);
#ifdef TX_ENABLE_EVENT_TRACE
/* Check for MISRA compliance requirements. */
@@ -535,7 +538,7 @@ VOID _tx_trace_object_unregister(VOID *object_ptr);
UCHAR *_tx_misra_object_to_uchar_pointer_convert(TX_TRACE_OBJECT_ENTRY *pointer);
TX_TRACE_OBJECT_ENTRY *_tx_misra_uchar_to_object_pointer_convert(UCHAR *pointer);
TX_TRACE_HEADER *_tx_misra_uchar_to_header_pointer_convert(UCHAR *pointer);
TX_TRACE_BUFFER_ENTRY *_tx_misra_uchar_to_entry_pointer_convert(UCHAR *pointer);
TX_TRACE_BUFFER_ENTRY *_tx_misra_uchar_to_entry_pointer_convert(UCHAR *pointer);
UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFER_ENTRY *pointer);
@@ -556,6 +559,5 @@ UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFE
#endif
#endif
#endif
#endif

View File

@@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */
/* */
/* tx_user.h PORTABLE C */
/* 6.1.5 */
/* 6.1.9 */
/* */
/* AUTHOR */
/* */
@@ -44,7 +44,9 @@
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* 03-02-2021 Scott Larson Modified comment(s), */
/* added option to remove */
/* FileX pointer, */
@@ -52,6 +54,10 @@
/* 06-02-2021 Scott Larson Added options for multiple */
/* block pool search & delay, */
/* resulting in version 6.1.7 */
/* 10-15-2021 Yuxin Zhou Modified comment(s), added */
/* user-configurable symbol */
/* TX_TIMER_TICKS_PER_SECOND */
/* resulting in version 6.1.9 */
/* */
/**************************************************************************/
@@ -60,9 +66,9 @@
/* Define various build options for the ThreadX port. The application should either make changes
here by commenting or un-commenting the conditional compilation defined OR supply the defines
though the compiler's equivalent of the -D option.
here by commenting or un-commenting the conditional compilation defined OR supply the defines
though the compiler's equivalent of the -D option.
For maximum speed, the following should be defined:
TX_MAX_PRIORITIES 32
@@ -74,9 +80,9 @@
TX_REACTIVATE_INLINE
TX_DISABLE_STACK_FILLING
TX_INLINE_THREAD_RESUME_SUSPEND
For minimum size, the following should be defined:
TX_MAX_PRIORITIES 32
TX_DISABLE_PREEMPTION_THRESHOLD
TX_DISABLE_REDUNDANT_CLEARING
@@ -84,12 +90,12 @@
TX_NO_FILEX_POINTER
TX_NOT_INTERRUPTABLE
TX_TIMER_PROCESS_IN_ISR
Of course, many of these defines reduce functionality and/or change the behavior of the
system in ways that may not be worth the trade-off. For example, the TX_TIMER_PROCESS_IN_ISR
results in faster and smaller code, however, it increases the amount of processing in the ISR.
In addition, some services that are available in timers are not available from ISRs and will
therefore return an error if this option is used. This may or may not be desirable for a
therefore return an error if this option is used. This may or may not be desirable for a
given application. */
@@ -104,19 +110,28 @@
#define TX_TIMER_THREAD_PRIORITY ????
*/
/* Define the common timer tick reference for use by other middleware components. The default
value is 10ms (i.e. 100 ticks, defined in tx_api.h), but may be replaced by a port-specific
version in tx_port.h or here.
Note: the actual hardware timer value may need to be changed (usually in tx_initialize_low_level). */
/*
#define TX_TIMER_TICKS_PER_SECOND ((ULONG) 100)
*/
/* Determine if there is a FileX pointer in the thread control block.
By default, the pointer is there for legacy/backwards compatibility.
By default, the pointer is there for legacy/backwards compatibility.
The pointer must also be there for applications using FileX.
Define this to save space in the thread control block.
Define this to save space in the thread control block.
*/
/*
#define TX_NO_FILEX_POINTER
*/
/* Determine if timer expirations (application timers, timeouts, and tx_thread_sleep calls
should be processed within the a system timer thread or directly in the timer ISR.
By default, the timer thread is used. When the following is defined, the timer expiration
/* Determine if timer expirations (application timers, timeouts, and tx_thread_sleep calls
should be processed within the a system timer thread or directly in the timer ISR.
By default, the timer thread is used. When the following is defined, the timer expiration
processing is done directly from the timer ISR, thereby eliminating the timer thread control
block, stack, and context switching to activate it. */
@@ -141,7 +156,7 @@
#define TX_DISABLE_STACK_FILLING
*/
/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -151,7 +166,7 @@
#define TX_ENABLE_STACK_CHECKING
*/
/* Determine if preemption-threshold should be disabled. By default, preemption-threshold is
/* Determine if preemption-threshold should be disabled. By default, preemption-threshold is
enabled. If the application does not use preemption-threshold, it may be disabled to reduce
code size and improve performance. */
@@ -159,7 +174,7 @@
#define TX_DISABLE_PREEMPTION_THRESHOLD
*/
/* Determine if global ThreadX variables should be cleared. If the compiler startup code clears
/* Determine if global ThreadX variables should be cleared. If the compiler startup code clears
the .bss section prior to ThreadX running, the define can be used to eliminate unnecessary
clearing of ThreadX global variables. */
@@ -167,9 +182,9 @@
#define TX_DISABLE_REDUNDANT_CLEARING
*/
/* Determine if no timer processing is required. This option will help eliminate the timer
processing when not needed. The user will also have to comment out the call to
tx_timer_interrupt, which is typically made from assembly language in
/* Determine if no timer processing is required. This option will help eliminate the timer
processing when not needed. The user will also have to comment out the call to
tx_timer_interrupt, which is typically made from assembly language in
tx_initialize_low_level. Note: if TX_NO_TIMER is used, the define TX_TIMER_PROCESS_IN_ISR
must also be used and tx_timer_initialize must be removed from ThreadX library. */
@@ -189,8 +204,8 @@
*/
/* Determine if the tx_thread_resume and tx_thread_suspend services should have their internal
code in-line. This results in a larger image, but improves the performance of the thread
/* Determine if the tx_thread_resume and tx_thread_suspend services should have their internal
code in-line. This results in a larger image, but improves the performance of the thread
resume and suspend services. */
/*
@@ -198,7 +213,7 @@
*/
/* Determine if the internal ThreadX code is non-interruptable. This results in smaller code
/* Determine if the internal ThreadX code is non-interruptable. This results in smaller code
size and less processing overhead, but increases the interrupt lockout time. */
/*
@@ -206,8 +221,8 @@
*/
/* Determine if the trace event logging code should be enabled. This causes slight increases in
code size and overhead, but provides the ability to generate system trace information which
/* Determine if the trace event logging code should be enabled. This causes slight increases in
code size and overhead, but provides the ability to generate system trace information which
is available for viewing in TraceX. */
/*