summaryrefslogtreecommitdiff
path: root/common_modules/module_lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'common_modules/module_lib/src')
-rw-r--r--common_modules/module_lib/src/txm_block_allocate.c80
-rw-r--r--common_modules/module_lib/src/txm_block_pool_create.c89
-rw-r--r--common_modules/module_lib/src/txm_block_pool_delete.c76
-rw-r--r--common_modules/module_lib/src/txm_block_pool_info_get.c90
-rw-r--r--common_modules/module_lib/src/txm_block_pool_performance_info_get.c87
-rw-r--r--common_modules/module_lib/src/txm_block_pool_performance_system_info_get.c84
-rw-r--r--common_modules/module_lib/src/txm_block_pool_prioritize.c73
-rw-r--r--common_modules/module_lib/src/txm_block_release.c74
-rw-r--r--common_modules/module_lib/src/txm_byte_allocate.c86
-rw-r--r--common_modules/module_lib/src/txm_byte_pool_create.c87
-rw-r--r--common_modules/module_lib/src/txm_byte_pool_delete.c76
-rw-r--r--common_modules/module_lib/src/txm_byte_pool_info_get.c90
-rw-r--r--common_modules/module_lib/src/txm_byte_pool_performance_info_get.c98
-rw-r--r--common_modules/module_lib/src/txm_byte_pool_performance_system_info_get.c95
-rw-r--r--common_modules/module_lib/src/txm_byte_pool_prioritize.c73
-rw-r--r--common_modules/module_lib/src/txm_byte_release.c75
-rw-r--r--common_modules/module_lib/src/txm_event_flags_create.c79
-rw-r--r--common_modules/module_lib/src/txm_event_flags_delete.c76
-rw-r--r--common_modules/module_lib/src/txm_event_flags_get.c89
-rw-r--r--common_modules/module_lib/src/txm_event_flags_info_get.c90
-rw-r--r--common_modules/module_lib/src/txm_event_flags_performance_info_get.c88
-rw-r--r--common_modules/module_lib/src/txm_event_flags_performance_system_info_get.c84
-rw-r--r--common_modules/module_lib/src/txm_event_flags_set.c79
-rw-r--r--common_modules/module_lib/src/txm_event_flags_set_notify.c76
-rw-r--r--common_modules/module_lib/src/txm_module_application_request.c78
-rw-r--r--common_modules/module_lib/src/txm_module_callback_request_thread_entry.c244
-rw-r--r--common_modules/module_lib/src/txm_module_object_allocate.c79
-rw-r--r--common_modules/module_lib/src/txm_module_object_deallocate.c73
-rw-r--r--common_modules/module_lib/src/txm_module_object_pointer_get.c89
-rw-r--r--common_modules/module_lib/src/txm_module_object_pointer_get_extended.c96
-rw-r--r--common_modules/module_lib/src/txm_module_thread_system_suspend.c81
-rw-r--r--common_modules/module_lib/src/txm_mutex_create.c84
-rw-r--r--common_modules/module_lib/src/txm_mutex_delete.c76
-rw-r--r--common_modules/module_lib/src/txm_mutex_get.c76
-rw-r--r--common_modules/module_lib/src/txm_mutex_info_get.c91
-rw-r--r--common_modules/module_lib/src/txm_mutex_performance_info_get.c93
-rw-r--r--common_modules/module_lib/src/txm_mutex_performance_system_info_get.c90
-rw-r--r--common_modules/module_lib/src/txm_mutex_prioritize.c73
-rw-r--r--common_modules/module_lib/src/txm_mutex_put.c74
-rw-r--r--common_modules/module_lib/src/txm_queue_create.c87
-rw-r--r--common_modules/module_lib/src/txm_queue_delete.c75
-rw-r--r--common_modules/module_lib/src/txm_queue_flush.c75
-rw-r--r--common_modules/module_lib/src/txm_queue_front_send.c78
-rw-r--r--common_modules/module_lib/src/txm_queue_info_get.c90
-rw-r--r--common_modules/module_lib/src/txm_queue_performance_info_get.c91
-rw-r--r--common_modules/module_lib/src/txm_queue_performance_system_info_get.c90
-rw-r--r--common_modules/module_lib/src/txm_queue_prioritize.c73
-rw-r--r--common_modules/module_lib/src/txm_queue_receive.c80
-rw-r--r--common_modules/module_lib/src/txm_queue_send.c78
-rw-r--r--common_modules/module_lib/src/txm_queue_send_notify.c76
-rw-r--r--common_modules/module_lib/src/txm_semaphore_ceiling_put.c77
-rw-r--r--common_modules/module_lib/src/txm_semaphore_create.c83
-rw-r--r--common_modules/module_lib/src/txm_semaphore_delete.c76
-rw-r--r--common_modules/module_lib/src/txm_semaphore_get.c76
-rw-r--r--common_modules/module_lib/src/txm_semaphore_info_get.c89
-rw-r--r--common_modules/module_lib/src/txm_semaphore_performance_info_get.c87
-rw-r--r--common_modules/module_lib/src/txm_semaphore_performance_system_info_get.c84
-rw-r--r--common_modules/module_lib/src/txm_semaphore_prioritize.c73
-rw-r--r--common_modules/module_lib/src/txm_semaphore_put.c74
-rw-r--r--common_modules/module_lib/src/txm_semaphore_put_notify.c76
-rw-r--r--common_modules/module_lib/src/txm_thread_create.c100
-rw-r--r--common_modules/module_lib/src/txm_thread_delete.c75
-rw-r--r--common_modules/module_lib/src/txm_thread_entry_exit_notify.c76
-rw-r--r--common_modules/module_lib/src/txm_thread_identify.c76
-rw-r--r--common_modules/module_lib/src/txm_thread_info_get.c95
-rw-r--r--common_modules/module_lib/src/txm_thread_interrupt_control.c76
-rw-r--r--common_modules/module_lib/src/txm_thread_performance_info_get.c110
-rw-r--r--common_modules/module_lib/src/txm_thread_performance_system_info_get.c110
-rw-r--r--common_modules/module_lib/src/txm_thread_preemption_change.c79
-rw-r--r--common_modules/module_lib/src/txm_thread_priority_change.c79
-rw-r--r--common_modules/module_lib/src/txm_thread_relinquish.c70
-rw-r--r--common_modules/module_lib/src/txm_thread_reset.c75
-rw-r--r--common_modules/module_lib/src/txm_thread_resume.c74
-rw-r--r--common_modules/module_lib/src/txm_thread_sleep.c74
-rw-r--r--common_modules/module_lib/src/txm_thread_stack_error_notify.c78
-rw-r--r--common_modules/module_lib/src/txm_thread_suspend.c76
-rw-r--r--common_modules/module_lib/src/txm_thread_terminate.c76
-rw-r--r--common_modules/module_lib/src/txm_thread_time_slice_change.c78
-rw-r--r--common_modules/module_lib/src/txm_thread_wait_abort.c74
-rw-r--r--common_modules/module_lib/src/txm_time_get.c74
-rw-r--r--common_modules/module_lib/src/txm_time_set.c70
-rw-r--r--common_modules/module_lib/src/txm_timer_activate.c76
-rw-r--r--common_modules/module_lib/src/txm_timer_change.c79
-rw-r--r--common_modules/module_lib/src/txm_timer_create.c92
-rw-r--r--common_modules/module_lib/src/txm_timer_deactivate.c75
-rw-r--r--common_modules/module_lib/src/txm_timer_delete.c76
-rw-r--r--common_modules/module_lib/src/txm_timer_info_get.c88
-rw-r--r--common_modules/module_lib/src/txm_timer_performance_info_get.c91
-rw-r--r--common_modules/module_lib/src/txm_timer_performance_system_info_get.c87
-rw-r--r--common_modules/module_lib/src/txm_trace_buffer_full_notify.c77
-rw-r--r--common_modules/module_lib/src/txm_trace_disable.c73
-rw-r--r--common_modules/module_lib/src/txm_trace_enable.c77
-rw-r--r--common_modules/module_lib/src/txm_trace_event_filter.c74
-rw-r--r--common_modules/module_lib/src/txm_trace_event_unfilter.c74
-rw-r--r--common_modules/module_lib/src/txm_trace_interrupt_control.c74
-rw-r--r--common_modules/module_lib/src/txm_trace_isr_enter_insert.c70
-rw-r--r--common_modules/module_lib/src/txm_trace_isr_exit_insert.c70
-rw-r--r--common_modules/module_lib/src/txm_trace_user_event_insert.c82
98 files changed, 8109 insertions, 0 deletions
diff --git a/common_modules/module_lib/src/txm_block_allocate.c b/common_modules/module_lib/src/txm_block_allocate.c
new file mode 100644
index 00000000..9c1e1054
--- /dev/null
+++ b/common_modules/module_lib/src/txm_block_allocate.c
@@ -0,0 +1,80 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_block_allocate PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the allocate block memory */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to pool control block */
+/* block_ptr Pointer to place allocated block */
+/* pointer */
+/* wait_option Suspension option */
+/* */
+/* OUTPUT */
+/* */
+/* TX_POOL_ERROR Invalid pool pointer */
+/* TX_PTR_ERROR Invalid destination pointer */
+/* TX_WAIT_ERROR Invalid wait option */
+/* status Actual Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BLOCK_ALLOCATE_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) block_ptr, (ALIGN_TYPE) wait_option);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_block_pool_create.c b/common_modules/module_lib/src/txm_block_pool_create.c
new file mode 100644
index 00000000..897a863e
--- /dev/null
+++ b/common_modules/module_lib/src/txm_block_pool_create.c
@@ -0,0 +1,89 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_block_pool_create PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the create block memory pool */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to pool control block */
+/* name_ptr Pointer to block pool name */
+/* block_size Number of bytes in each block */
+/* pool_start Address of beginning of pool area */
+/* pool_size Number of bytes in the block pool */
+/* pool_control_block_size Size of block pool control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_POOL_ERROR Invalid pool pointer */
+/* TX_PTR_ERROR Invalid starting address */
+/* TX_SIZE_ERROR Invalid pool size */
+/* TX_CALLER_ERROR Invalid caller of pool */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[4];
+
+ extra_parameters[0] = (ALIGN_TYPE) block_size;
+ extra_parameters[1] = (ALIGN_TYPE) pool_start;
+ extra_parameters[2] = (ALIGN_TYPE) pool_size;
+ extra_parameters[3] = (ALIGN_TYPE) pool_control_block_size;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BLOCK_POOL_CREATE_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) name_ptr, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_block_pool_delete.c b/common_modules/module_lib/src/txm_block_pool_delete.c
new file mode 100644
index 00000000..9b0436eb
--- /dev/null
+++ b/common_modules/module_lib/src/txm_block_pool_delete.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_block_pool_delete PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the delete block pool memory */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to pool control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_POOL_ERROR Invalid memory block pool pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual delete function status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BLOCK_POOL_DELETE_CALL, (ALIGN_TYPE) pool_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_block_pool_info_get.c b/common_modules/module_lib/src/txm_block_pool_info_get.c
new file mode 100644
index 00000000..40489186
--- /dev/null
+++ b/common_modules/module_lib/src/txm_block_pool_info_get.c
@@ -0,0 +1,90 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_block_pool_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the block pool information get */
+/* service. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to block pool control blk */
+/* name Destination for the pool name */
+/* available_blocks Number of free blocks in pool */
+/* total_blocks Total number of blocks in pool */
+/* first_suspended Destination for pointer of first */
+/* thread suspended on block pool */
+/* suspended_count Destination for suspended count */
+/* next_pool Destination for pointer to next */
+/* block pool on the created list */
+/* */
+/* OUTPUT */
+/* */
+/* TX_POOL_ERROR Invalid block pool pointer */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[5];
+
+ extra_parameters[0] = (ALIGN_TYPE) available_blocks;
+ extra_parameters[1] = (ALIGN_TYPE) total_blocks;
+ extra_parameters[2] = (ALIGN_TYPE) first_suspended;
+ extra_parameters[3] = (ALIGN_TYPE) suspended_count;
+ extra_parameters[4] = (ALIGN_TYPE) next_pool;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BLOCK_POOL_INFO_GET_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_block_pool_performance_info_get.c b/common_modules/module_lib/src/txm_block_pool_performance_info_get.c
new file mode 100644
index 00000000..7441e4aa
--- /dev/null
+++ b/common_modules/module_lib/src/txm_block_pool_performance_info_get.c
@@ -0,0 +1,87 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_block_pool_performance_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves performance information from the specified */
+/* block pool. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to block pool control blk */
+/* allocates Destination for the number of */
+/* allocations from this pool */
+/* releases Destination for the number of */
+/* blocks released back to pool */
+/* suspensions Destination for number of */
+/* suspensions on this pool */
+/* timeouts Destination for number of timeouts*/
+/* on this pool */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases, ULONG *suspensions, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[3];
+
+ extra_parameters[0] = (ALIGN_TYPE) releases;
+ extra_parameters[1] = (ALIGN_TYPE) suspensions;
+ extra_parameters[2] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BLOCK_POOL_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) allocates, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_block_pool_performance_system_info_get.c b/common_modules/module_lib/src/txm_block_pool_performance_system_info_get.c
new file mode 100644
index 00000000..d37da4e8
--- /dev/null
+++ b/common_modules/module_lib/src/txm_block_pool_performance_system_info_get.c
@@ -0,0 +1,84 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_block_pool_performance_system_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves block pool performance information. */
+/* */
+/* INPUT */
+/* */
+/* allocates Destination for the total number */
+/* of block allocations */
+/* releases Destination for the total number */
+/* of blocks released */
+/* suspensions Destination for the total number */
+/* of suspensions */
+/* timeouts Destination for total number of */
+/* timeouts */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_block_pool_performance_system_info_get(ULONG *allocates, ULONG *releases, ULONG *suspensions, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[2];
+
+ extra_parameters[0] = (ALIGN_TYPE) suspensions;
+ extra_parameters[1] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BLOCK_POOL_PERFORMANCE_SYSTEM_INFO_GET_CALL, (ALIGN_TYPE) allocates, (ALIGN_TYPE) releases, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_block_pool_prioritize.c b/common_modules/module_lib/src/txm_block_pool_prioritize.c
new file mode 100644
index 00000000..05c2bbd8
--- /dev/null
+++ b/common_modules/module_lib/src/txm_block_pool_prioritize.c
@@ -0,0 +1,73 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_block_pool_prioritize PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the block pool prioritize call. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to pool control block */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BLOCK_POOL_PRIORITIZE_CALL, (ALIGN_TYPE) pool_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_block_release.c b/common_modules/module_lib/src/txm_block_release.c
new file mode 100644
index 00000000..2b644943
--- /dev/null
+++ b/common_modules/module_lib/src/txm_block_release.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_block_release PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the block release function call. */
+/* */
+/* INPUT */
+/* */
+/* block_ptr Pointer to memory block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_PTR_ERROR Invalid memory block pointer */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_block_release(VOID *block_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BLOCK_RELEASE_CALL, (ALIGN_TYPE) block_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_byte_allocate.c b/common_modules/module_lib/src/txm_byte_allocate.c
new file mode 100644
index 00000000..bf9da24d
--- /dev/null
+++ b/common_modules/module_lib/src/txm_byte_allocate.c
@@ -0,0 +1,86 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_byte_allocate PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in allocate bytes function call. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to pool control block */
+/* memory_ptr Pointer to place allocated bytes */
+/* pointer */
+/* memory_size Number of bytes to allocate */
+/* wait_option Suspension option */
+/* */
+/* OUTPUT */
+/* */
+/* TX_POOL_ERROR Invalid memory pool pointer */
+/* TX_PTR_ERROR Invalid destination pointer */
+/* TX_WAIT_ERROR Invalid wait option */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* TX_SIZE_ERROR Invalid size of memory request */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[2];
+
+ extra_parameters[0] = (ALIGN_TYPE) memory_size;
+ extra_parameters[1] = (ALIGN_TYPE) wait_option;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_ALLOCATE_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) memory_ptr, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_byte_pool_create.c b/common_modules/module_lib/src/txm_byte_pool_create.c
new file mode 100644
index 00000000..c2b02c0b
--- /dev/null
+++ b/common_modules/module_lib/src/txm_byte_pool_create.c
@@ -0,0 +1,87 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_byte_pool_create PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the create byte pool memory */
+/* function. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to pool control block */
+/* name_ptr Pointer to byte pool name */
+/* pool_start Address of beginning of pool area */
+/* pool_size Number of bytes in the byte pool */
+/* pool_control_block_size Size of byte pool control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_POOL_ERROR Invalid byte pool pointer */
+/* TX_PTR_ERROR Invalid pool starting address */
+/* TX_SIZE_ERROR Invalid pool size */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[3];
+
+ extra_parameters[0] = (ALIGN_TYPE) pool_start;
+ extra_parameters[1] = (ALIGN_TYPE) pool_size;
+ extra_parameters[2] = (ALIGN_TYPE) pool_control_block_size;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_POOL_CREATE_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) name_ptr, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_byte_pool_delete.c b/common_modules/module_lib/src/txm_byte_pool_delete.c
new file mode 100644
index 00000000..5616cfb4
--- /dev/null
+++ b/common_modules/module_lib/src/txm_byte_pool_delete.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_byte_pool_delete PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the delete byte pool function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to pool control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_POOL_ERROR Invalid pool pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_POOL_DELETE_CALL, (ALIGN_TYPE) pool_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_byte_pool_info_get.c b/common_modules/module_lib/src/txm_byte_pool_info_get.c
new file mode 100644
index 00000000..2ff97682
--- /dev/null
+++ b/common_modules/module_lib/src/txm_byte_pool_info_get.c
@@ -0,0 +1,90 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_byte_pool_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the byte pool information get */
+/* service. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to byte pool control block*/
+/* name Destination for the pool name */
+/* available_bytes Number of free bytes in byte pool */
+/* fragments Number of fragments in byte pool */
+/* first_suspended Destination for pointer of first */
+/* thread suspended on byte pool */
+/* suspended_count Destination for suspended count */
+/* next_pool Destination for pointer to next */
+/* byte pool on the created list */
+/* */
+/* OUTPUT */
+/* */
+/* TX_POOL_ERROR Invalid byte pool pointer */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[5];
+
+ extra_parameters[0] = (ALIGN_TYPE) available_bytes;
+ extra_parameters[1] = (ALIGN_TYPE) fragments;
+ extra_parameters[2] = (ALIGN_TYPE) first_suspended;
+ extra_parameters[3] = (ALIGN_TYPE) suspended_count;
+ extra_parameters[4] = (ALIGN_TYPE) next_pool;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_POOL_INFO_GET_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_byte_pool_performance_info_get.c b/common_modules/module_lib/src/txm_byte_pool_performance_info_get.c
new file mode 100644
index 00000000..2ac466b7
--- /dev/null
+++ b/common_modules/module_lib/src/txm_byte_pool_performance_info_get.c
@@ -0,0 +1,98 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_byte_pool_performance_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves performance information from the specified */
+/* byte pool. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to byte pool control block*/
+/* allocates Destination for number of */
+/* allocates on this pool */
+/* releases Destination for number of */
+/* releases on this pool */
+/* fragments_searched Destination for number of */
+/* fragments searched during */
+/* allocation */
+/* merges Destination for number of adjacent*/
+/* free fragments merged */
+/* splits Destination for number of */
+/* fragments split during */
+/* allocation */
+/* suspensions Destination for number of */
+/* suspensions on this pool */
+/* timeouts Destination for number of timeouts*/
+/* on this byte pool */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases, ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[6];
+
+ extra_parameters[0] = (ALIGN_TYPE) releases;
+ extra_parameters[1] = (ALIGN_TYPE) fragments_searched;
+ extra_parameters[2] = (ALIGN_TYPE) merges;
+ extra_parameters[3] = (ALIGN_TYPE) splits;
+ extra_parameters[4] = (ALIGN_TYPE) suspensions;
+ extra_parameters[5] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_POOL_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) pool_ptr, (ALIGN_TYPE) allocates, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_byte_pool_performance_system_info_get.c b/common_modules/module_lib/src/txm_byte_pool_performance_system_info_get.c
new file mode 100644
index 00000000..3b3b8b59
--- /dev/null
+++ b/common_modules/module_lib/src/txm_byte_pool_performance_system_info_get.c
@@ -0,0 +1,95 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_byte_pool_performance_system_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves byte pool performance information. */
+/* */
+/* INPUT */
+/* */
+/* allocates Destination for total number of */
+/* allocates */
+/* releases Destination for total number of */
+/* releases */
+/* fragments_searched Destination for total number of */
+/* fragments searched during */
+/* allocation */
+/* merges Destination for total number of */
+/* adjacent free fragments merged */
+/* splits Destination for total number of */
+/* fragments split during */
+/* allocation */
+/* suspensions Destination for total number of */
+/* suspensions */
+/* timeouts Destination for total number of */
+/* timeouts */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_byte_pool_performance_system_info_get(ULONG *allocates, ULONG *releases, ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[5];
+
+ extra_parameters[0] = (ALIGN_TYPE) fragments_searched;
+ extra_parameters[1] = (ALIGN_TYPE) merges;
+ extra_parameters[2] = (ALIGN_TYPE) splits;
+ extra_parameters[3] = (ALIGN_TYPE) suspensions;
+ extra_parameters[4] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_POOL_PERFORMANCE_SYSTEM_INFO_GET_CALL, (ALIGN_TYPE) allocates, (ALIGN_TYPE) releases, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_byte_pool_prioritize.c b/common_modules/module_lib/src/txm_byte_pool_prioritize.c
new file mode 100644
index 00000000..94dfa607
--- /dev/null
+++ b/common_modules/module_lib/src/txm_byte_pool_prioritize.c
@@ -0,0 +1,73 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_byte_pool_prioritize PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the byte pool prioritize call. */
+/* */
+/* INPUT */
+/* */
+/* pool_ptr Pointer to pool control block */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_POOL_PRIORITIZE_CALL, (ALIGN_TYPE) pool_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_byte_release.c b/common_modules/module_lib/src/txm_byte_release.c
new file mode 100644
index 00000000..31b32848
--- /dev/null
+++ b/common_modules/module_lib/src/txm_byte_release.c
@@ -0,0 +1,75 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_byte_release PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the release byte function call. */
+/* */
+/* INPUT */
+/* */
+/* memory_ptr Pointer to allocated memory */
+/* */
+/* OUTPUT */
+/* */
+/* TX_PTR_ERROR Invalid memory pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_byte_release(VOID *memory_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_RELEASE_CALL, (ALIGN_TYPE) memory_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_event_flags_create.c b/common_modules/module_lib/src/txm_event_flags_create.c
new file mode 100644
index 00000000..a0ae4eb6
--- /dev/null
+++ b/common_modules/module_lib/src/txm_event_flags_create.c
@@ -0,0 +1,79 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_event_flags_create PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the event flag creation function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* group_ptr Pointer to event flags group */
+/* control block */
+/* name_ptr Pointer to event flags name */
+/* event_control_block_size Size of event flags control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_GROUP_ERROR Invalid event flag group pointer */
+/* TX_CALLER_ERROR Invalid calling function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_CREATE_CALL, (ALIGN_TYPE) group_ptr, (ALIGN_TYPE) name_ptr, (ALIGN_TYPE) event_control_block_size);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_event_flags_delete.c b/common_modules/module_lib/src/txm_event_flags_delete.c
new file mode 100644
index 00000000..fccb74b0
--- /dev/null
+++ b/common_modules/module_lib/src/txm_event_flags_delete.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_event_flags_delete PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the delete event flags group */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* group_ptr Pointer to group control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_GROUP_ERROR Invalid event flag group pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_DELETE_CALL, (ALIGN_TYPE) group_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_event_flags_get.c b/common_modules/module_lib/src/txm_event_flags_get.c
new file mode 100644
index 00000000..792826d5
--- /dev/null
+++ b/common_modules/module_lib/src/txm_event_flags_get.c
@@ -0,0 +1,89 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_event_flags_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the event flags get function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* group_ptr Pointer to group control block */
+/* requested_event_flags Event flags requested */
+/* get_option Specifies and/or and clear options*/
+/* actual_flags_ptr Pointer to place the actual flags */
+/* the service retrieved */
+/* wait_option Suspension option */
+/* */
+/* OUTPUT */
+/* */
+/* TX_GROUP_ERROR Invalid event flags group pointer */
+/* TX_PTR_ERROR Invalid actual flags pointer */
+/* TX_WAIT_ERROR Invalid wait option */
+/* TX_OPTION_ERROR Invalid get option */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[3];
+
+ extra_parameters[0] = (ALIGN_TYPE) get_option;
+ extra_parameters[1] = (ALIGN_TYPE) actual_flags_ptr;
+ extra_parameters[2] = (ALIGN_TYPE) wait_option;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_GET_CALL, (ALIGN_TYPE) group_ptr, (ALIGN_TYPE) requested_flags, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_event_flags_info_get.c b/common_modules/module_lib/src/txm_event_flags_info_get.c
new file mode 100644
index 00000000..5242503e
--- /dev/null
+++ b/common_modules/module_lib/src/txm_event_flags_info_get.c
@@ -0,0 +1,90 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_event_flags_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the event flag information get */
+/* service. */
+/* */
+/* INPUT */
+/* */
+/* group_ptr Pointer to event flag group */
+/* name Destination for the event flags */
+/* group name */
+/* current_flags Current event flags */
+/* first_suspended Destination for pointer of first */
+/* thread suspended on event flags */
+/* suspended_count Destination for suspended count */
+/* next_group Destination for pointer to next */
+/* event flag group on the created */
+/* list */
+/* */
+/* OUTPUT */
+/* */
+/* TX_GROUP_ERROR Invalid event flag group pointer */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[4];
+
+ extra_parameters[0] = (ALIGN_TYPE) current_flags;
+ extra_parameters[1] = (ALIGN_TYPE) first_suspended;
+ extra_parameters[2] = (ALIGN_TYPE) suspended_count;
+ extra_parameters[3] = (ALIGN_TYPE) next_group;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_INFO_GET_CALL, (ALIGN_TYPE) group_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_event_flags_performance_info_get.c b/common_modules/module_lib/src/txm_event_flags_performance_info_get.c
new file mode 100644
index 00000000..dfc6b0fa
--- /dev/null
+++ b/common_modules/module_lib/src/txm_event_flags_performance_info_get.c
@@ -0,0 +1,88 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_event_flags_performance_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves performance information from the specified */
+/* event flag group. */
+/* */
+/* INPUT */
+/* */
+/* group_ptr Pointer to event flag group */
+/* sets Destination for the number of */
+/* event flag sets on this group */
+/* gets Destination for the number of */
+/* event flag gets on this group */
+/* suspensions Destination for the number of */
+/* event flag suspensions on this */
+/* group */
+/* timeouts Destination for number of timeouts*/
+/* on this event flag group */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[3];
+
+ extra_parameters[0] = (ALIGN_TYPE) gets;
+ extra_parameters[1] = (ALIGN_TYPE) suspensions;
+ extra_parameters[2] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) group_ptr, (ALIGN_TYPE) sets, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_event_flags_performance_system_info_get.c b/common_modules/module_lib/src/txm_event_flags_performance_system_info_get.c
new file mode 100644
index 00000000..840f2d00
--- /dev/null
+++ b/common_modules/module_lib/src/txm_event_flags_performance_system_info_get.c
@@ -0,0 +1,84 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_event_flags_performance_system_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves system event flag performance information. */
+/* */
+/* INPUT */
+/* */
+/* sets Destination for total number of */
+/* event flag sets */
+/* gets Destination for total number of */
+/* event flag gets */
+/* suspensions Destination for total number of */
+/* event flag suspensions */
+/* timeouts Destination for total number of */
+/* timeouts */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_event_flags_performance_system_info_get(ULONG *sets, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[2];
+
+ extra_parameters[0] = (ALIGN_TYPE) suspensions;
+ extra_parameters[1] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_PERFORMANCE_SYSTEM_INFO_GET_CALL, (ALIGN_TYPE) sets, (ALIGN_TYPE) gets, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_event_flags_set.c b/common_modules/module_lib/src/txm_event_flags_set.c
new file mode 100644
index 00000000..182e4eed
--- /dev/null
+++ b/common_modules/module_lib/src/txm_event_flags_set.c
@@ -0,0 +1,79 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_event_flags_set PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the set event flags function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* group_ptr Pointer to group control block */
+/* flags_to_set Event flags to set */
+/* set_option Specified either AND or OR */
+/* operation on the event flags */
+/* */
+/* OUTPUT */
+/* */
+/* TX_GROUP_ERROR Invalid event flags group pointer */
+/* TX_OPTION_ERROR Invalid set option */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_SET_CALL, (ALIGN_TYPE) group_ptr, (ALIGN_TYPE) flags_to_set, (ALIGN_TYPE) set_option);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_event_flags_set_notify.c b/common_modules/module_lib/src/txm_event_flags_set_notify.c
new file mode 100644
index 00000000..99816859
--- /dev/null
+++ b/common_modules/module_lib/src/txm_event_flags_set_notify.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_event_flags_set_notify PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the event flags set notify */
+/* callback function call. */
+/* */
+/* INPUT */
+/* */
+/* group_ptr Pointer to group control block*/
+/* group_put_notify Application callback function */
+/* (TX_NULL disables notify) */
+/* */
+/* OUTPUT */
+/* */
+/* status Service return status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *))
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_SET_NOTIFY_CALL, (ALIGN_TYPE) group_ptr, (ALIGN_TYPE) events_set_notify, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_module_application_request.c b/common_modules/module_lib/src/txm_module_application_request.c
new file mode 100644
index 00000000..8e397c89
--- /dev/null
+++ b/common_modules/module_lib/src/txm_module_application_request.c
@@ -0,0 +1,78 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* txm_module_application_request PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function sends an application-specific request to the resident */
+/* code. */
+/* */
+/* INPUT */
+/* */
+/* request Request ID (application defined) */
+/* param_1 First parameter */
+/* param_2 Second parameter */
+/* param_3 Third parameter */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT txm_module_application_request(ULONG request, ALIGN_TYPE param_1, ALIGN_TYPE param_2, ALIGN_TYPE param_3)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT)(_txm_module_kernel_call_dispatcher)(TXM_APPLICATION_REQUEST_ID_BASE+request, param_1, param_2, param_3);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
+
diff --git a/common_modules/module_lib/src/txm_module_callback_request_thread_entry.c b/common_modules/module_lib/src/txm_module_callback_request_thread_entry.c
new file mode 100644
index 00000000..e8ba684d
--- /dev/null
+++ b/common_modules/module_lib/src/txm_module_callback_request_thread_entry.c
@@ -0,0 +1,244 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#ifndef TXM_MODULE
+#define TXM_MODULE
+#endif
+
+#ifndef TX_SOURCE_CODE
+#define TX_SOURCE_CODE
+#endif
+
+
+/* Include necessary system files. */
+
+#include "txm_module.h"
+#include "tx_queue.h"
+
+
+/* Define the global module entry pointer from the start thread of the module.
+ This structure contains the pointer to the request queue as well as the
+ pointer to the callback response queue. */
+
+extern TXM_MODULE_THREAD_ENTRY_INFO *_txm_module_entry_info;
+
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_callback_request_thread_entry PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function processes all module callback requests, transferred */
+/* by the resident code via the callback queue. When the callback is */
+/* complete, the response is sent back to the resident code to */
+/* acknowledge it. */
+/* */
+/* INPUT */
+/* */
+/* id Module thread ID */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* tx_queue_receive Receive callback request */
+/* */
+/* CALLED BY */
+/* */
+/* Initial thread stack frame */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+VOID _txm_module_callback_request_thread_entry(ULONG id)
+{
+
+TX_QUEUE *request_queue;
+TXM_MODULE_CALLBACK_MESSAGE callback_message;
+ULONG activation_count;
+VOID (*timer_callback)(ULONG);
+VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *);
+VOID (*semaphore_put_notify)(TX_SEMAPHORE *);
+VOID (*queue_send_notify)(TX_QUEUE *);
+VOID (*thread_entry_exit_notify)(TX_THREAD *, UINT);
+UINT status;
+
+
+ /* Pickup pointer to the request queue. */
+ request_queue = _txm_module_entry_info -> txm_module_thread_entry_info_callback_request_queue;
+
+ /* Loop to process callback messages from the module manager. */
+ while(1)
+ {
+
+ /* Wait for the callback request for the module. */
+ status = _txe_queue_receive(request_queue, (VOID *) &callback_message, TX_WAIT_FOREVER);
+
+ /* Check to see if a request was received. */
+ if (status != TX_SUCCESS)
+ {
+
+ /* This should not happen - get out of the loop. */
+ break;
+ }
+
+ /* Pickup the activation count in the message. */
+ activation_count = callback_message.txm_module_callback_message_activation_count;
+
+ /* Loop to call the callback function the correct number of times. */
+ while (activation_count)
+ {
+
+ /* Decrement the activation count. */
+ activation_count--;
+
+ /* Now dispatch the callback function. */
+ switch (callback_message.txm_module_callback_message_type)
+ {
+
+ case TXM_TIMER_CALLBACK:
+
+ /* Setup timer callback pointer. */
+ timer_callback = (void (*)(ULONG)) callback_message.txm_module_callback_message_application_function;
+
+ /* Call application's timer callback. */
+ (timer_callback)((ULONG) callback_message.txm_module_callback_message_param_1);
+
+ break;
+
+ case TXM_EVENTS_SET_CALLBACK:
+
+ /* Setup events set callback pointer. */
+ events_set_notify = (void (*)(TX_EVENT_FLAGS_GROUP *)) callback_message.txm_module_callback_message_application_function;
+
+ /* Call events set notify callback. */
+ (events_set_notify)((TX_EVENT_FLAGS_GROUP *) callback_message.txm_module_callback_message_param_1);
+
+ break;
+
+ case TXM_QUEUE_SEND_CALLBACK:
+
+ /* Setup queue send callback pointer. */
+ queue_send_notify = (void (*)(TX_QUEUE *)) callback_message.txm_module_callback_message_application_function;
+
+ /* Call queue send notify callback. */
+ (queue_send_notify)((TX_QUEUE *) callback_message.txm_module_callback_message_param_1);
+
+ break;
+
+ case TXM_SEMAPHORE_PUT_CALLBACK:
+
+ /* Setup semaphore put callback pointer. */
+ semaphore_put_notify = (void (*)(TX_SEMAPHORE *)) callback_message.txm_module_callback_message_application_function;
+
+ /* Call semaphore put notify callback. */
+ (semaphore_put_notify)((TX_SEMAPHORE *) callback_message.txm_module_callback_message_param_1);
+
+ break;
+
+ case TXM_THREAD_ENTRY_EXIT_CALLBACK:
+
+ /* Setup thread entry/exit callback pointer. */
+ thread_entry_exit_notify = (void (*)(TX_THREAD *, UINT)) callback_message.txm_module_callback_message_application_function;
+
+ /* Call thread entry/exit notify callback. */
+ (thread_entry_exit_notify)((TX_THREAD *) callback_message.txm_module_callback_message_param_1, (UINT) callback_message.txm_module_callback_message_param_2);
+
+ break;
+
+ default:
+
+#ifdef TXM_MODULE_ENABLE_NETX
+
+ /* Determine if there is a NetX callback. */
+ if ((callback_message.txm_module_callback_message_type >= TXM_NETX_CALLBACKS_START) && (callback_message.txm_module_callback_message_type < TXM_NETX_CALLBACKS_END))
+ {
+
+ /* Call the NetX module callback function. */
+ _txm_module_netx_callback_request(&callback_message);
+ }
+#endif
+
+#ifdef TXM_MODULE_ENABLE_NETXDUO
+
+ /* Determine if there is a NetX Duo callback. */
+ if ((callback_message.txm_module_callback_message_type >= TXM_NETXDUO_CALLBACKS_START) && (callback_message.txm_module_callback_message_type < TXM_NETXDUO_CALLBACKS_END))
+ {
+
+ /* Call the NetX Duo module callback function. */
+ _txm_module_netxduo_callback_request(&callback_message);
+ }
+#endif
+
+#ifdef TXM_MODULE_ENABLE_FILEX
+
+ /* Determine if there is a FileX callback. */
+ if ((callback_message.txm_module_callback_message_type >= TXM_FILEX_CALLBACKS_START) && (callback_message.txm_module_callback_message_type < TXM_FILEX_CALLBACKS_END))
+ {
+
+ /* Call the FileX module callback function. */
+ _txm_module_filex_callback_request(&callback_message);
+ }
+#endif
+
+#ifdef TXM_MODULE_ENABLE_GUIX
+
+ /* Determine if there is a GUIX callback. */
+ if ((callback_message.txm_module_callback_message_type >= TXM_GUIX_CALLBACKS_START) && (callback_message.txm_module_callback_message_type < TXM_GUIX_CALLBACKS_END))
+ {
+
+ /* Call the GUIX module callback function. */
+ _txm_module_guix_callback_request(&callback_message);
+ }
+#endif
+
+#ifdef TXM_MODULE_ENABLE_USBX
+
+ /* Determine if there is a USBX callback. */
+ if ((callback_message.txm_module_callback_message_type >= TXM_USBX_CALLBACKS_START) && (callback_message.txm_module_callback_message_type < TXM_USBX_CALLBACKS_END))
+ {
+
+ /* Call the USBX callback function. */
+ _txm_module_usbx_callback_request(&callback_message);
+ }
+#endif
+
+ break;
+ }
+ }
+ }
+}
+
+
diff --git a/common_modules/module_lib/src/txm_module_object_allocate.c b/common_modules/module_lib/src/txm_module_object_allocate.c
new file mode 100644
index 00000000..3ae4c91f
--- /dev/null
+++ b/common_modules/module_lib/src/txm_module_object_allocate.c
@@ -0,0 +1,79 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_object_allocate PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function allocates memory for an object from the memory pool */
+/* supplied to txm_module_manager_initialize. */
+/* */
+/* INPUT */
+/* */
+/* object_ptr Destination of object pointer on */
+/* successful allocation */
+/* object_size Size in bytes of the object to be */
+/* allocated */
+/* module_instance The module instance that the */
+/* object belongs to */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txm_module_object_allocate(VOID **object_ptr, ULONG object_size)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MODULE_OBJECT_ALLOCATE_CALL, (ALIGN_TYPE) object_ptr, (ALIGN_TYPE) object_size, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_module_object_deallocate.c b/common_modules/module_lib/src/txm_module_object_deallocate.c
new file mode 100644
index 00000000..e3e39bb8
--- /dev/null
+++ b/common_modules/module_lib/src/txm_module_object_deallocate.c
@@ -0,0 +1,73 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_object_deallocate PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function deallocates a previously allocated object. */
+/* */
+/* INPUT */
+/* */
+/* object_ptr Object pointer to deallocate */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txm_module_object_deallocate(VOID *object_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MODULE_OBJECT_DEALLOCATE_CALL, (ALIGN_TYPE) object_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_module_object_pointer_get.c b/common_modules/module_lib/src/txm_module_object_pointer_get.c
new file mode 100644
index 00000000..81e5fd9b
--- /dev/null
+++ b/common_modules/module_lib/src/txm_module_object_pointer_get.c
@@ -0,0 +1,89 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_object_pointer_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is deprecated and calls the secure version of this */
+/* function (_txm_module_manager_object_pointer_get_extended) with the */
+/* maximum possible name length since none was passed. */
+/* */
+/* INPUT */
+/* */
+/* object_type Type of object, as follows: */
+/* */
+/* TXM_BLOCK_POOL_OBJECT */
+/* TXM_BYTE_POOL_OBJECT */
+/* TXM_EVENT_FLAGS_OBJECT */
+/* TXM_MUTEX_OBJECT */
+/* TXM_QUEUE_OBJECT */
+/* TXM_SEMAPHORE_OBJECT */
+/* TXM_THREAD_OBJECT */
+/* TXM_TIMER_OBJECT */
+/* name Name to search for */
+/* object_ptr Pointer to the object */
+/* */
+/* OUTPUT */
+/* */
+/* TX_SUCCESS Successful completion */
+/* TX_PTR_ERROR Invalid name or object ptr */
+/* TX_OPTION_ERROR Invalid option type */
+/* TX_NO_INSTANCE Object not found */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txm_module_object_pointer_get(UINT object_type, CHAR *name, VOID **object_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MODULE_OBJECT_POINTER_GET_CALL, (ALIGN_TYPE) object_type, (ALIGN_TYPE) name, (ALIGN_TYPE) object_ptr);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_module_object_pointer_get_extended.c b/common_modules/module_lib/src/txm_module_object_pointer_get_extended.c
new file mode 100644
index 00000000..987de28a
--- /dev/null
+++ b/common_modules/module_lib/src/txm_module_object_pointer_get_extended.c
@@ -0,0 +1,96 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_object_pointer_get_extended PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves the object pointer of a particular type */
+/* with a particular name. If the object is not found, an error is */
+/* returned. Otherwise, if the object is found, the address of that */
+/* object is placed in object_ptr. */
+/* */
+/* INPUT */
+/* */
+/* object_type Type of object, as follows: */
+/* */
+/* TXM_BLOCK_POOL_OBJECT */
+/* TXM_BYTE_POOL_OBJECT */
+/* TXM_EVENT_FLAGS_OBJECT */
+/* TXM_MUTEX_OBJECT */
+/* TXM_QUEUE_OBJECT */
+/* TXM_SEMAPHORE_OBJECT */
+/* TXM_THREAD_OBJECT */
+/* TXM_TIMER_OBJECT */
+/* name Name to search for */
+/* name_length Length of the name excluding */
+/* null-terminator */
+/* object_ptr Pointer to the object */
+/* */
+/* OUTPUT */
+/* */
+/* TX_SUCCESS Successful completion */
+/* TX_PTR_ERROR Invalid name or object ptr */
+/* TX_OPTION_ERROR Invalid option type */
+/* TX_NO_INSTANCE Object not found */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txm_module_object_pointer_get_extended(UINT object_type, CHAR *name, UINT name_length, VOID **object_ptr)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[2];
+
+ extra_parameters[0] = (ALIGN_TYPE) name_length;
+ extra_parameters[1] = (ALIGN_TYPE) object_ptr;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MODULE_OBJECT_POINTER_GET_EXTENDED_CALL, (ALIGN_TYPE) object_type, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_module_thread_system_suspend.c b/common_modules/module_lib/src/txm_module_thread_system_suspend.c
new file mode 100644
index 00000000..a94d3863
--- /dev/null
+++ b/common_modules/module_lib/src/txm_module_thread_system_suspend.c
@@ -0,0 +1,81 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_system_suspend PORTABLE C */
+/* 6.0.1 */
+/* */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function suspends the specified thread and changes the thread */
+/* state to the value specified. Note: delayed suspension processing */
+/* is handled outside of this routine. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread to suspend */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_priority_change Thread priority change */
+/* _tx_thread_shell_entry Thread shell function */
+/* _tx_thread_sleep Thread sleep */
+/* _tx_thread_suspend Application thread suspend */
+/* _tx_thread_terminate Thread terminate */
+/* Other ThreadX Components */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txm_module_thread_system_suspend(TX_THREAD *thread_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_SYSTEM_SUSPEND_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_mutex_create.c b/common_modules/module_lib/src/txm_mutex_create.c
new file mode 100644
index 00000000..458b964e
--- /dev/null
+++ b/common_modules/module_lib/src/txm_mutex_create.c
@@ -0,0 +1,84 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_mutex_create PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the create mutex function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* mutex_ptr Pointer to mutex control block */
+/* name_ptr Pointer to mutex name */
+/* inherit Initial mutex count */
+/* mutex_control_block_size Size of mutex control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_MUTEX_ERROR Invalid mutex pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* TX_INHERIT_ERROR Invalid inherit option */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[2];
+
+ extra_parameters[0] = (ALIGN_TYPE) inherit;
+ extra_parameters[1] = (ALIGN_TYPE) mutex_control_block_size;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_CREATE_CALL, (ALIGN_TYPE) mutex_ptr, (ALIGN_TYPE) name_ptr, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_mutex_delete.c b/common_modules/module_lib/src/txm_mutex_delete.c
new file mode 100644
index 00000000..4773c9c1
--- /dev/null
+++ b/common_modules/module_lib/src/txm_mutex_delete.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_mutex_delete PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the mutex delete function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* mutex_ptr Pointer to mutex control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_MUTEX_ERROR Invalid mutex pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_DELETE_CALL, (ALIGN_TYPE) mutex_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_mutex_get.c b/common_modules/module_lib/src/txm_mutex_get.c
new file mode 100644
index 00000000..2c48dacd
--- /dev/null
+++ b/common_modules/module_lib/src/txm_mutex_get.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_mutex_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the mutex get function call. */
+/* */
+/* INPUT */
+/* */
+/* mutex_ptr Pointer to mutex control block */
+/* wait_option Suspension option */
+/* */
+/* OUTPUT */
+/* */
+/* TX_MUTEX_ERROR Invalid mutex pointer */
+/* TX_WAIT_ERROR Invalid wait option */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_GET_CALL, (ALIGN_TYPE) mutex_ptr, (ALIGN_TYPE) wait_option, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_mutex_info_get.c b/common_modules/module_lib/src/txm_mutex_info_get.c
new file mode 100644
index 00000000..9f9c45f9
--- /dev/null
+++ b/common_modules/module_lib/src/txm_mutex_info_get.c
@@ -0,0 +1,91 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_mutex_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the mutex information get */
+/* service. */
+/* */
+/* INPUT */
+/* */
+/* mutex_ptr Pointer to mutex control block */
+/* name Destination for the mutex name */
+/* count Destination for the owner count */
+/* owner Destination for the owner's */
+/* thread control block pointer */
+/* first_suspended Destination for pointer of first */
+/* thread suspended on the mutex */
+/* suspended_count Destination for suspended count */
+/* next_mutex Destination for pointer to next */
+/* mutex on the created list */
+/* */
+/* OUTPUT */
+/* */
+/* TX_MUTEX_ERROR Invalid mutex pointer */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[5];
+
+ extra_parameters[0] = (ALIGN_TYPE) count;
+ extra_parameters[1] = (ALIGN_TYPE) owner;
+ extra_parameters[2] = (ALIGN_TYPE) first_suspended;
+ extra_parameters[3] = (ALIGN_TYPE) suspended_count;
+ extra_parameters[4] = (ALIGN_TYPE) next_mutex;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_INFO_GET_CALL, (ALIGN_TYPE) mutex_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_mutex_performance_info_get.c b/common_modules/module_lib/src/txm_mutex_performance_info_get.c
new file mode 100644
index 00000000..4a7c518b
--- /dev/null
+++ b/common_modules/module_lib/src/txm_mutex_performance_info_get.c
@@ -0,0 +1,93 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_mutex_performance_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves performance information from the specified */
+/* mutex. */
+/* */
+/* INPUT */
+/* */
+/* mutex_ptr Pointer to mutex control block */
+/* puts Destination for the number of */
+/* puts on to this mutex */
+/* gets Destination for the number of */
+/* gets on this mutex */
+/* suspensions Destination for the number of */
+/* suspensions on this mutex */
+/* timeouts Destination for number of timeouts*/
+/* on this mutex */
+/* inversions Destination for number of priority*/
+/* inversions on this mutex */
+/* inheritances Destination for number of priority*/
+/* inheritances on this mutex */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[5];
+
+ extra_parameters[0] = (ALIGN_TYPE) gets;
+ extra_parameters[1] = (ALIGN_TYPE) suspensions;
+ extra_parameters[2] = (ALIGN_TYPE) timeouts;
+ extra_parameters[3] = (ALIGN_TYPE) inversions;
+ extra_parameters[4] = (ALIGN_TYPE) inheritances;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) mutex_ptr, (ALIGN_TYPE) puts, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_mutex_performance_system_info_get.c b/common_modules/module_lib/src/txm_mutex_performance_system_info_get.c
new file mode 100644
index 00000000..09df71e3
--- /dev/null
+++ b/common_modules/module_lib/src/txm_mutex_performance_system_info_get.c
@@ -0,0 +1,90 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_mutex_performance_system_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves system mutex performance information. */
+/* */
+/* INPUT */
+/* */
+/* puts Destination for total number of */
+/* mutex puts */
+/* gets Destination for total number of */
+/* mutex gets */
+/* suspensions Destination for total number of */
+/* mutex suspensions */
+/* timeouts Destination for total number of */
+/* mutex timeouts */
+/* inversions Destination for total number of */
+/* mutex priority inversions */
+/* inheritances Destination for total number of */
+/* mutex priority inheritances */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_mutex_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[4];
+
+ extra_parameters[0] = (ALIGN_TYPE) suspensions;
+ extra_parameters[1] = (ALIGN_TYPE) timeouts;
+ extra_parameters[2] = (ALIGN_TYPE) inversions;
+ extra_parameters[3] = (ALIGN_TYPE) inheritances;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_PERFORMANCE_SYSTEM_INFO_GET_CALL, (ALIGN_TYPE) puts, (ALIGN_TYPE) gets, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_mutex_prioritize.c b/common_modules/module_lib/src/txm_mutex_prioritize.c
new file mode 100644
index 00000000..a499ecfb
--- /dev/null
+++ b/common_modules/module_lib/src/txm_mutex_prioritize.c
@@ -0,0 +1,73 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_mutex_prioritize PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the mutex prioritize call. */
+/* */
+/* INPUT */
+/* */
+/* mutex_ptr Pointer to mutex control block */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_PRIORITIZE_CALL, (ALIGN_TYPE) mutex_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_mutex_put.c b/common_modules/module_lib/src/txm_mutex_put.c
new file mode 100644
index 00000000..b49a5ed5
--- /dev/null
+++ b/common_modules/module_lib/src/txm_mutex_put.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_mutex_put PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the mutex put function call. */
+/* */
+/* INPUT */
+/* */
+/* mutex_ptr Pointer to mutex control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_MUTEX_ERROR Invalid mutex pointer */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_mutex_put(TX_MUTEX *mutex_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MUTEX_PUT_CALL, (ALIGN_TYPE) mutex_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_create.c b/common_modules/module_lib/src/txm_queue_create.c
new file mode 100644
index 00000000..ea61f29c
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_create.c
@@ -0,0 +1,87 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_create PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue create function call. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* name_ptr Pointer to queue name */
+/* message_size Size of each queue message */
+/* queue_start Starting address of the queue area*/
+/* queue_size Number of bytes in the queue */
+/* queue_control_block_size Size of queue control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_QUEUE_ERROR Invalid queue pointer */
+/* TX_PTR_ERROR Invalid starting address of queue */
+/* TX_SIZE_ERROR Invalid message queue size */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[4];
+
+ extra_parameters[0] = (ALIGN_TYPE) message_size;
+ extra_parameters[1] = (ALIGN_TYPE) queue_start;
+ extra_parameters[2] = (ALIGN_TYPE) queue_size;
+ extra_parameters[3] = (ALIGN_TYPE) queue_control_block_size;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_CREATE_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) name_ptr, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_delete.c b/common_modules/module_lib/src/txm_queue_delete.c
new file mode 100644
index 00000000..d277e3c0
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_delete.c
@@ -0,0 +1,75 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_delete PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue delete function call. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_QUEUE_ERROR Invalid queue pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_queue_delete(TX_QUEUE *queue_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_DELETE_CALL, (ALIGN_TYPE) queue_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_flush.c b/common_modules/module_lib/src/txm_queue_flush.c
new file mode 100644
index 00000000..22ba4f48
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_flush.c
@@ -0,0 +1,75 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_flush PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue flush function call. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_QUEUE_ERROR Invalid queue pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_queue_flush(TX_QUEUE *queue_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_FLUSH_CALL, (ALIGN_TYPE) queue_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_front_send.c b/common_modules/module_lib/src/txm_queue_front_send.c
new file mode 100644
index 00000000..88b847ff
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_front_send.c
@@ -0,0 +1,78 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_front_send PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue send function call. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* source_ptr Pointer to message source */
+/* wait_option Suspension option */
+/* */
+/* OUTPUT */
+/* */
+/* TX_QUEUE_ERROR Invalid queue pointer */
+/* TX_PTR_ERROR Invalid source pointer - NULL */
+/* TX_WAIT_ERROR Invalid wait option - non thread */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_FRONT_SEND_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) source_ptr, (ALIGN_TYPE) wait_option);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_info_get.c b/common_modules/module_lib/src/txm_queue_info_get.c
new file mode 100644
index 00000000..5c4147a9
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_info_get.c
@@ -0,0 +1,90 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue information get */
+/* service. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* name Destination for the queue name */
+/* enqueued Destination for enqueued count */
+/* available_storage Destination for available storage */
+/* first_suspended Destination for pointer of first */
+/* thread suspended on this queue */
+/* suspended_count Destination for suspended count */
+/* next_queue Destination for pointer to next */
+/* queue on the created list */
+/* */
+/* OUTPUT */
+/* */
+/* TX_QUEUE_ERROR Invalid queue pointer */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[5];
+
+ extra_parameters[0] = (ALIGN_TYPE) enqueued;
+ extra_parameters[1] = (ALIGN_TYPE) available_storage;
+ extra_parameters[2] = (ALIGN_TYPE) first_suspended;
+ extra_parameters[3] = (ALIGN_TYPE) suspended_count;
+ extra_parameters[4] = (ALIGN_TYPE) next_queue;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_INFO_GET_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_performance_info_get.c b/common_modules/module_lib/src/txm_queue_performance_info_get.c
new file mode 100644
index 00000000..ace108b6
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_performance_info_get.c
@@ -0,0 +1,91 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_queue_performance_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves performance information from the specified */
+/* queue. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* messages_sent Destination for messages sent */
+/* messages_received Destination for messages received */
+/* empty_suspensions Destination for number of empty */
+/* queue suspensions */
+/* full_suspensions Destination for number of full */
+/* queue suspensions */
+/* full_errors Destination for queue full errors */
+/* returned - no suspension */
+/* timeouts Destination for number of timeouts*/
+/* on this queue */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_queue_performance_info_get(TX_QUEUE *queue_ptr, ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[5];
+
+ extra_parameters[0] = (ALIGN_TYPE) messages_received;
+ extra_parameters[1] = (ALIGN_TYPE) empty_suspensions;
+ extra_parameters[2] = (ALIGN_TYPE) full_suspensions;
+ extra_parameters[3] = (ALIGN_TYPE) full_errors;
+ extra_parameters[4] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) messages_sent, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_performance_system_info_get.c b/common_modules/module_lib/src/txm_queue_performance_system_info_get.c
new file mode 100644
index 00000000..78840480
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_performance_system_info_get.c
@@ -0,0 +1,90 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_queue_performance_system_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves queue system performance information. */
+/* */
+/* INPUT */
+/* */
+/* messages_sent Destination for total messages */
+/* sent */
+/* messages_received Destination for total messages */
+/* received */
+/* empty_suspensions Destination for total empty */
+/* queue suspensions */
+/* full_suspensions Destination for total full */
+/* queue suspensions */
+/* full_errors Destination for total queue full */
+/* errors returned - no suspension */
+/* timeouts Destination for total number of */
+/* timeouts */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_queue_performance_system_info_get(ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[4];
+
+ extra_parameters[0] = (ALIGN_TYPE) empty_suspensions;
+ extra_parameters[1] = (ALIGN_TYPE) full_suspensions;
+ extra_parameters[2] = (ALIGN_TYPE) full_errors;
+ extra_parameters[3] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_PERFORMANCE_SYSTEM_INFO_GET_CALL, (ALIGN_TYPE) messages_sent, (ALIGN_TYPE) messages_received, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_prioritize.c b/common_modules/module_lib/src/txm_queue_prioritize.c
new file mode 100644
index 00000000..8d368808
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_prioritize.c
@@ -0,0 +1,73 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_prioritize PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue prioritize call. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_PRIORITIZE_CALL, (ALIGN_TYPE) queue_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_receive.c b/common_modules/module_lib/src/txm_queue_receive.c
new file mode 100644
index 00000000..dea6bfcd
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_receive.c
@@ -0,0 +1,80 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_receive PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue receive function call. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* destination_ptr Pointer to message destination */
+/* **** MUST BE LARGE ENOUGH TO */
+/* HOLD MESSAGE **** */
+/* wait_option Suspension option */
+/* */
+/* OUTPUT */
+/* */
+/* TX_QUEUE_ERROR Invalid queue pointer */
+/* TX_PTR_ERROR Invalid destination pointer (NULL)*/
+/* TX_WAIT_ERROR Invalid wait option */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_RECEIVE_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) destination_ptr, (ALIGN_TYPE) wait_option);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_send.c b/common_modules/module_lib/src/txm_queue_send.c
new file mode 100644
index 00000000..00f9b344
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_send.c
@@ -0,0 +1,78 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_send PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue send function call. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block */
+/* source_ptr Pointer to message source */
+/* wait_option Suspension option */
+/* */
+/* OUTPUT */
+/* */
+/* TX_QUEUE_ERROR Invalid queue pointer */
+/* TX_PTR_ERROR Invalid source pointer - NULL */
+/* TX_WAIT_ERROR Invalid wait option */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_SEND_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) source_ptr, (ALIGN_TYPE) wait_option);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_queue_send_notify.c b/common_modules/module_lib/src/txm_queue_send_notify.c
new file mode 100644
index 00000000..c4be8e51
--- /dev/null
+++ b/common_modules/module_lib/src/txm_queue_send_notify.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_queue_send_notify PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the queue send notify */
+/* callback function call. */
+/* */
+/* INPUT */
+/* */
+/* queue_ptr Pointer to queue control block*/
+/* queue_send_notify Application callback function */
+/* (TX_NULL disables notify) */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr))
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_QUEUE_SEND_NOTIFY_CALL, (ALIGN_TYPE) queue_ptr, (ALIGN_TYPE) queue_send_notify, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_ceiling_put.c b/common_modules/module_lib/src/txm_semaphore_ceiling_put.c
new file mode 100644
index 00000000..1c7c5967
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_ceiling_put.c
@@ -0,0 +1,77 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_semaphore_ceiling_put PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the semaphore ceiling put */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore */
+/* ceiling Maximum value of semaphore */
+/* */
+/* OUTPUT */
+/* */
+/* TX_SEMAPHORE_ERROR Invalid semaphore pointer */
+/* TX_INVALID_CEILING Invalid semaphore ceiling */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_CEILING_PUT_CALL, (ALIGN_TYPE) semaphore_ptr, (ALIGN_TYPE) ceiling, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_create.c b/common_modules/module_lib/src/txm_semaphore_create.c
new file mode 100644
index 00000000..31ae876a
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_create.c
@@ -0,0 +1,83 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_semaphore_create PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the create semaphore function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore control block*/
+/* name_ptr Pointer to semaphore name */
+/* initial_count Initial semaphore count */
+/* semaphore_control_block_size Size of semaphore control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_SEMAPHORE_ERROR Invalid semaphore pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[2];
+
+ extra_parameters[0] = (ALIGN_TYPE) initial_count;
+ extra_parameters[1] = (ALIGN_TYPE) semaphore_control_block_size;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_CREATE_CALL, (ALIGN_TYPE) semaphore_ptr, (ALIGN_TYPE) name_ptr, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_delete.c b/common_modules/module_lib/src/txm_semaphore_delete.c
new file mode 100644
index 00000000..7180584a
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_delete.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_semaphore_delete PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the semaphore delete function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore control block*/
+/* */
+/* OUTPUT */
+/* */
+/* TX_SEMAPHORE_ERROR Invalid semaphore pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_DELETE_CALL, (ALIGN_TYPE) semaphore_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_get.c b/common_modules/module_lib/src/txm_semaphore_get.c
new file mode 100644
index 00000000..b447d32f
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_get.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_semaphore_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the semaphore get function call. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore control block*/
+/* wait_option Suspension option */
+/* */
+/* OUTPUT */
+/* */
+/* TX_SEMAPHORE_ERROR Invalid semaphore pointer */
+/* TX_WAIT_ERROR Invalid wait option */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_GET_CALL, (ALIGN_TYPE) semaphore_ptr, (ALIGN_TYPE) wait_option, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_info_get.c b/common_modules/module_lib/src/txm_semaphore_info_get.c
new file mode 100644
index 00000000..7c82c619
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_info_get.c
@@ -0,0 +1,89 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_semaphore_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the semaphore information get */
+/* service. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore control block*/
+/* name Destination for the semaphore name*/
+/* current_value Destination for current value of */
+/* the semaphore */
+/* first_suspended Destination for pointer of first */
+/* thread suspended on semaphore */
+/* suspended_count Destination for suspended count */
+/* next_semaphore Destination for pointer to next */
+/* semaphore on the created list */
+/* */
+/* OUTPUT */
+/* */
+/* TX_SEMAPHORE_ERROR Invalid semaphore pointer */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[4];
+
+ extra_parameters[0] = (ALIGN_TYPE) current_value;
+ extra_parameters[1] = (ALIGN_TYPE) first_suspended;
+ extra_parameters[2] = (ALIGN_TYPE) suspended_count;
+ extra_parameters[3] = (ALIGN_TYPE) next_semaphore;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_INFO_GET_CALL, (ALIGN_TYPE) semaphore_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_performance_info_get.c b/common_modules/module_lib/src/txm_semaphore_performance_info_get.c
new file mode 100644
index 00000000..f845afe0
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_performance_info_get.c
@@ -0,0 +1,87 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_semaphore_performance_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves performance information from the specified */
+/* semaphore. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore control block*/
+/* puts Destination for the number of */
+/* puts on to this semaphore */
+/* gets Destination for the number of */
+/* gets on this semaphore */
+/* suspensions Destination for the number of */
+/* suspensions on this semaphore */
+/* timeouts Destination for number of timeouts*/
+/* on this semaphore */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[3];
+
+ extra_parameters[0] = (ALIGN_TYPE) gets;
+ extra_parameters[1] = (ALIGN_TYPE) suspensions;
+ extra_parameters[2] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) semaphore_ptr, (ALIGN_TYPE) puts, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_performance_system_info_get.c b/common_modules/module_lib/src/txm_semaphore_performance_system_info_get.c
new file mode 100644
index 00000000..f2db0a7c
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_performance_system_info_get.c
@@ -0,0 +1,84 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_semaphore_performance_system_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves system semaphore performance information. */
+/* */
+/* INPUT */
+/* */
+/* puts Destination for total number of */
+/* semaphore puts */
+/* gets Destination for total number of */
+/* semaphore gets */
+/* suspensions Destination for total number of */
+/* semaphore suspensions */
+/* timeouts Destination for total number of */
+/* timeouts */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_semaphore_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[2];
+
+ extra_parameters[0] = (ALIGN_TYPE) suspensions;
+ extra_parameters[1] = (ALIGN_TYPE) timeouts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_PERFORMANCE_SYSTEM_INFO_GET_CALL, (ALIGN_TYPE) puts, (ALIGN_TYPE) gets, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_prioritize.c b/common_modules/module_lib/src/txm_semaphore_prioritize.c
new file mode 100644
index 00000000..505937d1
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_prioritize.c
@@ -0,0 +1,73 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_semaphore_prioritize PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the semaphore prioritize call. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore control block*/
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_PRIORITIZE_CALL, (ALIGN_TYPE) semaphore_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_put.c b/common_modules/module_lib/src/txm_semaphore_put.c
new file mode 100644
index 00000000..0233b166
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_put.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_semaphore_put PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the semaphore put function call. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore control block*/
+/* */
+/* OUTPUT */
+/* */
+/* TX_SEMAPHORE_ERROR Invalid semaphore pointer */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_semaphore_put(TX_SEMAPHORE *semaphore_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_PUT_CALL, (ALIGN_TYPE) semaphore_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_semaphore_put_notify.c b/common_modules/module_lib/src/txm_semaphore_put_notify.c
new file mode 100644
index 00000000..7a884677
--- /dev/null
+++ b/common_modules/module_lib/src/txm_semaphore_put_notify.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_semaphore_put_notify PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the semaphore put notify */
+/* callback function call. */
+/* */
+/* INPUT */
+/* */
+/* semaphore_ptr Pointer to semaphore */
+/* semaphore_put_notify Application callback function */
+/* (TX_NULL disables notify) */
+/* */
+/* OUTPUT */
+/* */
+/* status Service return status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr))
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_PUT_NOTIFY_CALL, (ALIGN_TYPE) semaphore_ptr, (ALIGN_TYPE) semaphore_put_notify, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_create.c b/common_modules/module_lib/src/txm_thread_create.c
new file mode 100644
index 00000000..1a756ea7
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_create.c
@@ -0,0 +1,100 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_create PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the thread create function call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Thread control block pointer */
+/* name Pointer to thread name string */
+/* entry_function Entry function of the thread */
+/* entry_input 32-bit input value to thread */
+/* stack_start Pointer to start of stack */
+/* stack_size Stack size in bytes */
+/* priority Priority of thread (0-31) */
+/* preempt_threshold Preemption threshold */
+/* time_slice Thread time-slice value */
+/* auto_start Automatic start selection */
+/* thread_control_block_size Size of thread control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* TX_PTR_ERROR Invalid entry point or stack */
+/* address */
+/* TX_SIZE_ERROR Invalid stack size -too small */
+/* TX_PRIORITY_ERROR Invalid thread priority */
+/* TX_THRESH_ERROR Invalid preemption threshold */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, ULONG time_slice, UINT auto_start, UINT thread_control_block_size)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[9];
+
+ extra_parameters[0] = (ALIGN_TYPE) entry_function;
+ extra_parameters[1] = (ALIGN_TYPE) entry_input;
+ extra_parameters[2] = (ALIGN_TYPE) stack_start;
+ extra_parameters[3] = (ALIGN_TYPE) stack_size;
+ extra_parameters[4] = (ALIGN_TYPE) priority;
+ extra_parameters[5] = (ALIGN_TYPE) preempt_threshold;
+ extra_parameters[6] = (ALIGN_TYPE) time_slice;
+ extra_parameters[7] = (ALIGN_TYPE) auto_start;
+ extra_parameters[8] = (ALIGN_TYPE) thread_control_block_size;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_CREATE_CALL, (ALIGN_TYPE) thread_ptr, (ALIGN_TYPE) name_ptr, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_delete.c b/common_modules/module_lib/src/txm_thread_delete.c
new file mode 100644
index 00000000..d8812755
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_delete.c
@@ -0,0 +1,75 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_delete PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the thread delete function call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread to suspend */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* TX_CALLER_ERROR Invalid caller of function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_delete(TX_THREAD *thread_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_DELETE_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_entry_exit_notify.c b/common_modules/module_lib/src/txm_thread_entry_exit_notify.c
new file mode 100644
index 00000000..163b666f
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_entry_exit_notify.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_entry_exit_notify PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the thread entry/exit notify */
+/* callback function call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread */
+/* thread_entry_exit_notify Pointer to notify callback */
+/* function, TX_NULL to disable*/
+/* */
+/* OUTPUT */
+/* */
+/* status Service return status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type))
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_ENTRY_EXIT_NOTIFY_CALL, (ALIGN_TYPE) thread_ptr, (ALIGN_TYPE) thread_entry_exit_notify, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_identify.c b/common_modules/module_lib/src/txm_thread_identify.c
new file mode 100644
index 00000000..b2c5eb10
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_identify.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_identify PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function returns the control block pointer of the currently */
+/* executing thread. If the return value is NULL, no thread is */
+/* executing. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD * Pointer to control block of */
+/* currently executing thread */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+TX_THREAD *_tx_thread_identify(VOID)
+{
+
+TX_THREAD *return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (TX_THREAD *) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_IDENTIFY_CALL, 0, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_info_get.c b/common_modules/module_lib/src/txm_thread_info_get.c
new file mode 100644
index 00000000..a8ecc93c
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_info_get.c
@@ -0,0 +1,95 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the thread information get */
+/* service. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control block */
+/* name Destination for the thread name */
+/* state Destination for thread state */
+/* run_count Destination for thread run count */
+/* priority Destination for thread priority */
+/* preemption_threshold Destination for thread preemption-*/
+/* threshold */
+/* time_slice Destination for thread time-slice */
+/* next_thread Destination for next created */
+/* thread */
+/* next_suspended_thread Destination for next suspended */
+/* thread */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[7];
+
+ extra_parameters[0] = (ALIGN_TYPE) state;
+ extra_parameters[1] = (ALIGN_TYPE) run_count;
+ extra_parameters[2] = (ALIGN_TYPE) priority;
+ extra_parameters[3] = (ALIGN_TYPE) preemption_threshold;
+ extra_parameters[4] = (ALIGN_TYPE) time_slice;
+ extra_parameters[5] = (ALIGN_TYPE) next_thread;
+ extra_parameters[6] = (ALIGN_TYPE) next_suspended_thread;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_INFO_GET_CALL, (ALIGN_TYPE) thread_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_interrupt_control.c b/common_modules/module_lib/src/txm_thread_interrupt_control.c
new file mode 100644
index 00000000..a3df15ed
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_interrupt_control.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_interrupt_control PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is responsible for changing the interrupt lockout */
+/* posture of the system. */
+/* */
+/* INPUT */
+/* */
+/* new_posture New interrupt lockout posture */
+/* */
+/* OUTPUT */
+/* */
+/* status | old_posture Return status if feature not */
+/* enabled, old interrupt lockout */
+/* posture if feature enabled. */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_thread_interrupt_control(UINT new_posture)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_INTERRUPT_CONTROL_CALL, (ALIGN_TYPE) new_posture, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_performance_info_get.c b/common_modules/module_lib/src/txm_thread_performance_info_get.c
new file mode 100644
index 00000000..af58f66f
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_performance_info_get.c
@@ -0,0 +1,110 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_performance_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves performance information from the specified */
+/* thread. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control block */
+/* resumptions Destination for number of times */
+/* thread was resumed */
+/* suspensions Destination for number of times */
+/* thread was suspended */
+/* solicited_preemptions Destination for number of times */
+/* thread called another service */
+/* that resulted in preemption */
+/* interrupt_preemptions Destination for number of times */
+/* thread was preempted by another */
+/* thread made ready in Interrupt */
+/* Service Routine (ISR) */
+/* priority_inversions Destination for number of times */
+/* a priority inversion was */
+/* detected for this thread */
+/* time_slices Destination for number of times */
+/* thread was time-sliced */
+/* relinquishes Destination for number of thread */
+/* relinquishes */
+/* timeouts Destination for number of timeouts*/
+/* for thread */
+/* wait_aborts Destination for number of wait */
+/* aborts for thread */
+/* last_preempted_by Destination for pointer of the */
+/* thread that last preempted this */
+/* thread */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+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 return_value;
+ALIGN_TYPE extra_parameters[9];
+
+ extra_parameters[0] = (ALIGN_TYPE) suspensions;
+ extra_parameters[1] = (ALIGN_TYPE) solicited_preemptions;
+ extra_parameters[2] = (ALIGN_TYPE) interrupt_preemptions;
+ extra_parameters[3] = (ALIGN_TYPE) priority_inversions;
+ extra_parameters[4] = (ALIGN_TYPE) time_slices;
+ extra_parameters[5] = (ALIGN_TYPE) relinquishes;
+ extra_parameters[6] = (ALIGN_TYPE) timeouts;
+ extra_parameters[7] = (ALIGN_TYPE) wait_aborts;
+ extra_parameters[8] = (ALIGN_TYPE) last_preempted_by;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) thread_ptr, (ALIGN_TYPE) resumptions, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_performance_system_info_get.c b/common_modules/module_lib/src/txm_thread_performance_system_info_get.c
new file mode 100644
index 00000000..a696f74c
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_performance_system_info_get.c
@@ -0,0 +1,110 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_performance_system_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves thread system performance information. */
+/* */
+/* INPUT */
+/* */
+/* resumptions Destination for total number of */
+/* thread resumptions */
+/* suspensions Destination for total number of */
+/* thread suspensions */
+/* solicited_preemptions Destination for total number of */
+/* thread preemption from thread */
+/* API calls */
+/* interrupt_preemptions Destination for total number of */
+/* thread preemptions as a result */
+/* of threads made ready inside of */
+/* Interrupt Service Routines */
+/* priority_inversions Destination for total number of */
+/* priority inversions */
+/* time_slices Destination for total number of */
+/* time-slices */
+/* relinquishes Destination for total number of */
+/* relinquishes */
+/* timeouts Destination for total number of */
+/* timeouts */
+/* wait_aborts Destination for total number of */
+/* wait aborts */
+/* non_idle_returns Destination for total number of */
+/* times threads return when */
+/* another thread is ready */
+/* idle_returns Destination for total number of */
+/* times threads return when no */
+/* other thread is ready */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_thread_performance_system_info_get(ULONG *resumptions, ULONG *suspensions, ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions, ULONG *time_slices, ULONG *relinquishes, ULONG *timeouts, ULONG *wait_aborts, ULONG *non_idle_returns, ULONG *idle_returns)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[9];
+
+ extra_parameters[0] = (ALIGN_TYPE) solicited_preemptions;
+ extra_parameters[1] = (ALIGN_TYPE) interrupt_preemptions;
+ extra_parameters[2] = (ALIGN_TYPE) priority_inversions;
+ extra_parameters[3] = (ALIGN_TYPE) time_slices;
+ extra_parameters[4] = (ALIGN_TYPE) relinquishes;
+ extra_parameters[5] = (ALIGN_TYPE) timeouts;
+ extra_parameters[6] = (ALIGN_TYPE) wait_aborts;
+ extra_parameters[7] = (ALIGN_TYPE) non_idle_returns;
+ extra_parameters[8] = (ALIGN_TYPE) idle_returns;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_PERFORMANCE_SYSTEM_INFO_GET_CALL, (ALIGN_TYPE) resumptions, (ALIGN_TYPE) suspensions, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_preemption_change.c b/common_modules/module_lib/src/txm_thread_preemption_change.c
new file mode 100644
index 00000000..ef9195ef
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_preemption_change.c
@@ -0,0 +1,79 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_preemption_change PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the preemption threshold change */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread */
+/* new_threshold New preemption threshold */
+/* old_threshold Old preemption threshold */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* TX_PTR_ERROR Invalid old threshold pointer */
+/* TX_CALLER_ERROR Invalid caller of function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_PREEMPTION_CHANGE_CALL, (ALIGN_TYPE) thread_ptr, (ALIGN_TYPE) new_threshold, (ALIGN_TYPE) old_threshold);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_priority_change.c b/common_modules/module_lib/src/txm_thread_priority_change.c
new file mode 100644
index 00000000..08da0b00
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_priority_change.c
@@ -0,0 +1,79 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_priority_change PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the change priority function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread to suspend */
+/* new_priority New thread priority */
+/* old_priority Old thread priority */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* TX_PTR_ERROR Invalid old priority pointer */
+/* TX_CALLER_ERROR Invalid caller of function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_PRIORITY_CHANGE_CALL, (ALIGN_TYPE) thread_ptr, (ALIGN_TYPE) new_priority, (ALIGN_TYPE) old_priority);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_relinquish.c b/common_modules/module_lib/src/txm_thread_relinquish.c
new file mode 100644
index 00000000..cc7acc9a
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_relinquish.c
@@ -0,0 +1,70 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_relinquish PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks to make sure a thread is executing before the */
+/* relinquish is executed. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+VOID _txe_thread_relinquish(VOID)
+{
+
+
+ /* Call module manager dispatcher. */
+ (_txm_module_kernel_call_dispatcher)(TXM_THREAD_RELINQUISH_CALL, 0, 0, 0);
+}
diff --git a/common_modules/module_lib/src/txm_thread_reset.c b/common_modules/module_lib/src/txm_thread_reset.c
new file mode 100644
index 00000000..b907f30d
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_reset.c
@@ -0,0 +1,75 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_reset PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the thread reset function call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread to reset */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* TX_CALLER_ERROR Invalid caller of function */
+/* status Service return status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_reset(TX_THREAD *thread_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_RESET_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_resume.c b/common_modules/module_lib/src/txm_thread_resume.c
new file mode 100644
index 00000000..8738f346
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_resume.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_resume PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the resume thread function call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread to resume */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_resume(TX_THREAD *thread_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_RESUME_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_sleep.c b/common_modules/module_lib/src/txm_thread_sleep.c
new file mode 100644
index 00000000..f9e9a291
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_sleep.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_sleep PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function handles application thread sleep requests. If the */
+/* sleep request was called from a non-thread, an error is returned. */
+/* */
+/* INPUT */
+/* */
+/* timer_ticks Number of timer ticks to sleep*/
+/* */
+/* OUTPUT */
+/* */
+/* status Return completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_thread_sleep(ULONG timer_ticks)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_SLEEP_CALL, (ALIGN_TYPE) timer_ticks, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_stack_error_notify.c b/common_modules/module_lib/src/txm_thread_stack_error_notify.c
new file mode 100644
index 00000000..f982ed29
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_stack_error_notify.c
@@ -0,0 +1,78 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_stack_error_notify PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function registers an application stack error handler. If */
+/* ThreadX detects a stack error, this application handler is called. */
+/* */
+/* Note: stack checking must be enabled for this routine to serve any */
+/* purpose via the TX_ENABLE_STACK_CHECKING define. */
+/* */
+/* INPUT */
+/* */
+/* stack_error_handler Pointer to stack error */
+/* handler, TX_NULL to disable */
+/* */
+/* OUTPUT */
+/* */
+/* status Service return status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_thread_stack_error_notify(VOID (*stack_error_handler)(TX_THREAD *thread_ptr))
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_STACK_ERROR_NOTIFY_CALL, (ALIGN_TYPE) stack_error_handler, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_suspend.c b/common_modules/module_lib/src/txm_thread_suspend.c
new file mode 100644
index 00000000..a1a496da
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_suspend.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_suspend PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the thread suspend function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread to suspend */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* TX_CALLER_ERROR Invalid caller of function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_suspend(TX_THREAD *thread_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_SUSPEND_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_terminate.c b/common_modules/module_lib/src/txm_thread_terminate.c
new file mode 100644
index 00000000..a082e45b
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_terminate.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_terminate PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the thread terminate function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread to suspend */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* TX_CALLER_ERROR Invalid caller of function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_terminate(TX_THREAD *thread_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_TERMINATE_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_time_slice_change.c b/common_modules/module_lib/src/txm_thread_time_slice_change.c
new file mode 100644
index 00000000..8fbb892e
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_time_slice_change.c
@@ -0,0 +1,78 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_time_slice_change PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the time slice change function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread */
+/* new_time_slice New time slice */
+/* old_time_slice Old time slice */
+/* */
+/* OUTPUT */
+/* */
+/* TX_THREAD_ERROR Invalid thread pointer */
+/* TX_CALLER_ERROR Invalid caller of function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_TIME_SLICE_CHANGE_CALL, (ALIGN_TYPE) thread_ptr, (ALIGN_TYPE) new_time_slice, (ALIGN_TYPE) old_time_slice);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_thread_wait_abort.c b/common_modules/module_lib/src/txm_thread_wait_abort.c
new file mode 100644
index 00000000..ba2da979
--- /dev/null
+++ b/common_modules/module_lib/src/txm_thread_wait_abort.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_thread_wait_abort PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the thread wait abort function */
+/* call. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Thread to abort the wait on */
+/* */
+/* OUTPUT */
+/* */
+/* status Return completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_WAIT_ABORT_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_time_get.c b/common_modules/module_lib/src/txm_time_get.c
new file mode 100644
index 00000000..679acaca
--- /dev/null
+++ b/common_modules/module_lib/src/txm_time_get.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_time_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves the internal, free-running, system clock */
+/* and returns it to the caller. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* _tx_timer_system_clock Returns the system clock value */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+ULONG _tx_time_get(VOID)
+{
+
+ULONG return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (ULONG) (_txm_module_kernel_call_dispatcher)(TXM_TIME_GET_CALL, 0, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_time_set.c b/common_modules/module_lib/src/txm_time_set.c
new file mode 100644
index 00000000..6e081b5a
--- /dev/null
+++ b/common_modules/module_lib/src/txm_time_set.c
@@ -0,0 +1,70 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_time_set PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function modifies the internal, free-running, system clock */
+/* as specified by the caller. */
+/* */
+/* INPUT */
+/* */
+/* new_time New time value */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+VOID _tx_time_set(ULONG new_time)
+{
+
+
+ /* Call module manager dispatcher. */
+ (_txm_module_kernel_call_dispatcher)(TXM_TIME_SET_CALL, (ALIGN_TYPE) new_time, 0, 0);
+}
diff --git a/common_modules/module_lib/src/txm_timer_activate.c b/common_modules/module_lib/src/txm_timer_activate.c
new file mode 100644
index 00000000..cf13e61d
--- /dev/null
+++ b/common_modules/module_lib/src/txm_timer_activate.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_timer_activate PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the activate application timer */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* timer_ptr Pointer to timer control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_TIMER_ERROR Invalid application timer */
+/* TX_ACTIVATE_ERROR Application timer already active */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_timer_activate(TX_TIMER *timer_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_ACTIVATE_CALL, (ALIGN_TYPE) timer_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_timer_change.c b/common_modules/module_lib/src/txm_timer_change.c
new file mode 100644
index 00000000..31da4ac9
--- /dev/null
+++ b/common_modules/module_lib/src/txm_timer_change.c
@@ -0,0 +1,79 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_timer_change PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the application timer change */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* timer_ptr Pointer to timer control block */
+/* initial_ticks Initial expiration ticks */
+/* reschedule_ticks Reschedule ticks */
+/* */
+/* OUTPUT */
+/* */
+/* TX_TIMER_ERROR Invalid application timer pointer */
+/* TX_TICK_ERROR Invalid initial tick value of 0 */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_CHANGE_CALL, (ALIGN_TYPE) timer_ptr, (ALIGN_TYPE) initial_ticks, (ALIGN_TYPE) reschedule_ticks);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_timer_create.c b/common_modules/module_lib/src/txm_timer_create.c
new file mode 100644
index 00000000..b70abd0a
--- /dev/null
+++ b/common_modules/module_lib/src/txm_timer_create.c
@@ -0,0 +1,92 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_timer_create PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the create application timer */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* timer_ptr Pointer to timer control block */
+/* name_ptr Pointer to timer name */
+/* expiration_function Application expiration function */
+/* initial_ticks Initial expiration ticks */
+/* reschedule_ticks Reschedule ticks */
+/* auto_activate Automatic activation flag */
+/* timer_control_block_size Size of timer control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_TIMER_ERROR Invalid timer control block */
+/* TX_TICK_ERROR Invalid initial expiration count */
+/* TX_ACTIVATE_ERROR Invalid timer activation option */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, VOID (*expiration_function)(ULONG), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[6];
+
+ extra_parameters[0] = (ALIGN_TYPE) expiration_function;
+ extra_parameters[1] = (ALIGN_TYPE) expiration_input;
+ extra_parameters[2] = (ALIGN_TYPE) initial_ticks;
+ extra_parameters[3] = (ALIGN_TYPE) reschedule_ticks;
+ extra_parameters[4] = (ALIGN_TYPE) auto_activate;
+ extra_parameters[5] = (ALIGN_TYPE) timer_control_block_size;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_CREATE_CALL, (ALIGN_TYPE) timer_ptr, (ALIGN_TYPE) name_ptr, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_timer_deactivate.c b/common_modules/module_lib/src/txm_timer_deactivate.c
new file mode 100644
index 00000000..7f74bc5c
--- /dev/null
+++ b/common_modules/module_lib/src/txm_timer_deactivate.c
@@ -0,0 +1,75 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_timer_deactivate PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the deactivate application timer */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* timer_ptr Pointer to timer control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_TIMER_ERROR Invalid application timer pointer */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_timer_deactivate(TX_TIMER *timer_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_DEACTIVATE_CALL, (ALIGN_TYPE) timer_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_timer_delete.c b/common_modules/module_lib/src/txm_timer_delete.c
new file mode 100644
index 00000000..df7421bc
--- /dev/null
+++ b/common_modules/module_lib/src/txm_timer_delete.c
@@ -0,0 +1,76 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_timer_delete PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the delete application timer */
+/* function call. */
+/* */
+/* INPUT */
+/* */
+/* timer_ptr Pointer to timer control block */
+/* */
+/* OUTPUT */
+/* */
+/* TX_TIMER_ERROR Invalid application timer pointer */
+/* TX_CALLER_ERROR Invalid caller of this function */
+/* status Actual completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_timer_delete(TX_TIMER *timer_ptr)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_DELETE_CALL, (ALIGN_TYPE) timer_ptr, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_timer_info_get.c b/common_modules/module_lib/src/txm_timer_info_get.c
new file mode 100644
index 00000000..890df7f5
--- /dev/null
+++ b/common_modules/module_lib/src/txm_timer_info_get.c
@@ -0,0 +1,88 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txe_timer_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the timer information get */
+/* service. */
+/* */
+/* INPUT */
+/* */
+/* timer_ptr Pointer to timer control block */
+/* name Destination for the timer name */
+/* active Destination for active flag */
+/* remaining_ticks Destination for remaining ticks */
+/* before expiration */
+/* reschedule_ticks Destination for reschedule ticks */
+/* next_timer Destination for next timer on the */
+/* created list */
+/* */
+/* OUTPUT */
+/* */
+/* TX_TIMER_ERROR Invalid timer pointer */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[4];
+
+ extra_parameters[0] = (ALIGN_TYPE) active;
+ extra_parameters[1] = (ALIGN_TYPE) remaining_ticks;
+ extra_parameters[2] = (ALIGN_TYPE) reschedule_ticks;
+ extra_parameters[3] = (ALIGN_TYPE) next_timer;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_INFO_GET_CALL, (ALIGN_TYPE) timer_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_timer_performance_info_get.c b/common_modules/module_lib/src/txm_timer_performance_info_get.c
new file mode 100644
index 00000000..1896f344
--- /dev/null
+++ b/common_modules/module_lib/src/txm_timer_performance_info_get.c
@@ -0,0 +1,91 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_timer_performance_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves performance information from the specified */
+/* timer. */
+/* */
+/* INPUT */
+/* */
+/* timer_ptr Pointer to timer control block */
+/* activates Destination for the number of */
+/* activations of this timer */
+/* reactivates Destination for the number of */
+/* reactivations of this timer */
+/* deactivates Destination for the number of */
+/* deactivations of this timer */
+/* expirations Destination for the number of */
+/* expirations of this timer */
+/* expiration_adjusts Destination for the number of */
+/* expiration adjustments of this */
+/* timer */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[4];
+
+ extra_parameters[0] = (ALIGN_TYPE) reactivates;
+ extra_parameters[1] = (ALIGN_TYPE) deactivates;
+ extra_parameters[2] = (ALIGN_TYPE) expirations;
+ extra_parameters[3] = (ALIGN_TYPE) expiration_adjusts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_PERFORMANCE_INFO_GET_CALL, (ALIGN_TYPE) timer_ptr, (ALIGN_TYPE) activates, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_timer_performance_system_info_get.c b/common_modules/module_lib/src/txm_timer_performance_system_info_get.c
new file mode 100644
index 00000000..43a00acf
--- /dev/null
+++ b/common_modules/module_lib/src/txm_timer_performance_system_info_get.c
@@ -0,0 +1,87 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_timer_performance_system_info_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function retrieves timer performance information. */
+/* */
+/* INPUT */
+/* */
+/* activates Destination for total number of */
+/* activations */
+/* reactivates Destination for total number of */
+/* reactivations */
+/* deactivates Destination for total number of */
+/* deactivations */
+/* expirations Destination for total number of */
+/* expirations */
+/* expiration_adjusts Destination for total number of */
+/* expiration adjustments */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_timer_performance_system_info_get(ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[3];
+
+ extra_parameters[0] = (ALIGN_TYPE) deactivates;
+ extra_parameters[1] = (ALIGN_TYPE) expirations;
+ extra_parameters[2] = (ALIGN_TYPE) expiration_adjusts;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TIMER_PERFORMANCE_SYSTEM_INFO_GET_CALL, (ALIGN_TYPE) activates, (ALIGN_TYPE) reactivates, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_trace_buffer_full_notify.c b/common_modules/module_lib/src/txm_trace_buffer_full_notify.c
new file mode 100644
index 00000000..703cade7
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_buffer_full_notify.c
@@ -0,0 +1,77 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_buffer_full_notify PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function sets up the application callback function that is */
+/* called whenever the trace buffer becomes full. The application */
+/* can then swap to a new trace buffer in order not to lose any */
+/* events. */
+/* */
+/* INPUT */
+/* */
+/* full_buffer_callback Full trace buffer processing */
+/* function */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_trace_buffer_full_notify(VOID (*full_buffer_callback)(VOID *buffer))
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_BUFFER_FULL_NOTIFY_CALL, (ALIGN_TYPE) full_buffer_callback, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_trace_disable.c b/common_modules/module_lib/src/txm_trace_disable.c
new file mode 100644
index 00000000..9e5ab99b
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_disable.c
@@ -0,0 +1,73 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_disable PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function disables trace inside of ThreadX. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_trace_disable(VOID)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_DISABLE_CALL, 0, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_trace_enable.c b/common_modules/module_lib/src/txm_trace_enable.c
new file mode 100644
index 00000000..2e14265c
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_enable.c
@@ -0,0 +1,77 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_enable PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function initializes the ThreadX trace buffer and the */
+/* associated control variables, enabling it for operation. */
+/* */
+/* INPUT */
+/* */
+/* trace_buffer_start Start of trace buffer */
+/* trace_buffer_size Size (bytes) of trace buffer */
+/* registry_entries Number of object registry */
+/* entries. */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_trace_enable(VOID *trace_buffer_start, ULONG trace_buffer_size, ULONG registry_entries)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_ENABLE_CALL, (ALIGN_TYPE) trace_buffer_start, (ALIGN_TYPE) trace_buffer_size, (ALIGN_TYPE) registry_entries);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_trace_event_filter.c b/common_modules/module_lib/src/txm_trace_event_filter.c
new file mode 100644
index 00000000..dda12e36
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_event_filter.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_event_filter PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function sets up the event filter, which allows the */
+/* application to filter various trace events during run-time. */
+/* */
+/* INPUT */
+/* */
+/* event_filter_bits Trace filter event bit(s) */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_trace_event_filter(ULONG event_filter_bits)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_EVENT_FILTER_CALL, (ALIGN_TYPE) event_filter_bits, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_trace_event_unfilter.c b/common_modules/module_lib/src/txm_trace_event_unfilter.c
new file mode 100644
index 00000000..fcff4a38
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_event_unfilter.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_event_unfilter PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function removes the event filter, which allows the */
+/* application to un-filter various trace events during run-time. */
+/* */
+/* INPUT */
+/* */
+/* event_unfilter_bits Trace un-filter event bit(s) */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_trace_event_unfilter(ULONG event_unfilter_bits)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_EVENT_UNFILTER_CALL, (ALIGN_TYPE) event_unfilter_bits, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_trace_interrupt_control.c b/common_modules/module_lib/src/txm_trace_interrupt_control.c
new file mode 100644
index 00000000..76cb7ebb
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_interrupt_control.c
@@ -0,0 +1,74 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_interrupt_control PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function provides a shell for the tx_interrupt_control */
+/* function so that a trace event can be logged for its use. */
+/* */
+/* INPUT */
+/* */
+/* new_posture New interrupt posture */
+/* */
+/* OUTPUT */
+/* */
+/* Previous Interrupt Posture */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_trace_interrupt_control(UINT new_posture)
+{
+
+UINT return_value;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_INTERRUPT_CONTROL_CALL, (ALIGN_TYPE) new_posture, 0, 0);
+
+ /* Return value to the caller. */
+ return(return_value);
+}
diff --git a/common_modules/module_lib/src/txm_trace_isr_enter_insert.c b/common_modules/module_lib/src/txm_trace_isr_enter_insert.c
new file mode 100644
index 00000000..734aaa61
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_isr_enter_insert.c
@@ -0,0 +1,70 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_isr_enter_insert PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function provides inserts an ISR entry event into the trace */
+/* buffer. */
+/* */
+/* INPUT */
+/* */
+/* isr_id User defined ISR ID */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+VOID _tx_trace_isr_enter_insert(ULONG isr_id)
+{
+
+
+ /* Call module manager dispatcher. */
+ (_txm_module_kernel_call_dispatcher)(TXM_TRACE_ISR_ENTER_INSERT_CALL, (ALIGN_TYPE) isr_id, 0, 0);
+}
diff --git a/common_modules/module_lib/src/txm_trace_isr_exit_insert.c b/common_modules/module_lib/src/txm_trace_isr_exit_insert.c
new file mode 100644
index 00000000..9d79c1e4
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_isr_exit_insert.c
@@ -0,0 +1,70 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_isr_exit_insert PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function provides inserts an ISR exit event into the trace */
+/* buffer. */
+/* */
+/* INPUT */
+/* */
+/* isr_id User defined ISR ID */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+VOID _tx_trace_isr_exit_insert(ULONG isr_id)
+{
+
+
+ /* Call module manager dispatcher. */
+ (_txm_module_kernel_call_dispatcher)(TXM_TRACE_ISR_EXIT_INSERT_CALL, (ALIGN_TYPE) isr_id, 0, 0);
+}
diff --git a/common_modules/module_lib/src/txm_trace_user_event_insert.c b/common_modules/module_lib/src/txm_trace_user_event_insert.c
new file mode 100644
index 00000000..156d0b94
--- /dev/null
+++ b/common_modules/module_lib/src/txm_trace_user_event_insert.c
@@ -0,0 +1,82 @@
+/**************************************************************************/
+/* */
+/* Copyright (c) Microsoft Corporation. All rights reserved. */
+/* */
+/* This software is licensed under the Microsoft Software License */
+/* Terms for Microsoft Azure RTOS. Full text of the license can be */
+/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
+/* and in the root directory of this software. */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Module */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TXM_MODULE
+#include "txm_module.h"
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_trace_user_event_insert PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function inserts a user-defined event into the trace buffer. */
+/* */
+/* INPUT */
+/* */
+/* event_id User Event ID */
+/* info_field_1 First information field */
+/* info_field_2 First information field */
+/* info_field_3 First information field */
+/* info_field_4 First information field */
+/* */
+/* OUTPUT */
+/* */
+/* Completion Status */
+/* */
+/* CALLS */
+/* */
+/* _txm_module_kernel_call_dispatcher */
+/* */
+/* CALLED BY */
+/* */
+/* Module application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _tx_trace_user_event_insert(ULONG event_id, ULONG info_field_1, ULONG info_field_2, ULONG info_field_3, ULONG info_field_4)
+{
+
+UINT return_value;
+ALIGN_TYPE extra_parameters[3];
+
+ extra_parameters[0] = (ALIGN_TYPE) info_field_2;
+ extra_parameters[1] = (ALIGN_TYPE) info_field_3;
+ extra_parameters[2] = (ALIGN_TYPE) info_field_4;
+
+ /* Call module manager dispatcher. */
+ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_USER_EVENT_INSERT_CALL, (ALIGN_TYPE) event_id, (ALIGN_TYPE) info_field_1, (ALIGN_TYPE) extra_parameters);
+
+ /* Return value to the caller. */
+ return(return_value);
+}