summaryrefslogtreecommitdiff
path: root/common_modules/module_manager
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-03-06 19:27:49 +0100
committerGitHub <[email protected]>2026-03-06 19:27:49 +0100
commit3726d7906b4808bfec7855fc088e073199df9120 (patch)
tree8789bfd03d1d49e1967e80d04aa4ff606fda43eb /common_modules/module_manager
parent4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff)
parentc3259a216026372e3833dd8996a68f77e8595fbd (diff)
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'common_modules/module_manager')
-rw-r--r--common_modules/module_manager/inc/txm_module_manager_dispatch.h8
-rw-r--r--common_modules/module_manager/inc/txm_module_manager_util.h23
-rw-r--r--common_modules/module_manager/src/txm_module_manager_absolute_load.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_application_request.c16
-rw-r--r--common_modules/module_manager/src/txm_module_manager_callback_request.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_file_load.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_in_place_load.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_initialize.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_internal_load.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c25
-rw-r--r--common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_memory_load.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_object_allocate.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_object_deallocate.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_object_pointer_get.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_object_pool_create.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_properties_get.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_start.c15
-rw-r--r--common_modules/module_manager/src/txm_module_manager_stop.c18
-rw-r--r--common_modules/module_manager/src/txm_module_manager_thread_create.c27
-rw-r--r--common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_thread_reset.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_unload.c13
-rw-r--r--common_modules/module_manager/src/txm_module_manager_util.c43
-rw-r--r--common_modules/module_manager/utilities/module_binary_to_c_array.c6
-rw-r--r--common_modules/module_manager/utilities/module_to_binary.c18
-rw-r--r--common_modules/module_manager/utilities/module_to_c_array.c22
32 files changed, 155 insertions, 339 deletions
diff --git a/common_modules/module_manager/inc/txm_module_manager_dispatch.h b/common_modules/module_manager/inc/txm_module_manager_dispatch.h
index 0ac2210d..03bd86eb 100644
--- a/common_modules/module_manager/inc/txm_module_manager_dispatch.h
+++ b/common_modules/module_manager/inc/txm_module_manager_dispatch.h
@@ -1,11 +1,11 @@
/***************************************************************************
* Copyright (c) 2024 Microsoft Corporation
* Copyright (c) 2025 Eclipse ThreadX Contributors
- *
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -2393,7 +2393,7 @@ ALIGN_TYPE return_value;
if (param_1 < module_instance -> txm_module_instance_maximum_priority)
{
return(TX_THRESH_ERROR);
- }
+ }
if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
{
@@ -2427,7 +2427,7 @@ ALIGN_TYPE return_value;
if (param_1 < module_instance -> txm_module_instance_maximum_priority)
{
return(TX_PRIORITY_ERROR);
- }
+ }
if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
{
diff --git a/common_modules/module_manager/inc/txm_module_manager_util.h b/common_modules/module_manager/inc/txm_module_manager_util.h
index 2dc49f77..45c7f409 100644
--- a/common_modules/module_manager/inc/txm_module_manager_util.h
+++ b/common_modules/module_manager/inc/txm_module_manager_util.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -35,22 +36,6 @@
/* This file declares prototypes of utility functions used by the */
/* module manager. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s) and */
-/* optimized object checks, */
-/* resulting in version 6.1.6 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s) and */
-/* improved object check, */
-/* resulting in version 6.3.0 */
-/* xx-xx-2025 William E. Lamie Modified comment(s) and */
-/* improved object pointer use */
-/* and creation checking, */
-/* resulting in version 6.4.3 */
-/* */
/**************************************************************************/
#ifndef TXM_MODULE_MANAGER_UTIL_H
diff --git a/common_modules/module_manager/src/txm_module_manager_absolute_load.c b/common_modules/module_manager/src/txm_module_manager_absolute_load.c
index d8a771f8..dee6efd2 100644
--- a/common_modules/module_manager/src/txm_module_manager_absolute_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_absolute_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 12-31-2020 Andres Mlinar Initial Version 6.1.3 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_absolute_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_application_request.c b/common_modules/module_manager/src/txm_module_manager_application_request.c
index 4682968a..111dbbdc 100644
--- a/common_modules/module_manager/src/txm_module_manager_application_request.c
+++ b/common_modules/module_manager/src/txm_module_manager_application_request.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,15 +62,6 @@
/* */
/* _txm_module_manager_kernel_dispatch Kernel dispatch function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_application_request(ULONG request_id, ALIGN_TYPE param_1, ALIGN_TYPE param_2, ALIGN_TYPE param_3)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_callback_request.c b/common_modules/module_manager/src/txm_module_manager_callback_request.c
index 4d5211d6..bae5c00b 100644
--- a/common_modules/module_manager/src/txm_module_manager_callback_request.c
+++ b/common_modules/module_manager/src/txm_module_manager_callback_request.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,12 +60,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_callback_request(TX_QUEUE *module_callback_queue, TXM_MODULE_CALLBACK_MESSAGE *callback_message)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c
index 44dd1872..7510f36b 100644
--- a/common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,12 +61,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_event_flags_notify_trampoline(TX_EVENT_FLAGS_GROUP *group_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_file_load.c b/common_modules/module_manager/src/txm_module_manager_file_load.c
index 55ac57a2..c444c5c1 100644
--- a/common_modules/module_manager/src/txm_module_manager_file_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_file_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -75,12 +76,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_file_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, FX_MEDIA *media_ptr, CHAR *file_name)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_in_place_load.c b/common_modules/module_manager/src/txm_module_manager_in_place_load.c
index acc5828c..781ef628 100644
--- a/common_modules/module_manager/src/txm_module_manager_in_place_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_in_place_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,12 +66,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_in_place_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_initialize.c b/common_modules/module_manager/src/txm_module_manager_initialize.c
index fba853f5..7626c19b 100644
--- a/common_modules/module_manager/src/txm_module_manager_initialize.c
+++ b/common_modules/module_manager/src/txm_module_manager_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -129,12 +130,6 @@ ULONG _txm_module_manager_callback_error_count;
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_initialize(VOID *module_memory_start, ULONG module_memory_size)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_internal_load.c b/common_modules/module_manager/src/txm_module_manager_internal_load.c
index 46416127..49d57354 100644
--- a/common_modules/module_manager/src/txm_module_manager_internal_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_internal_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,12 +69,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_internal_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location,
ULONG code_size, VOID *code_allocation_ptr, ULONG code_allocation_size)
diff --git a/common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c b/common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c
index 769ebcc5..aa377430 100644
--- a/common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c
+++ b/common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -76,22 +77,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 12-31-2020 Scott Larson Modified comment(s), added */
-/* port-specific dispatch, */
-/* resulting in version 6.1.3 */
-/* 04-02-2021 Scott Larson Modified comment(s), */
-/* added optional defines to */
-/* remove unneeded functions, */
-/* resulting in version 6.1.6 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
ALIGN_TYPE _txm_module_manager_kernel_dispatch(ULONG kernel_request, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
{
@@ -439,7 +424,7 @@ TXM_MODULE_INSTANCE *module_instance;
break;
}
#endif
-
+
#ifndef TXM_QUEUE_SEND_CALL_NOT_USED
case TXM_QUEUE_SEND_CALL:
{
diff --git a/common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c b/common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c
index a3b31c8e..35560eea 100644
--- a/common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c
+++ b/common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,12 +59,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_maximum_module_priority_set(TXM_MODULE_INSTANCE *module_instance, UINT priority)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_memory_load.c b/common_modules/module_manager/src/txm_module_manager_memory_load.c
index 88679544..e615e4f2 100644
--- a/common_modules/module_manager/src/txm_module_manager_memory_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_memory_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_memory_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_allocate.c b/common_modules/module_manager/src/txm_module_manager_object_allocate.c
index 49a6485e..92ae128c 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_allocate.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_allocate(VOID **object_ptr_ptr, ULONG object_size, TXM_MODULE_INSTANCE *module_instance)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_deallocate.c b/common_modules/module_manager/src/txm_module_manager_object_deallocate.c
index b5deeb6b..2efc465b 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_deallocate.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_deallocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,12 +59,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_deallocate(VOID *object_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c b/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c
index 198e8c70..84cf6c96 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,12 +72,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_pointer_get(UINT object_type, CHAR *name, VOID **object_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c b/common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c
index 017ed364..1ddd987b 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -88,12 +89,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_pointer_get_extended(UINT object_type, CHAR *search_name, UINT search_name_length, VOID **object_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_pool_create.c b/common_modules/module_manager/src/txm_module_manager_object_pool_create.c
index b9038a81..ad05aa95 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_pool_create.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,12 +60,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_pool_create(VOID *object_memory, ULONG object_memory_size)
{
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
index bab824fc..3705583f 100644
--- a/common_modules/module_manager/src/txm_module_manager_properties_get.c
+++ b/common_modules/module_manager/src/txm_module_manager_properties_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,12 +56,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_properties_get(TXM_MODULE_INSTANCE *module_instance, ULONG *module_properties_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c
index 94cb62e8..a6ffa56c 100644
--- a/common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,12 +58,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_queue_notify_trampoline(TX_QUEUE *queue_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c
index f070c26d..f1545cf6 100644
--- a/common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,12 +59,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_semaphore_notify_trampoline(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_start.c b/common_modules/module_manager/src/txm_module_manager_start.c
index 4e2383bf..afad039f 100644
--- a/common_modules/module_manager/src/txm_module_manager_start.c
+++ b/common_modules/module_manager/src/txm_module_manager_start.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 12-31-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.3 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_start(TXM_MODULE_INSTANCE *module_instance)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_stop.c b/common_modules/module_manager/src/txm_module_manager_stop.c
index c960dae1..69ab949b 100644
--- a/common_modules/module_manager/src/txm_module_manager_stop.c
+++ b/common_modules/module_manager/src/txm_module_manager_stop.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -107,17 +108,6 @@ extern UINT _txm_module_manager_usbx_stop(TXM_MODULE_INSTANCE *module_instance)
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comments, fix */
-/* object delete underflow, */
-/* resulting in version 6.1.5 */
-/* 03-08-2023 Scott Larson Added tx_trace.h include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_stop(TXM_MODULE_INSTANCE *module_instance)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_thread_create.c b/common_modules/module_manager/src/txm_module_manager_thread_create.c
index d759a064..c14d8e4e 100644
--- a/common_modules/module_manager/src/txm_module_manager_thread_create.c
+++ b/common_modules/module_manager/src/txm_module_manager_thread_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -80,26 +81,6 @@
/* _txm_module_manager_stop Initiate module's stop thread */
/* _txm_module_manager_kernel_dispatch Kernel dispatch function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 12-31-2020 Scott Larson Modified comment(s), */
-/* fix stack overlap checking, */
-/* added 64-bit support, */
-/* added SMP support, */
-/* resulting in version 6.1.3 */
-/* 03-08-2023 Scott Larson Check module stack for */
-/* overlap, */
-/* resulting in version 6.2.1 */
-/* 10-31-2023 Xiuwen Cai, Yajun xia Modified comment(s), */
-/* added option for random */
-/* number stack filling, */
-/* fixed the kernel stack */
-/* allocation issue, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr,
VOID (*shell_function)(TX_THREAD *, TXM_MODULE_INSTANCE *),
diff --git a/common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c
index 01ff1260..b7f2d552 100644
--- a/common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,12 +60,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_thread_notify_trampoline(TX_THREAD *thread_ptr, UINT type)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_thread_reset.c b/common_modules/module_manager/src/txm_module_manager_thread_reset.c
index 176f78e0..75dd4a49 100644
--- a/common_modules/module_manager/src/txm_module_manager_thread_reset.c
+++ b/common_modules/module_manager/src/txm_module_manager_thread_reset.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,12 +61,6 @@
/* */
/* _txm_module_manager_kernel_dispatch Kernel dispatch function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_thread_reset(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c
index 0d462d1e..b2df699b 100644
--- a/common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,12 +59,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_timer_notify_trampoline(ULONG id)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_unload.c b/common_modules/module_manager/src/txm_module_manager_unload.c
index 3f8b923a..5fe96f6f 100644
--- a/common_modules/module_manager/src/txm_module_manager_unload.c
+++ b/common_modules/module_manager/src/txm_module_manager_unload.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_unload(TXM_MODULE_INSTANCE *module_instance)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_util.c b/common_modules/module_manager/src/txm_module_manager_util.c
index 0e5abe5e..78031b5f 100644
--- a/common_modules/module_manager/src/txm_module_manager_util.c
+++ b/common_modules/module_manager/src/txm_module_manager_util.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* _txm_module_manager_kernel_dispatch Kernel dispatch function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_memory_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size)
{
@@ -137,10 +132,10 @@ UINT _txm_module_manager_object_memory_check(TXM_MODULE_INSTANCE *module_instan
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* xx-xx-2025 William E. Lamie Modified comment(s), and */
-/* removed module local memory */
-/* check, resulting in */
-/* version 6.1x */
+/* xx-xx-2025 William E. Lamie Modified comment(s), and */
+/* removed module local memory */
+/* check, resulting in */
+/* version 6.1x */
/* */
/**************************************************************************/
UCHAR _txm_module_manager_created_object_check(TXM_MODULE_INSTANCE *module_instance, VOID *object_ptr)
@@ -346,8 +341,8 @@ CHAR object_name_char;
/* */
/* DESCRIPTION */
/* */
-/* This function checks to make sure the object pointer for one of the */
-/* creation APIs is valid. */
+/* This function checks to make sure the object pointer for one of the */
+/* creation APIs is valid. */
/* */
/* INPUT */
/* */
@@ -357,8 +352,8 @@ CHAR object_name_char;
/* */
/* OUTPUT */
/* */
-/* TX_TRUE Valid object pointer */
-/* TX_FALSE Invalid object pointer */
+/* TX_TRUE Valid object pointer */
+/* TX_FALSE Invalid object pointer */
/* */
/* CALLS */
/* */
@@ -385,7 +380,7 @@ UINT _txm_module_manager_param_check_object_for_creation(TXM_MODULE_INSTANCE
/* Object pointer is NULL, which is invalid. */
return(TX_FALSE);
}
-
+
/* Determine if the object pointer is inside the module object pool. */
if (TXM_MODULE_MANAGER_ENSURE_INSIDE_OBJ_POOL(module_instance, object_ptr, object_size) == TX_FALSE)
{
@@ -409,7 +404,7 @@ UINT _txm_module_manager_param_check_object_for_creation(TXM_MODULE_INSTANCE
/* Object has already been created, which is invalid. */
return(TX_FALSE);
}
-
+
/* Everything is okay with the object, return TX_TRUE. */
return(TX_TRUE);
}
@@ -427,7 +422,7 @@ UINT _txm_module_manager_param_check_object_for_creation(TXM_MODULE_INSTANCE
/* */
/* DESCRIPTION */
/* */
-/* This function checks to make sure the object pointer is valid. */
+/* This function checks to make sure the object pointer is valid. */
/* */
/* INPUT */
/* */
@@ -437,8 +432,8 @@ UINT _txm_module_manager_param_check_object_for_creation(TXM_MODULE_INSTANCE
/* */
/* OUTPUT */
/* */
-/* TX_TRUE Valid object pointer */
-/* TX_FALSE Invalid object pointer */
+/* TX_TRUE Valid object pointer */
+/* TX_FALSE Invalid object pointer */
/* */
/* CALLS */
/* */
@@ -476,11 +471,11 @@ UINT _txm_module_manager_param_check_object_for_use(TXM_MODULE_INSTANCE *modu
/* Define application-specific object memory check. */
#ifdef TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_CHECK
-
+
/* Bring in the application-spefic objeft memory check, defined by the user. */
TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_CHECK
#endif /* TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_ENABLE */
-
+
/* Everything is okay with the object, return TX_TRUE. */
return(TX_TRUE);
}
diff --git a/common_modules/module_manager/utilities/module_binary_to_c_array.c b/common_modules/module_manager/utilities/module_binary_to_c_array.c
index b02fde6e..da0cf97c 100644
--- a/common_modules/module_manager/utilities/module_binary_to_c_array.c
+++ b/common_modules/module_manager/utilities/module_binary_to_c_array.c
@@ -21,7 +21,7 @@ unsigned long column;
/* Determine if the proper number of files are provided. */
- if (argc != 3)
+ if (argc != 3)
{
/* Print an error message out and wait for user key hit. */
@@ -44,7 +44,7 @@ unsigned long column;
printf(" File: %s ", argv[1]);
return(2);
}
-
+
/* Determine if the binary file is a valid ThreadX module. */
alpha = fgetc(source_file);
alpha1 = fgetc(source_file);
@@ -94,7 +94,7 @@ unsigned long column;
address = 0;
column = 0;
- do
+ do
{
/* Get character from the input file. */
diff --git a/common_modules/module_manager/utilities/module_to_binary.c b/common_modules/module_manager/utilities/module_to_binary.c
index 77517e0d..a749c8a3 100644
--- a/common_modules/module_manager/utilities/module_to_binary.c
+++ b/common_modules/module_manager/utilities/module_to_binary.c
@@ -14,7 +14,7 @@ FILE *binary_file;
#define ELF_EXECUTABLE 2
-typedef struct ELF_HEADER_STRUCT
+typedef struct ELF_HEADER_STRUCT
{
unsigned char elf_header_id_string[ELF_ID_STRING_SIZE];
unsigned short elf_header_file_type;
@@ -114,12 +114,12 @@ unsigned char *buffer;
for (i = 0; i < object_size; i++)
{
alpha = fgetc(source_file);
-
+
if (alpha == EOF)
return(1);
-
+
buffer[i] = (unsigned char) alpha;
- }
+ }
/* Return success. */
return(0);
@@ -140,7 +140,7 @@ unsigned char zero_value;
/* Determine if the proper number of files are provided. */
- if (argc != 3)
+ if (argc != 3)
{
/* Print an error message out and wait for user key hit. */
@@ -163,7 +163,7 @@ unsigned char zero_value;
printf(" File: %s ", argv[1]);
return(2);
}
-
+
/* Attempt to open the binary file for writing. */
binary_file = fopen(argv[2], "wb");
@@ -182,7 +182,7 @@ unsigned char zero_value;
/* Allocate memory for the program header(s). */
program_header = malloc(sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries);
-
+
/* Read the program header(s). */
elf_object_read(header.elf_header_program_header_offset, program_header, (sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries));
@@ -194,7 +194,7 @@ unsigned char zero_value;
/* Alocate memory for the section string table. */
- section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
+ section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
/* Read the section string table. */
elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, section_header[header.elf_header_section_string_index].elf_section_header_size);
@@ -315,7 +315,7 @@ unsigned char zero_value;
/* Move address forward. */
address++;
-
+
/* Decrement size. */
size--;
diff --git a/common_modules/module_manager/utilities/module_to_c_array.c b/common_modules/module_manager/utilities/module_to_c_array.c
index fc72092c..37d931f3 100644
--- a/common_modules/module_manager/utilities/module_to_c_array.c
+++ b/common_modules/module_manager/utilities/module_to_c_array.c
@@ -14,7 +14,7 @@ FILE *array_file;
#define ELF_EXECUTABLE 2
-typedef struct ELF_HEADER_STRUCT
+typedef struct ELF_HEADER_STRUCT
{
unsigned char elf_header_id_string[ELF_ID_STRING_SIZE];
unsigned short elf_header_file_type;
@@ -114,12 +114,12 @@ unsigned char *buffer;
for (i = 0; i < object_size; i++)
{
alpha = fgetc(source_file);
-
+
if (alpha == EOF)
return(1);
-
+
buffer[i] = (unsigned char) alpha;
- }
+ }
/* Return success. */
return(0);
@@ -140,7 +140,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Determine if the proper number of files are provided. */
- if (argc != 3)
+ if (argc != 3)
{
/* Print an error message out and wait for user key hit. */
@@ -163,7 +163,7 @@ CODE_SECTION_ENTRY code_section_temp;
printf(" File: %s ", argv[1]);
return(2);
}
-
+
/* Attempt to open the dump file for writing. */
array_file = fopen(argv[2], "w");
@@ -192,7 +192,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Allocate memory for the program header(s). */
program_header = malloc(sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries);
-
+
/* Read the program header(s). */
elf_object_read(header.elf_header_program_header_offset, program_header, (sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries));
@@ -204,7 +204,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Alocate memory for the section string table. */
- section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
+ section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
/* Read the section string table. */
elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, section_header[header.elf_header_section_string_index].elf_section_header_size);
@@ -260,7 +260,7 @@ CODE_SECTION_ENTRY code_section_temp;
printf("**** Error: No code sections found! **** \n");
fprintf(array_file, "unsigned char module_code[] = {0x00};\n\n");
-
+
/* Close files. */
fclose(source_file);
fclose(array_file);
@@ -337,7 +337,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Write out the contents of this program area. */
size = code_section_array[i].code_section_size;
-
+
j = 0;
k = 0;
while (size)
@@ -372,7 +372,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Move address forward. */
address++;
-
+
/* Decrement size. */
size--;