summaryrefslogtreecommitdiff
path: root/common_modules/module_manager/src/txm_module_manager_properties_get.c
diff options
context:
space:
mode:
authorScott Larson <[email protected]>2020-08-07 16:56:45 -0700
committerScott Larson <[email protected]>2020-08-07 16:56:45 -0700
commit6f61053f2ac6cfa01a33b910401a61e63bca0972 (patch)
tree7ba850077c3fb4d024c8f6d59609e94c6c627707 /common_modules/module_manager/src/txm_module_manager_properties_get.c
parent49e3c27f3f140cd76147d85ccbb1eea31e09ee16 (diff)
add SMP, Modules, and more processor/tools releases
Diffstat (limited to 'common_modules/module_manager/src/txm_module_manager_properties_get.c')
-rw-r--r--common_modules/module_manager/src/txm_module_manager_properties_get.c106
1 files changed, 106 insertions, 0 deletions
diff --git a/common_modules/module_manager/src/txm_module_manager_properties_get.c b/common_modules/module_manager/src/txm_module_manager_properties_get.c
new file mode 100644
index 00000000..f2f803c5
--- /dev/null
+++ b/common_modules/module_manager/src/txm_module_manager_properties_get.c
@@ -0,0 +1,106 @@
+/**************************************************************************/
+/* */
+/* 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 Manager */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+#define TX_SOURCE_CODE
+
+#include "txm_module.h"
+
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_properties_get PORTABLE C */
+/* 6.0.1 */
+/* AUTHOR */
+/* */
+/* Scott Larson, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function returns the properties of the specified module so they*/
+/* may be checked before executing the module. */
+/* */
+/* INPUT */
+/* */
+/* module_instance Module instance pointer */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 06-30-2020 Scott Larson Initial Version 6.0.1 */
+/* */
+/**************************************************************************/
+UINT _txm_module_manager_properties_get(TXM_MODULE_INSTANCE *module_instance, ULONG *module_properties_ptr)
+{
+
+ /* Determine if the module manager has not been initialized yet. */
+ if (_txm_module_manager_ready != TX_TRUE)
+ {
+
+ /* Module manager has not been initialized. */
+ return(TX_NOT_AVAILABLE);
+ }
+
+ /* Determine if the module is valid. */
+ if (module_instance == TX_NULL)
+ {
+
+ /* Invalid module pointer. */
+ return(TX_PTR_ERROR);
+ }
+
+ /* Check the module ID. */
+ if (module_instance -> txm_module_instance_id != TXM_MODULE_ID)
+ {
+
+ /* Invalid module pointer. */
+ return(TX_PTR_ERROR);
+ }
+
+ /* Check for non-null buffer. */
+ if (module_properties_ptr == TX_NULL)
+ {
+
+ /* Invalid buffer pointer. */
+ return(TX_PTR_ERROR);
+ }
+
+ /* Simply return the property bitmap. */
+ *module_properties_ptr = module_instance -> txm_module_instance_property_flags;
+
+ /* Return success. */
+ return(TX_SUCCESS);
+}