From cf577c713719a2f1603624d7974ea55beb370d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Desbiens?= Date: Mon, 28 Sep 2026 14:08:13 -0400 Subject: [PATCH] Made ThreadX object names const-qualifiable behind an option (#761) Fixes #61 Object names are exposed as writable pointers throughout the kernel API, which rejects string literals in C++ and lets a caller modify a name an object still holds. Information services return those names through writable double pointers. Create services, control blocks, information services, the module manager and trace registration now preserve const qualification, behind TX_ENABLE_CONST_NAMES. The option defaults to off, so a build that says nothing gets exactly the types it got before. It is opt-in rather than opt-out because it changes the type of a public struct field: application code that copies a name into a writable CHAR * stops compiling, which is a reasonable thing to ask of a minor release and not of a patch one. Issue #780 tracks making it the default in 6.6. Two things the option reaches that its own call sites do not. TX_CHAR_TO_UCHAR_POINTER_CONVERT has exactly two users, both of them reading an object name in _tx_trace_object_register, and every form of that macro but the MISRA one casts the qualifier away without saying so; the conversion is now const in and const out, so nothing launders const to make the build pass. The FreeRTOS adapter holds the name pcTaskGetName retrieves in a TX_NAME_CONST pointer so that it tracks whichever declaration tx_thread_info_get has, and keeps its writable return type through an explicit MISRA C:2012 Rule 11.8 cast, because that signature is part of the FreeRTOS API. Default build: all seven host configurations and all five SMP configurations build with zero warnings and pass -- 113/113 on five host configurations, 100/100 on the two MISRA builds, 118/118 on SMP, 3/3 FreeRTOS. With TX_ENABLE_CONST_NAMES set, the host default and both MISRA configurations, the SMP trace configuration and the FreeRTOS adapter build with zero warnings and pass. Co-authored-by: Tilen Majerle Assisted-by: Codex (gpt-6-astra) Assisted-by: Claude Code (Opus 5) --- common/inc/tx_api.h | 133 ++++++++++-------- common/inc/tx_trace.h | 4 +- common/inc/tx_user_sample.h | 9 +- common/src/tx_block_pool_create.c | 4 +- common/src/tx_block_pool_info_get.c | 4 +- common/src/tx_byte_pool_create.c | 4 +- common/src/tx_byte_pool_info_get.c | 4 +- common/src/tx_event_flags_create.c | 4 +- common/src/tx_event_flags_info_get.c | 4 +- common/src/tx_misra.c | 20 ++- common/src/tx_mutex_create.c | 4 +- common/src/tx_mutex_info_get.c | 4 +- common/src/tx_queue_create.c | 4 +- common/src/tx_queue_info_get.c | 4 +- common/src/tx_semaphore_create.c | 4 +- common/src/tx_semaphore_info_get.c | 4 +- common/src/tx_thread_create.c | 2 +- common/src/tx_thread_info_get.c | 4 +- common/src/tx_timer_create.c | 4 +- common/src/tx_timer_info_get.c | 4 +- common/src/tx_trace_object_register.c | 19 +-- common/src/txe_block_pool_create.c | 4 +- common/src/txe_block_pool_info_get.c | 4 +- common/src/txe_byte_pool_create.c | 4 +- common/src/txe_byte_pool_info_get.c | 4 +- common/src/txe_event_flags_create.c | 4 +- common/src/txe_event_flags_info_get.c | 4 +- common/src/txe_mutex_create.c | 4 +- common/src/txe_mutex_info_get.c | 4 +- common/src/txe_queue_create.c | 4 +- common/src/txe_queue_info_get.c | 4 +- common/src/txe_semaphore_create.c | 4 +- common/src/txe_semaphore_info_get.c | 4 +- common/src/txe_thread_create.c | 4 +- common/src/txe_thread_info_get.c | 4 +- common/src/txe_timer_create.c | 4 +- common/src/txe_timer_info_get.c | 4 +- common_modules/inc/txm_module.h | 2 +- .../module_lib/src/txm_block_pool_create.c | 4 +- .../module_lib/src/txm_block_pool_info_get.c | 4 +- .../module_lib/src/txm_byte_pool_create.c | 4 +- .../module_lib/src/txm_byte_pool_info_get.c | 4 +- .../module_lib/src/txm_event_flags_create.c | 4 +- .../module_lib/src/txm_event_flags_info_get.c | 4 +- .../module_lib/src/txm_mutex_create.c | 4 +- .../module_lib/src/txm_mutex_info_get.c | 4 +- .../module_lib/src/txm_queue_create.c | 4 +- .../module_lib/src/txm_queue_info_get.c | 4 +- .../module_lib/src/txm_semaphore_create.c | 4 +- .../module_lib/src/txm_semaphore_info_get.c | 4 +- .../module_lib/src/txm_thread_create.c | 4 +- .../module_lib/src/txm_thread_info_get.c | 4 +- .../module_lib/src/txm_timer_create.c | 4 +- .../module_lib/src/txm_timer_info_get.c | 4 +- .../inc/txm_module_manager_dispatch.h | 64 ++++----- .../inc/txm_module_manager_util.h | 2 +- .../src/txm_module_manager_thread_create.c | 3 +- .../src/txm_module_manager_util.c | 2 +- common_smp/inc/tx_api.h | 101 +++++++------ common_smp/inc/tx_trace.h | 6 +- common_smp/inc/tx_user_sample.h | 9 +- common_smp/src/tx_block_pool_create.c | 4 +- common_smp/src/tx_block_pool_info_get.c | 4 +- common_smp/src/tx_byte_pool_create.c | 4 +- common_smp/src/tx_byte_pool_info_get.c | 4 +- common_smp/src/tx_event_flags_create.c | 4 +- common_smp/src/tx_event_flags_info_get.c | 4 +- common_smp/src/tx_misra.c | 20 ++- common_smp/src/tx_mutex_create.c | 4 +- common_smp/src/tx_mutex_info_get.c | 4 +- common_smp/src/tx_queue_create.c | 4 +- common_smp/src/tx_queue_info_get.c | 4 +- common_smp/src/tx_semaphore_create.c | 4 +- common_smp/src/tx_semaphore_info_get.c | 4 +- common_smp/src/tx_thread_create.c | 2 +- common_smp/src/tx_thread_info_get.c | 4 +- common_smp/src/tx_timer_create.c | 4 +- common_smp/src/tx_timer_info_get.c | 4 +- common_smp/src/tx_trace_object_register.c | 19 +-- common_smp/src/txe_block_pool_create.c | 4 +- common_smp/src/txe_block_pool_info_get.c | 4 +- common_smp/src/txe_byte_pool_create.c | 4 +- common_smp/src/txe_byte_pool_info_get.c | 4 +- common_smp/src/txe_event_flags_create.c | 4 +- common_smp/src/txe_event_flags_info_get.c | 4 +- common_smp/src/txe_mutex_create.c | 4 +- common_smp/src/txe_mutex_info_get.c | 4 +- common_smp/src/txe_queue_create.c | 4 +- common_smp/src/txe_queue_info_get.c | 4 +- common_smp/src/txe_semaphore_create.c | 4 +- common_smp/src/txe_semaphore_info_get.c | 4 +- common_smp/src/txe_thread_create.c | 4 +- common_smp/src/txe_thread_info_get.c | 4 +- common_smp/src/txe_timer_create.c | 4 +- common_smp/src/txe_timer_info_get.c | 4 +- test/freertos/regression/txfr_test_harness.c | 20 +-- .../threadx_block_memory_basic_test.c | 4 +- ...hreadx_block_memory_error_detection_test.c | 4 +- .../threadx_block_memory_information_test.c | 8 +- .../threadx_byte_memory_basic_test.c | 4 +- .../threadx_byte_memory_information_test.c | 6 +- .../threadx_byte_memory_long_search_test.c | 4 +- .../threadx_event_flag_basic_test.c | 4 +- .../threadx_event_flag_information_test.c | 6 +- .../smp/regression/threadx_mutex_basic_test.c | 4 +- .../threadx_mutex_information_test.c | 6 +- .../threadx_queue_basic_one_word_test.c | 4 +- .../threadx_queue_information_test.c | 6 +- .../regression/threadx_semaphore_basic_test.c | 4 +- .../threadx_semaphore_information_test.c | 6 +- .../threadx_thread_basic_execution_test.c | 4 +- .../threadx_thread_information_test.c | 6 +- .../threadx_timer_information_test.c | 6 +- .../regression/threadx_timer_simple_test.c | 4 +- .../smp/regression/threadx_trace_basic_test.c | 4 +- ...odule_manager_block_pool_parameters_test.c | 6 +- .../threadx_block_memory_basic_test.c | 4 +- ...hreadx_block_memory_error_detection_test.c | 4 +- .../threadx_block_memory_information_test.c | 8 +- .../threadx_byte_memory_basic_test.c | 4 +- .../threadx_byte_memory_information_test.c | 6 +- .../threadx_event_flag_basic_test.c | 4 +- .../threadx_event_flag_information_test.c | 6 +- test/tx/regression/threadx_mutex_basic_test.c | 4 +- .../threadx_mutex_information_test.c | 6 +- .../threadx_queue_basic_one_word_test.c | 4 +- .../threadx_queue_information_test.c | 6 +- .../regression/threadx_semaphore_basic_test.c | 4 +- .../threadx_semaphore_information_test.c | 6 +- .../threadx_thread_basic_execution_test.c | 2 +- .../threadx_thread_information_test.c | 6 +- .../threadx_timer_information_test.c | 6 +- .../tx/regression/threadx_timer_simple_test.c | 4 +- test/tx/regression/threadx_trace_basic_test.c | 2 +- .../FreeRTOS/tx_freertos.c | 5 +- 135 files changed, 622 insertions(+), 318 deletions(-) diff --git a/common/inc/tx_api.h b/common/inc/tx_api.h index bf9de856..bac617e5 100644 --- a/common/inc/tx_api.h +++ b/common/inc/tx_api.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,6 +66,17 @@ extern "C" { #include "tx_port.h" +/* Define the qualifier applied to object name strings. Opting in makes every + object name a pointer to const, which the kernel and its tests are written + for. It is off by default because it changes the type of a public struct + field, and application code that copies a name into a writable pointer stops + compiling. */ +#ifdef TX_ENABLE_CONST_NAMES +#define TX_NAME_CONST const +#else +#define TX_NAME_CONST +#endif + #if (defined(TX_EXECUTION_PROFILE_ENABLE) && !defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY)) #include "tx_execution_profile.h" #endif @@ -368,7 +381,7 @@ typedef struct TX_TIMER_STRUCT ULONG tx_timer_id; /* Define the timer's name. */ - CHAR *tx_timer_name; + TX_NAME_CONST CHAR *tx_timer_name; /* Define the actual contents of the timer. This is the block that is used in the actual timer expiration processing. */ @@ -434,7 +447,7 @@ typedef struct TX_THREAD_STRUCT is typically defined to whitespace or a pointer type in tx_port.h. */ TX_THREAD_EXTENSION_0 - CHAR *tx_thread_name; /* Pointer to thread's name */ + TX_NAME_CONST CHAR *tx_thread_name; /* Pointer to thread's name */ UINT tx_thread_priority; /* Priority of thread (0-1023) */ UINT tx_thread_state; /* Thread's execution state */ UINT tx_thread_delayed_suspend; /* Delayed suspend flag */ @@ -595,7 +608,7 @@ typedef struct TX_BLOCK_POOL_STRUCT ULONG tx_block_pool_id; /* Define the block pool's name. */ - CHAR *tx_block_pool_name; + TX_NAME_CONST CHAR *tx_block_pool_name; /* Define the number of available memory blocks in the pool. */ UINT tx_block_pool_available; @@ -673,7 +686,7 @@ typedef struct TX_BYTE_POOL_STRUCT ULONG tx_byte_pool_id; /* Define the byte pool's name. */ - CHAR *tx_byte_pool_name; + TX_NAME_CONST CHAR *tx_byte_pool_name; /* Define the number of available bytes in the pool. */ ULONG tx_byte_pool_available; @@ -752,7 +765,7 @@ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT ULONG tx_event_flags_group_id; /* Define the event flags group's name. */ - CHAR *tx_event_flags_group_name; + TX_NAME_CONST CHAR *tx_event_flags_group_name; /* Define the actual current event flags in this group. A zero in a particular bit indicates the event flag is not set. */ @@ -838,7 +851,7 @@ typedef struct TX_MUTEX_STRUCT ULONG tx_mutex_id; /* Define the mutex's name. */ - CHAR *tx_mutex_name; + TX_NAME_CONST CHAR *tx_mutex_name; /* Define the mutex ownership count. */ UINT tx_mutex_ownership_count; @@ -911,7 +924,7 @@ typedef struct TX_QUEUE_STRUCT ULONG tx_queue_id; /* Define the queue's name. */ - CHAR *tx_queue_name; + TX_NAME_CONST CHAR *tx_queue_name; /* Define the message size that was specified in queue creation. */ UINT tx_queue_message_size; @@ -990,7 +1003,7 @@ typedef struct TX_SEMAPHORE_STRUCT ULONG tx_semaphore_id; /* Define the semaphore's name. */ - CHAR *tx_semaphore_name; + TX_NAME_CONST CHAR *tx_semaphore_name; /* Define the actual semaphore count. A zero means that no semaphore instance is available. */ @@ -1417,10 +1430,10 @@ VOID tx_application_define(VOID *first_unused_memory); /* Define block memory pool management function prototypes. */ UINT _tx_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size); UINT _tx_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases, @@ -1435,20 +1448,20 @@ UINT _tx_block_release(VOID *block_ptr); application. */ UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); UINT _txe_block_release(VOID *block_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -UINT _txr_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txr_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txr_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -UINT _txr_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _txr_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); UINT _txr_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); @@ -1460,10 +1473,10 @@ UINT _txr_block_release(VOID *block_ptr); UINT _tx_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size); UINT _tx_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool); UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases, @@ -1479,10 +1492,10 @@ UINT _tx_byte_release(VOID *memory_ptr); UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool); UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); @@ -1490,10 +1503,10 @@ UINT _txe_byte_release(VOID *memory_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _txr_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _txr_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txr_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -UINT _txr_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _txr_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool); UINT _txr_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); @@ -1503,11 +1516,11 @@ UINT _txr_byte_release(VOID *memory_ptr); /* Define event flags management function prototypes. */ -UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr); +UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr); UINT _tx_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group); UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets, @@ -1522,22 +1535,22 @@ UINT _tx_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*e /* Define error checking shells for API services. These are only referenced by the application. */ -UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); +UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size); UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _txe_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group); UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option); UINT _txe_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING -UINT _txr_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); +UINT _txr_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size); UINT _txr_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _txr_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -UINT _txr_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _txr_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group); UINT _txr_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, @@ -1553,10 +1566,10 @@ VOID _tx_initialize_kernel_enter(VOID); /* Define mutex management function prototypes. */ -UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit); +UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit); UINT _tx_mutex_delete(TX_MUTEX *mutex_ptr); UINT _tx_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex); UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets, @@ -1570,19 +1583,19 @@ UINT _tx_mutex_put(TX_MUTEX *mutex_ptr); /* Define error checking shells for API services. These are only referenced by the application. */ -UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); +UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr); UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex); UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr); UINT _txe_mutex_put(TX_MUTEX *mutex_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING -UINT _txr_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); +UINT _txr_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); UINT _txr_mutex_delete(TX_MUTEX *mutex_ptr); UINT _txr_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -UINT _txr_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _txr_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex); UINT _txr_mutex_prioritize(TX_MUTEX *mutex_ptr); @@ -1592,11 +1605,11 @@ UINT _txr_mutex_put(TX_MUTEX *mutex_ptr); /* Define queue management function prototypes. */ -UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _tx_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size); UINT _tx_queue_delete(TX_QUEUE *queue_ptr); UINT _tx_queue_flush(TX_QUEUE *queue_ptr); -UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue); 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); @@ -1612,11 +1625,11 @@ UINT _tx_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wa /* Define error checking shells for API services. These are only referenced by the application. */ -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size); UINT _txe_queue_delete(TX_QUEUE *queue_ptr); UINT _txe_queue_flush(TX_QUEUE *queue_ptr); -UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue); UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr); UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); @@ -1624,11 +1637,11 @@ UINT _txe_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_op UINT _txe_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr)); UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING -UINT _txr_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txr_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size); UINT _txr_queue_delete(TX_QUEUE *queue_ptr); UINT _txr_queue_flush(TX_QUEUE *queue_ptr); -UINT _txr_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _txr_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue); UINT _txr_queue_prioritize(TX_QUEUE *queue_ptr); UINT _txr_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); @@ -1641,10 +1654,10 @@ UINT _txr_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG w /* Define semaphore management function prototypes. */ UINT _tx_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count); +UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count); UINT _tx_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _tx_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore); UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets, @@ -1659,10 +1672,10 @@ UINT _tx_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semapho application. */ UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); +UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore); UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); @@ -1670,10 +1683,10 @@ UINT _txe_semaphore_put(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr)); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -UINT _txr_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); +UINT _txr_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); UINT _txr_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _txr_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -UINT _txr_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _txr_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore); UINT _txr_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); @@ -1686,7 +1699,7 @@ UINT _txr_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaph VOID _tx_thread_context_save(VOID); VOID _tx_thread_context_restore(VOID); -UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _tx_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, @@ -1694,7 +1707,7 @@ UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, UINT _tx_thread_delete(TX_THREAD *thread_ptr); UINT _tx_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); TX_THREAD *_tx_thread_identify(VOID); -UINT _tx_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _tx_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread); UINT _tx_thread_interrupt_control(UINT new_posture); @@ -1723,14 +1736,14 @@ UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr); /* Define error checking shells for API services. These are only referenced by the application. */ -UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST 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 _txe_thread_delete(TX_THREAD *thread_ptr); UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); -UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _txe_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread); UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, @@ -1745,14 +1758,14 @@ UINT _txe_thread_terminate(TX_THREAD *thread_ptr); UINT _txe_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice); UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING -UINT _txr_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txr_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST 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 _txr_thread_delete(TX_THREAD *thread_ptr); UINT _txr_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); -UINT _txr_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _txr_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST 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 _txr_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, @@ -1772,12 +1785,12 @@ UINT _txr_thread_wait_abort(TX_THREAD *thread_ptr); UINT _tx_timer_activate(TX_TIMER *timer_ptr); UINT _tx_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -UINT _tx_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _tx_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate); UINT _tx_timer_deactivate(TX_TIMER *timer_ptr); UINT _tx_timer_delete(TX_TIMER *timer_ptr); -UINT _tx_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _tx_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer); UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts); @@ -1793,22 +1806,22 @@ VOID _tx_time_set(ULONG new_time); UINT _txe_timer_activate(TX_TIMER *timer_ptr); UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT _txe_timer_deactivate(TX_TIMER *timer_ptr); UINT _txe_timer_delete(TX_TIMER *timer_ptr); -UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _txe_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer); #ifdef TX_ENABLE_MULTI_ERROR_CHECKING UINT _txr_timer_activate(TX_TIMER *timer_ptr); UINT _txr_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -UINT _txr_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _txr_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT _txr_timer_deactivate(TX_TIMER *timer_ptr); UINT _txr_timer_delete(TX_TIMER *timer_ptr); -UINT _txr_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _txr_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer); #endif @@ -1924,7 +1937,8 @@ TX_THREAD *_tx_misra_ulong_to_thread_pointer_convert(ULONG value); VOID *_tx_misra_timer_indirect_to_void_pointer_convert(TX_TIMER_INTERNAL **pointer); CHAR *_tx_misra_const_char_to_char_pointer_convert(const char *pointer); TX_THREAD *_tx_misra_void_to_thread_pointer_convert(VOID *pointer); -UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer); +const UCHAR *_tx_misra_char_to_uchar_pointer_convert(TX_NAME_CONST CHAR *pointer); +const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *pointer, ULONG amount); VOID _tx_misra_event_flags_group_not_used(TX_EVENT_FLAGS_GROUP *group_ptr); VOID _tx_misra_event_flags_set_notify_not_used(VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); VOID _tx_misra_queue_not_used(TX_QUEUE *queue_ptr); @@ -1936,6 +1950,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #define TX_MEMSET(a,b,c) _tx_misra_memset((a), (UINT) (b), (UINT) (c)) #define TX_UCHAR_POINTER_ADD(a,b) _tx_misra_uchar_pointer_add((UCHAR *) (a), (ULONG) (b)) +#define TX_CONST_UCHAR_POINTER_ADD(a,b) _tx_misra_const_uchar_pointer_add((const UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_SUB(a,b) _tx_misra_uchar_pointer_sub((UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_DIF(a,b) _tx_misra_uchar_pointer_dif((UCHAR *) (a), (UCHAR *) (b)) #define TX_ULONG_POINTER_ADD(a,b) _tx_misra_ulong_pointer_add((ULONG *) (a), (ULONG) (b)) @@ -1996,6 +2011,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #endif #define TX_UCHAR_POINTER_ADD(a,b) (((UCHAR *) (a)) + ((UINT) (b))) +#define TX_CONST_UCHAR_POINTER_ADD(a,b) (((const UCHAR *) (a)) + ((UINT) (b))) #define TX_UCHAR_POINTER_SUB(a,b) (((UCHAR *) (a)) - ((UINT) (b))) #define TX_UCHAR_POINTER_DIF(a,b) ((ULONG)(((UCHAR *) (a)) - ((UCHAR *) (b)))) #define TX_ULONG_POINTER_ADD(a,b) (((ULONG *) (a)) + ((UINT) (b))) @@ -2043,7 +2059,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #endif #define TX_CONST_CHAR_TO_CHAR_POINTER_CONVERT(a) ((CHAR *) ((VOID *) (a))) #define TX_VOID_TO_THREAD_POINTER_CONVERT(a) ((TX_THREAD *) ((VOID *) (a))) -#define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a))) +#define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((const UCHAR *) ((const VOID *) (a))) #ifndef TX_EVENT_FLAGS_GROUP_NOT_USED #define TX_EVENT_FLAGS_GROUP_NOT_USED(a) ((void)(a)) #endif @@ -2341,4 +2357,3 @@ void __ghs_rnerr(char *errMsg, int stackLevels, int stackTraceDisplay, void *hex #endif #endif - diff --git a/common/inc/tx_trace.h b/common/inc/tx_trace.h index 10b96761..8f2667ca 100644 --- a/common/inc/tx_trace.h +++ b/common/inc/tx_trace.h @@ -453,7 +453,7 @@ TRACE_DECLARE ULONG _tx_trace_registry_search_start #define TX_TRACE_INITIALIZE _tx_trace_initialize(); -#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b) _tx_trace_object_register((UCHAR) (t), (VOID *) (p), (CHAR *) (n), (ULONG) (a), (ULONG) (b)); +#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b) _tx_trace_object_register((UCHAR) (t), (VOID *) (p), (n), (ULONG) (a), (ULONG) (b)); #define TX_TRACE_OBJECT_UNREGISTER(o) _tx_trace_object_unregister((VOID *) (o)); #ifndef TX_TRACE_IN_LINE_INSERT #define TX_TRACE_IN_LINE_INSERT(i,a,b,c,d,e) \ @@ -529,7 +529,7 @@ UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFE /* Define internal function prototypes of the trace component, only if compiling ThreadX source code. */ VOID _tx_trace_initialize(VOID); -VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2); +VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, TX_NAME_CONST CHAR *object_name, ULONG parameter_1, ULONG parameter_2); VOID _tx_trace_object_unregister(VOID *object_ptr); diff --git a/common/inc/tx_user_sample.h b/common/inc/tx_user_sample.h index 0733c16c..676ff38c 100644 --- a/common/inc/tx_user_sample.h +++ b/common/inc/tx_user_sample.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -107,6 +109,12 @@ #define TX_TIMER_TICKS_PER_SECOND (100UL) */ +/* Define this option to qualify object names as pointers to const. */ + +/* +#define TX_ENABLE_CONST_NAMES +*/ + /* Determine if there is a FileX pointer in the thread control block. By default, the pointer is there for legacy/backwards compatibility. The pointer must also be there for applications using FileX. @@ -295,4 +303,3 @@ */ #endif - diff --git a/common/src/tx_block_pool_create.c b/common/src/tx_block_pool_create.c index 1d2c803c..8781dc78 100644 --- a/common/src/tx_block_pool_create.c +++ b/common/src/tx_block_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -66,7 +68,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size) { diff --git a/common/src/tx_block_pool_info_get.c b/common/src/tx_block_pool_info_get.c index 5998f1db..5e1e89fd 100644 --- a/common/src/tx_block_pool_info_get.c +++ b/common/src/tx_block_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool) { diff --git a/common/src/tx_byte_pool_create.c b/common/src/tx_byte_pool_create.c index 21abbe35..f5c8460d 100644 --- a/common/src/tx_byte_pool_create.c +++ b/common/src/tx_byte_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size) +UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common/src/tx_byte_pool_info_get.c b/common/src/tx_byte_pool_info_get.c index bd096440..e9e9efa4 100644 --- a/common/src/tx_byte_pool_info_get.c +++ b/common/src/tx_byte_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool) { diff --git a/common/src/tx_event_flags_create.c b/common/src/tx_event_flags_create.c index 2a9c042d..361fafa4 100644 --- a/common/src/tx_event_flags_create.c +++ b/common/src/tx_event_flags_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr) +UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr) { TX_INTERRUPT_SAVE_AREA diff --git a/common/src/tx_event_flags_info_get.c b/common/src/tx_event_flags_info_get.c index 21e85c9a..51ec345f 100644 --- a/common/src/tx_event_flags_info_get.c +++ b/common/src/tx_event_flags_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -71,7 +73,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group) { diff --git a/common/src/tx_misra.c b/common/src/tx_misra.c index 9abf12f0..7ac5dc68 100644 --- a/common/src/tx_misra.c +++ b/common/src/tx_misra.c @@ -820,15 +820,29 @@ UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFER_ENTRY *pointer) /***********************************************************************************************/ /***********************************************************************************************/ /** */ -/** UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer); */ +/** const UCHAR *_tx_misra_char_to_uchar_pointer_convert(TX_NAME_CONST CHAR *pointer); */ /** */ /***********************************************************************************************/ /***********************************************************************************************/ -UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer) +const UCHAR *_tx_misra_char_to_uchar_pointer_convert(TX_NAME_CONST CHAR *pointer) { /* Return a UCHAR pointer. */ - return((UCHAR *) ((VOID *) pointer)); + return((const UCHAR *) ((const VOID *) pointer)); +} + + +/***********************************************************************************************/ +/***********************************************************************************************/ +/** */ +/** const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *ptr, ULONG amount); */ +/** */ +/***********************************************************************************************/ +/***********************************************************************************************/ +const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *ptr, ULONG amount) +{ + ptr = ptr + amount; + return(ptr); } diff --git a/common/src/tx_mutex_create.c b/common/src/tx_mutex_create.c index 436c01f5..a1f5eba8 100644 --- a/common/src/tx_mutex_create.c +++ b/common/src/tx_mutex_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit) +UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit) { TX_INTERRUPT_SAVE_AREA diff --git a/common/src/tx_mutex_info_get.c b/common/src/tx_mutex_info_get.c index a24d1e30..3be2606b 100644 --- a/common/src/tx_mutex_info_get.c +++ b/common/src/tx_mutex_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex) { diff --git a/common/src/tx_queue_create.c b/common/src/tx_queue_create.c index 59ae154e..afb5648d 100644 --- a/common/src/tx_queue_create.c +++ b/common/src/tx_queue_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -66,7 +68,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _tx_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size) { diff --git a/common/src/tx_queue_info_get.c b/common/src/tx_queue_info_get.c index d0ecb2b6..e25da54e 100644 --- a/common/src/tx_queue_info_get.c +++ b/common/src/tx_queue_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue) { diff --git a/common/src/tx_semaphore_create.c b/common/src/tx_semaphore_create.c index 849f5d3b..14553ca8 100644 --- a/common/src/tx_semaphore_create.c +++ b/common/src/tx_semaphore_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count) +UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count) { TX_INTERRUPT_SAVE_AREA diff --git a/common/src/tx_semaphore_info_get.c b/common/src/tx_semaphore_info_get.c index 89fd9423..2ffad1f7 100644 --- a/common/src/tx_semaphore_info_get.c +++ b/common/src/tx_semaphore_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore) { diff --git a/common/src/tx_thread_create.c b/common/src/tx_thread_create.c index 7c9d054c..cff4db40 100644 --- a/common/src/tx_thread_create.c +++ b/common/src/tx_thread_create.c @@ -78,7 +78,7 @@ /* _tx_timer_initialize Create system timer thread */ /* */ /**************************************************************************/ -UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input, +UINT _tx_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, ULONG time_slice, UINT auto_start) { diff --git a/common/src/tx_thread_info_get.c b/common/src/tx_thread_info_get.c index 740a3b95..cd0df6ec 100644 --- a/common/src/tx_thread_info_get.c +++ b/common/src/tx_thread_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -72,7 +74,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _tx_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread) { diff --git a/common/src/tx_timer_create.c b/common/src/tx_timer_create.c index 30dd4e11..15eb866f 100644 --- a/common/src/tx_timer_create.c +++ b/common/src/tx_timer_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -67,7 +69,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _tx_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG id), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate) { diff --git a/common/src/tx_timer_info_get.c b/common/src/tx_timer_info_get.c index 31c801f9..0811b592 100644 --- a/common/src/tx_timer_info_get.c +++ b/common/src/tx_timer_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -68,7 +70,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _tx_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer) { diff --git a/common/src/tx_trace_object_register.c b/common/src/tx_trace_object_register.c index 741896a5..a0d0f494 100644 --- a/common/src/tx_trace_object_register.c +++ b/common/src/tx_trace_object_register.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -66,7 +68,7 @@ /* Application Code */ /* */ /**************************************************************************/ -VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2) +VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, TX_NAME_CONST CHAR *object_name, ULONG parameter_1, ULONG parameter_2) { #ifdef TX_ENABLE_EVENT_TRACE @@ -75,6 +77,7 @@ UINT i, entries; UINT found, loop_break; TX_THREAD *thread_ptr; UCHAR *work_ptr; +const UCHAR *name_ptr; TX_TRACE_OBJECT_ENTRY *entry_ptr; @@ -211,21 +214,21 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; for (i = ((ULONG) 0); i < (((ULONG) TX_TRACE_OBJECT_REGISTRY_NAME)-((ULONG) 1)); i++) { - /* Setup work pointer to the object name character. */ - work_ptr = TX_CHAR_TO_UCHAR_POINTER_CONVERT(object_name); - work_ptr = TX_UCHAR_POINTER_ADD(work_ptr, i); + /* Setup name pointer to the object name character. */ + name_ptr = TX_CHAR_TO_UCHAR_POINTER_CONVERT(object_name); + name_ptr = TX_CONST_UCHAR_POINTER_ADD(name_ptr, i); - /* Determine if object_name (work_ptr) is null. */ - if (work_ptr == TX_NULL) + /* Determine if object_name (name_ptr) is null. */ + if (name_ptr == TX_NULL) { break; } /* Copy a character of the name. */ - entry_ptr -> tx_trace_object_entry_name[i] = (UCHAR) *work_ptr; + entry_ptr -> tx_trace_object_entry_name[i] = (UCHAR) *name_ptr; /* Determine if we are at the end. */ - if (*work_ptr == ((UCHAR) 0)) + if (*name_ptr == ((UCHAR) 0)) { break; } diff --git a/common/src/txe_block_pool_create.c b/common/src/txe_block_pool_create.c index 08ef7e69..b4c7e13f 100644 --- a/common/src/txe_block_pool_create.c +++ b/common/src/txe_block_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -74,7 +76,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) { diff --git a/common/src/txe_block_pool_info_get.c b/common/src/txe_block_pool_info_get.c index f91ca206..4c6003d7 100644 --- a/common/src/txe_block_pool_info_get.c +++ b/common/src/txe_block_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool) { diff --git a/common/src/txe_byte_pool_create.c b/common/src/txe_byte_pool_create.c index 99a89698..9ae72ee9 100644 --- a/common/src/txe_byte_pool_create.c +++ b/common/src/txe_byte_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -73,7 +75,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) +UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common/src/txe_byte_pool_info_get.c b/common/src/txe_byte_pool_info_get.c index 85e7a233..a83c907b 100644 --- a/common/src/txe_byte_pool_info_get.c +++ b/common/src/txe_byte_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool) { diff --git a/common/src/txe_event_flags_create.c b/common/src/txe_event_flags_create.c index 4e3fed77..20984738 100644 --- a/common/src/txe_event_flags_create.c +++ b/common/src/txe_event_flags_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size) +UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common/src/txe_event_flags_info_get.c b/common/src/txe_event_flags_info_get.c index e551d025..d7bddca4 100644 --- a/common/src/txe_event_flags_info_get.c +++ b/common/src/txe_event_flags_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -72,7 +74,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group) { diff --git a/common/src/txe_mutex_create.c b/common/src/txe_mutex_create.c index 392f8b0e..a0461294 100644 --- a/common/src/txe_mutex_create.c +++ b/common/src/txe_mutex_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -71,7 +73,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size) +UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common/src/txe_mutex_info_get.c b/common/src/txe_mutex_info_get.c index f4ef4168..93b43f91 100644 --- a/common/src/txe_mutex_info_get.c +++ b/common/src/txe_mutex_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -71,7 +73,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex) { diff --git a/common/src/txe_queue_create.c b/common/src/txe_queue_create.c index 185289fe..79aef4a0 100644 --- a/common/src/txe_queue_create.c +++ b/common/src/txe_queue_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -72,7 +74,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size) { diff --git a/common/src/txe_queue_info_get.c b/common/src/txe_queue_info_get.c index 78d98392..90fdd410 100644 --- a/common/src/txe_queue_info_get.c +++ b/common/src/txe_queue_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue) { diff --git a/common/src/txe_semaphore_create.c b/common/src/txe_semaphore_create.c index a190b03c..d538f5fe 100644 --- a/common/src/txe_semaphore_create.c +++ b/common/src/txe_semaphore_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size) +UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common/src/txe_semaphore_info_get.c b/common/src/txe_semaphore_info_get.c index 7695028e..85747dc3 100644 --- a/common/src/txe_semaphore_info_get.c +++ b/common/src/txe_semaphore_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore) { diff --git a/common/src/txe_thread_create.c b/common/src/txe_thread_create.c index d319bc9e..cc5033b2 100644 --- a/common/src/txe_thread_create.c +++ b/common/src/txe_thread_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -79,7 +81,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, diff --git a/common/src/txe_thread_info_get.c b/common/src/txe_thread_info_get.c index ad1db3f7..19e248eb 100644 --- a/common/src/txe_thread_info_get.c +++ b/common/src/txe_thread_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -74,7 +76,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _txe_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread) { diff --git a/common/src/txe_timer_create.c b/common/src/txe_timer_create.c index 02cf7c1a..8c481bde 100644 --- a/common/src/txe_timer_create.c +++ b/common/src/txe_timer_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -74,7 +76,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG id), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size) { diff --git a/common/src/txe_timer_info_get.c b/common/src/txe_timer_info_get.c index 16ac5f64..be2e9a13 100644 --- a/common/src/txe_timer_info_get.c +++ b/common/src/txe_timer_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _txe_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer) { diff --git a/common_modules/inc/txm_module.h b/common_modules/inc/txm_module.h index 4e84dcbb..a823c2c0 100644 --- a/common_modules/inc/txm_module.h +++ b/common_modules/inc/txm_module.h @@ -624,7 +624,7 @@ UINT _txm_module_manager_memory_load(TXM_MODULE_INSTANCE *module_instance, CHAR UINT _txm_module_manager_properties_get(TXM_MODULE_INSTANCE *module_instance, ULONG *module_properties_ptr); UINT _txm_module_manager_start(TXM_MODULE_INSTANCE *module_instance); UINT _txm_module_manager_stop(TXM_MODULE_INSTANCE *module_instance); -UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, CHAR *name, VOID (*shell_function)(TX_THREAD *, TXM_MODULE_INSTANCE *), +UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name, VOID (*shell_function)(TX_THREAD *, TXM_MODULE_INSTANCE *), VOID (*entry_function)(ULONG), 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, TXM_MODULE_INSTANCE *module_instance); diff --git a/common_modules/module_lib/src/txm_block_pool_create.c b/common_modules/module_lib/src/txm_block_pool_create.c index 90838e3b..aa9a6180 100644 --- a/common_modules/module_lib/src/txm_block_pool_create.c +++ b/common_modules/module_lib/src/txm_block_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) +UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) { UINT 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 index fa4ea686..944281e3 100644 --- a/common_modules/module_lib/src/txm_block_pool_info_get.c +++ b/common_modules/module_lib/src/txm_block_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool) +UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool) { UINT 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 index d7775e3f..d0cc76c6 100644 --- a/common_modules/module_lib/src/txm_byte_pool_create.c +++ b/common_modules/module_lib/src/txm_byte_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -63,7 +65,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) +UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) { UINT 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 index 1ad38f48..d6b4a3d6 100644 --- a/common_modules/module_lib/src/txm_byte_pool_info_get.c +++ b/common_modules/module_lib/src/txm_byte_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool) +UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool) { UINT 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 index 76f1fe31..b4e155c1 100644 --- a/common_modules/module_lib/src/txm_event_flags_create.c +++ b/common_modules/module_lib/src/txm_event_flags_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -60,7 +62,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size) +UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size) { UINT 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 index eedcce1f..ebcee339 100644 --- a/common_modules/module_lib/src/txm_event_flags_info_get.c +++ b/common_modules/module_lib/src/txm_event_flags_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group) +UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_mutex_create.c b/common_modules/module_lib/src/txm_mutex_create.c index f50fd52f..5dc53dd9 100644 --- a/common_modules/module_lib/src/txm_mutex_create.c +++ b/common_modules/module_lib/src/txm_mutex_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -61,7 +63,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size) +UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size) { UINT 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 index 8e63c779..534e110e 100644 --- a/common_modules/module_lib/src/txm_mutex_info_get.c +++ b/common_modules/module_lib/src/txm_mutex_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex) +UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_queue_create.c b/common_modules/module_lib/src/txm_queue_create.c index a18b9f85..982c3587 100644 --- a/common_modules/module_lib/src/txm_queue_create.c +++ b/common_modules/module_lib/src/txm_queue_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -62,7 +64,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size) +UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size) { UINT 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 index c66a3d7e..8627a45a 100644 --- a/common_modules/module_lib/src/txm_queue_info_get.c +++ b/common_modules/module_lib/src/txm_queue_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Module application code */ /* */ /**************************************************************************/ -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 _txe_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_semaphore_create.c b/common_modules/module_lib/src/txm_semaphore_create.c index 229b46cd..fbce2d54 100644 --- a/common_modules/module_lib/src/txm_semaphore_create.c +++ b/common_modules/module_lib/src/txm_semaphore_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -60,7 +62,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size) +UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size) { UINT 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 index 2bdfa2c0..128afae7 100644 --- a/common_modules/module_lib/src/txm_semaphore_info_get.c +++ b/common_modules/module_lib/src/txm_semaphore_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore) +UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore) { UINT return_value; diff --git a/common_modules/module_lib/src/txm_thread_create.c b/common_modules/module_lib/src/txm_thread_create.c index 8b1bc367..f17a0185 100644 --- a/common_modules/module_lib/src/txm_thread_create.c +++ b/common_modules/module_lib/src/txm_thread_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Module application code */ /* */ /**************************************************************************/ -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 _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST 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; diff --git a/common_modules/module_lib/src/txm_thread_info_get.c b/common_modules/module_lib/src/txm_thread_info_get.c index d956c031..e50fc446 100644 --- a/common_modules/module_lib/src/txm_thread_info_get.c +++ b/common_modules/module_lib/src/txm_thread_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -67,7 +69,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread) +UINT _txe_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST 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; diff --git a/common_modules/module_lib/src/txm_timer_create.c b/common_modules/module_lib/src/txm_timer_create.c index d65989eb..7adba901 100644 --- a/common_modules/module_lib/src/txm_timer_create.c +++ b/common_modules/module_lib/src/txm_timer_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Module application code */ /* */ /**************************************************************************/ -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 _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST 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; diff --git a/common_modules/module_lib/src/txm_timer_info_get.c b/common_modules/module_lib/src/txm_timer_info_get.c index f918ca67..d431ed93 100644 --- a/common_modules/module_lib/src/txm_timer_info_get.c +++ b/common_modules/module_lib/src/txm_timer_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -63,7 +65,7 @@ /* Module application code */ /* */ /**************************************************************************/ -UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer) +UINT _txe_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer) { UINT return_value; 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 9210c989..e8c0629b 100644 --- a/common_modules/module_manager/inc/txm_module_manager_dispatch.h +++ b/common_modules/module_manager/inc/txm_module_manager_dispatch.h @@ -54,7 +54,7 @@ ALIGN_TYPE return_value; #ifndef TXM_BLOCK_POOL_CREATE_CALL_NOT_USED /* UINT _txe_block_pool_create( TX_BLOCK_POOL *pool_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 ULONG block_size, -> extra_parameters[0] VOID *pool_start, -> extra_parameters[1] ULONG pool_size, -> extra_parameters[2] @@ -82,7 +82,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_block_pool_create( (TX_BLOCK_POOL *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (ULONG) extra_parameters[0], (VOID *) extra_parameters[1], (ULONG) extra_parameters[2], @@ -126,7 +126,7 @@ ALIGN_TYPE return_value; #ifndef TXM_BLOCK_POOL_INFO_GET_CALL_NOT_USED /* UINT _txe_block_pool_info_get( TX_BLOCK_POOL *pool_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *available_blocks, -> extra_parameters[0] ULONG *total_blocks, -> extra_parameters[1] TX_THREAD **first_suspended, -> extra_parameters[2] @@ -167,7 +167,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_block_pool_info_get( (TX_BLOCK_POOL *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (ULONG *) extra_parameters[1], (TX_THREAD **) extra_parameters[2], @@ -363,7 +363,7 @@ ALIGN_TYPE return_value; #ifndef TXM_BYTE_POOL_CREATE_CALL_NOT_USED /* UINT _txe_byte_pool_create( TX_BYTE_POOL *pool_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 VOID *pool_start, -> extra_parameters[0] ULONG pool_size, -> extra_parameters[1] UINT pool_control_block_size -> extra_parameters[2] @@ -390,7 +390,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_byte_pool_create( (TX_BYTE_POOL *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (VOID *) extra_parameters[0], (ULONG) extra_parameters[1], (UINT) extra_parameters[2] @@ -433,7 +433,7 @@ ALIGN_TYPE return_value; #ifndef TXM_BYTE_POOL_INFO_GET_CALL_NOT_USED /* UINT _txe_byte_pool_info_get( TX_BYTE_POOL *pool_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *available_bytes, -> extra_parameters[0] ULONG *fragments, -> extra_parameters[1] TX_THREAD **first_suspended, -> extra_parameters[2] @@ -474,7 +474,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_byte_pool_info_get( (TX_BYTE_POOL *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (ULONG *) extra_parameters[1], (TX_THREAD **) extra_parameters[2], @@ -666,7 +666,7 @@ ALIGN_TYPE block_header_start; #ifndef TXM_EVENT_FLAGS_CREATE_CALL_NOT_USED /* UINT _txe_event_flags_create( TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 UINT event_control_block_size -> param_2 ); */ static ALIGN_TYPE _txm_module_manager_tx_event_flags_create_dispatch(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2) @@ -685,7 +685,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_event_flags_create( (TX_EVENT_FLAGS_GROUP *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (UINT) param_2 ); return(return_value); @@ -762,7 +762,7 @@ ALIGN_TYPE return_value; #ifndef TXM_EVENT_FLAGS_INFO_GET_CALL_NOT_USED /* UINT _txe_event_flags_info_get( TX_EVENT_FLAGS_GROUP *group_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *current_flags, -> extra_parameters[0] TX_THREAD **first_suspended, -> extra_parameters[1] ULONG *suspended_count, -> extra_parameters[2] @@ -799,7 +799,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_event_flags_info_get( (TX_EVENT_FLAGS_GROUP *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (TX_THREAD **) extra_parameters[1], (ULONG *) extra_parameters[2], @@ -969,7 +969,7 @@ VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *); #ifndef TXM_MUTEX_CREATE_CALL_NOT_USED /* UINT _txe_mutex_create( TX_MUTEX *mutex_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 UINT inherit, -> extra_parameters[0] UINT mutex_control_block_size -> extra_parameters[1] ); */ @@ -992,7 +992,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_mutex_create( (TX_MUTEX *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (UINT) extra_parameters[0], (UINT) extra_parameters[1] ); @@ -1058,7 +1058,7 @@ ALIGN_TYPE return_value; #ifndef TXM_MUTEX_INFO_GET_CALL_NOT_USED /* UINT _txe_mutex_info_get( TX_MUTEX *mutex_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *count, -> extra_parameters[0] TX_THREAD **owner, -> extra_parameters[1] TX_THREAD **first_suspended, -> extra_parameters[2] @@ -1099,7 +1099,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_mutex_info_get( (TX_MUTEX *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (TX_THREAD **) extra_parameters[1], (TX_THREAD **) extra_parameters[2], @@ -1262,7 +1262,7 @@ ALIGN_TYPE return_value; #ifndef TXM_QUEUE_CREATE_CALL_NOT_USED /* UINT _txe_queue_create( TX_QUEUE *queue_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 UINT message_size, -> extra_parameters[0] VOID *queue_start, -> extra_parameters[1] ULONG queue_size, -> extra_parameters[2] @@ -1290,7 +1290,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_queue_create( (TX_QUEUE *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (UINT) extra_parameters[0], (VOID *) extra_parameters[1], (ULONG) extra_parameters[2], @@ -1388,7 +1388,7 @@ TX_QUEUE *queue_ptr; #ifndef TXM_QUEUE_INFO_GET_CALL_NOT_USED /* UINT _txe_queue_info_get( TX_QUEUE *queue_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *enqueued, -> extra_parameters[0] ULONG *available_storage, -> extra_parameters[1] TX_THREAD **first_suspended, -> extra_parameters[2] @@ -1429,7 +1429,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_queue_info_get( (TX_QUEUE *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (ULONG *) extra_parameters[1], (TX_THREAD **) extra_parameters[2], @@ -1704,7 +1704,7 @@ ALIGN_TYPE return_value; #ifndef TXM_SEMAPHORE_CREATE_CALL_NOT_USED /* UINT _txe_semaphore_create( TX_SEMAPHORE *semaphore_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 ULONG initial_count, -> extra_parameters[0] UINT semaphore_control_block_size -> extra_parameters[1] ); */ @@ -1727,7 +1727,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_semaphore_create( (TX_SEMAPHORE *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (ULONG) extra_parameters[0], (UINT) extra_parameters[1] ); @@ -1793,7 +1793,7 @@ ALIGN_TYPE return_value; #ifndef TXM_SEMAPHORE_INFO_GET_CALL_NOT_USED /* UINT _txe_semaphore_info_get( TX_SEMAPHORE *semaphore_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 ULONG *current_value, -> extra_parameters[0] TX_THREAD **first_suspended, -> extra_parameters[1] ULONG *suspended_count, -> extra_parameters[2] @@ -1830,7 +1830,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_semaphore_info_get( (TX_SEMAPHORE *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (ULONG *) extra_parameters[0], (TX_THREAD **) extra_parameters[1], (ULONG *) extra_parameters[2], @@ -2018,7 +2018,7 @@ VOID (*semaphore_put_notify)(TX_SEMAPHORE *); #ifndef TXM_THREAD_CREATE_CALL_NOT_USED /* UINT _txe_thread_create( TX_THREAD *thread_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 VOID (*entry_function)(ULONG entry_input), -> extra_parameters[0] ULONG entry_input, -> extra_parameters[1] VOID *stack_start, -> extra_parameters[2] @@ -2057,7 +2057,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txm_module_manager_thread_create( (TX_THREAD *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, module_instance -> txm_module_instance_shell_entry_function, (VOID (*)(ULONG entry_input)) extra_parameters[0], (ULONG) extra_parameters[1], @@ -2194,7 +2194,7 @@ ALIGN_TYPE return_value; #ifndef TXM_THREAD_INFO_GET_CALL_NOT_USED /* UINT _txe_thread_info_get( TX_THREAD *thread_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 UINT *state, -> extra_parameters[0] ULONG *run_count, -> extra_parameters[1] UINT *priority, -> extra_parameters[2] @@ -2243,7 +2243,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_thread_info_get( (TX_THREAD *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (UINT *) extra_parameters[0], (ULONG *) extra_parameters[1], (UINT *) extra_parameters[2], @@ -2811,7 +2811,7 @@ ALIGN_TYPE return_value; #ifndef TXM_TIMER_CREATE_CALL_NOT_USED /* UINT _txe_timer_create( TX_TIMER *timer_ptr, -> param_0 - CHAR *name_ptr, -> param_1 + TX_NAME_CONST CHAR *name_ptr, -> param_1 VOID (*expiration_function)(ULONG), -> extra_parameters[0] ULONG expiration_input, -> extra_parameters[1] ULONG initial_ticks, -> extra_parameters[2] @@ -2854,7 +2854,7 @@ VOID (*expiration_function)(ULONG); return_value = (ALIGN_TYPE) _txe_timer_create( (TX_TIMER *) param_0, - (CHAR *) param_1, + (TX_NAME_CONST CHAR *) param_1, (VOID (*)(ULONG)) expiration_function, (ULONG) extra_parameters[1], (ULONG) extra_parameters[2], @@ -2937,7 +2937,7 @@ ALIGN_TYPE return_value; #ifndef TXM_TIMER_INFO_GET_CALL_NOT_USED /* UINT _txe_timer_info_get( TX_TIMER *timer_ptr, -> param_0 - CHAR **name, -> param_1 + TX_NAME_CONST CHAR **name, -> param_1 UINT *active, -> extra_parameters[0] ULONG *remaining_ticks, -> extra_parameters[1] ULONG *reschedule_ticks, -> extra_parameters[2] @@ -2974,7 +2974,7 @@ ALIGN_TYPE return_value; return_value = (ALIGN_TYPE) _txe_timer_info_get( (TX_TIMER *) param_0, - (CHAR **) param_1, + (TX_NAME_CONST CHAR **) param_1, (UINT *) extra_parameters[0], (ULONG *) extra_parameters[1], (ULONG *) extra_parameters[2], 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 6b9e5b76..3583edcc 100644 --- a/common_modules/module_manager/inc/txm_module_manager_util.h +++ b/common_modules/module_manager/inc/txm_module_manager_util.h @@ -186,7 +186,7 @@ UINT _txm_module_manager_object_memory_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size); UINT _txm_module_manager_object_size_check(ALIGN_TYPE object_ptr, ULONG object_size); -UINT _txm_module_manager_object_name_compare(CHAR *object_name1, UINT object_name1_length, CHAR *object_name2); +UINT _txm_module_manager_object_name_compare(CHAR *object_name1, UINT object_name1_length, TX_NAME_CONST CHAR *object_name2); UCHAR _txm_module_manager_created_object_check(TXM_MODULE_INSTANCE *module_instance, void *object_ptr); UINT _txm_module_manager_param_check_object_for_creation(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size); UINT _txm_module_manager_param_check_object_for_use(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size); 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 276f3c16..51b85e1b 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 @@ -84,7 +84,7 @@ /* _txm_module_manager_kernel_dispatch Kernel dispatch function */ /* */ /**************************************************************************/ -UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*shell_function)(TX_THREAD *, TXM_MODULE_INSTANCE *), VOID (*entry_function)(ULONG id), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, @@ -768,4 +768,3 @@ ULONG i; /* Return success. */ return(TX_SUCCESS); } - 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 93516ab2..f3c8beef 100644 --- a/common_modules/module_manager/src/txm_module_manager_util.c +++ b/common_modules/module_manager/src/txm_module_manager_util.c @@ -281,7 +281,7 @@ UINT return_value; /* 09-30-2020 Scott Larson Initial Version 6.1 */ /* */ /**************************************************************************/ -UINT _txm_module_manager_object_name_compare(CHAR *search_name, UINT search_name_length, CHAR *object_name) +UINT _txm_module_manager_object_name_compare(CHAR *search_name, UINT search_name_length, TX_NAME_CONST CHAR *object_name) { CHAR search_name_char; diff --git a/common_smp/inc/tx_api.h b/common_smp/inc/tx_api.h index 679bfe67..77bd6218 100644 --- a/common_smp/inc/tx_api.h +++ b/common_smp/inc/tx_api.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,6 +66,17 @@ extern "C" { #include "tx_port.h" +/* Define the qualifier applied to object name strings. Opting in makes every + object name a pointer to const, which the kernel and its tests are written + for. It is off by default because it changes the type of a public struct + field, and application code that copies a name into a writable pointer stops + compiling. */ +#ifdef TX_ENABLE_CONST_NAMES +#define TX_NAME_CONST const +#else +#define TX_NAME_CONST +#endif + /* If not defined by tx_port.h, default the port-specific memory synchronization macro to whitespace. */ @@ -392,7 +405,7 @@ typedef struct TX_TIMER_STRUCT ULONG tx_timer_id; /* Define the timer's name. */ - CHAR *tx_timer_name; + TX_NAME_CONST CHAR *tx_timer_name; /* Define the actual contents of the timer. This is the block that is used in the actual timer expiration processing. */ @@ -466,7 +479,7 @@ typedef struct TX_THREAD_STRUCT is typically defined to whitespace or a pointer type in tx_port.h. */ TX_THREAD_EXTENSION_0 - CHAR *tx_thread_name; /* Pointer to thread's name */ + TX_NAME_CONST CHAR *tx_thread_name; /* Pointer to thread's name */ UINT tx_thread_priority; /* Priority of thread (0-1023) */ UINT tx_thread_state; /* Thread's execution state */ UINT tx_thread_delayed_suspend; /* Delayed suspend flag */ @@ -632,7 +645,7 @@ typedef struct TX_BLOCK_POOL_STRUCT ULONG tx_block_pool_id; /* Define the block pool's name. */ - CHAR *tx_block_pool_name; + TX_NAME_CONST CHAR *tx_block_pool_name; /* Define the number of available memory blocks in the pool. */ UINT tx_block_pool_available; @@ -710,7 +723,7 @@ typedef struct TX_BYTE_POOL_STRUCT ULONG tx_byte_pool_id; /* Define the byte pool's name. */ - CHAR *tx_byte_pool_name; + TX_NAME_CONST CHAR *tx_byte_pool_name; /* Define the number of available bytes in the pool. */ ULONG tx_byte_pool_available; @@ -789,7 +802,7 @@ typedef struct TX_EVENT_FLAGS_GROUP_STRUCT ULONG tx_event_flags_group_id; /* Define the event flags group's name. */ - CHAR *tx_event_flags_group_name; + TX_NAME_CONST CHAR *tx_event_flags_group_name; /* Define the actual current event flags in this group. A zero in a particular bit indicates the event flag is not set. */ @@ -875,7 +888,7 @@ typedef struct TX_MUTEX_STRUCT ULONG tx_mutex_id; /* Define the mutex's name. */ - CHAR *tx_mutex_name; + TX_NAME_CONST CHAR *tx_mutex_name; /* Define the mutex ownership count. */ UINT tx_mutex_ownership_count; @@ -948,7 +961,7 @@ typedef struct TX_QUEUE_STRUCT ULONG tx_queue_id; /* Define the queue's name. */ - CHAR *tx_queue_name; + TX_NAME_CONST CHAR *tx_queue_name; /* Define the message size that was specified in queue creation. */ UINT tx_queue_message_size; @@ -1027,7 +1040,7 @@ typedef struct TX_SEMAPHORE_STRUCT ULONG tx_semaphore_id; /* Define the semaphore's name. */ - CHAR *tx_semaphore_name; + TX_NAME_CONST CHAR *tx_semaphore_name; /* Define the actual semaphore count. A zero means that no semaphore instance is available. */ @@ -1530,10 +1543,10 @@ VOID tx_application_define(VOID *first_unused_memory); /* Define block memory pool management function prototypes. */ UINT _tx_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size); UINT _tx_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases, @@ -1548,10 +1561,10 @@ UINT _tx_block_release(VOID *block_ptr); application. */ UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option); -UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr); -UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr); @@ -1562,10 +1575,10 @@ UINT _txe_block_release(VOID *block_ptr); UINT _tx_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size); UINT _tx_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool); UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases, @@ -1581,10 +1594,10 @@ UINT _tx_byte_release(VOID *memory_ptr); UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); UINT _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr); -UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool); UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr); @@ -1593,11 +1606,11 @@ UINT _txe_byte_release(VOID *memory_ptr); /* Define event flags management function prototypes. */ -UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr); +UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr); UINT _tx_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group); UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets, @@ -1612,11 +1625,11 @@ UINT _tx_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*e /* Define error checking shells for API services. These are only referenced by the application. */ -UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); +UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size); UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); UINT _txe_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option); -UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group); UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, @@ -1631,10 +1644,10 @@ VOID _tx_initialize_kernel_enter(VOID); /* Define mutex management function prototypes. */ -UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit); +UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit); UINT _tx_mutex_delete(TX_MUTEX *mutex_ptr); UINT _tx_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex); UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets, @@ -1648,10 +1661,10 @@ UINT _tx_mutex_put(TX_MUTEX *mutex_ptr); /* Define error checking shells for API services. These are only referenced by the application. */ -UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); +UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr); UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option); -UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex); UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr); @@ -1660,11 +1673,11 @@ UINT _txe_mutex_put(TX_MUTEX *mutex_ptr); /* Define queue management function prototypes. */ -UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _tx_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size); UINT _tx_queue_delete(TX_QUEUE *queue_ptr); UINT _tx_queue_flush(TX_QUEUE *queue_ptr); -UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue); 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); @@ -1680,11 +1693,11 @@ UINT _tx_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wa /* Define error checking shells for API services. These are only referenced by the application. */ -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size); UINT _txe_queue_delete(TX_QUEUE *queue_ptr); UINT _txe_queue_flush(TX_QUEUE *queue_ptr); -UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue); UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr); UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option); @@ -1696,10 +1709,10 @@ UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG w /* Define semaphore management function prototypes. */ UINT _tx_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count); +UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count); UINT _tx_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _tx_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore); UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets, @@ -1714,10 +1727,10 @@ UINT _tx_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semapho application. */ UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling); -UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); +UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option); -UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore); UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr); @@ -1729,7 +1742,7 @@ UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaph VOID _tx_thread_context_save(VOID); VOID _tx_thread_context_restore(VOID); -UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _tx_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, @@ -1737,7 +1750,7 @@ UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, UINT _tx_thread_delete(TX_THREAD *thread_ptr); UINT _tx_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); TX_THREAD *_tx_thread_identify(VOID); -UINT _tx_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _tx_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread); UINT _tx_thread_interrupt_control(UINT new_posture); @@ -1766,14 +1779,14 @@ UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr); /* Define error checking shells for API services. These are only referenced by the application. */ -UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST 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 _txe_thread_delete(TX_THREAD *thread_ptr); UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type)); -UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _txe_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread); UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, @@ -1793,12 +1806,12 @@ UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr); UINT _tx_timer_activate(TX_TIMER *timer_ptr); UINT _tx_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -UINT _tx_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _tx_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate); UINT _tx_timer_deactivate(TX_TIMER *timer_ptr); UINT _tx_timer_delete(TX_TIMER *timer_ptr); -UINT _tx_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _tx_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer); UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts); @@ -1814,12 +1827,12 @@ VOID _tx_time_set(ULONG new_time); UINT _txe_timer_activate(TX_TIMER *timer_ptr); UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks); -UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT _txe_timer_deactivate(TX_TIMER *timer_ptr); UINT _txe_timer_delete(TX_TIMER *timer_ptr); -UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _txe_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer); @@ -1933,7 +1946,8 @@ TX_THREAD *_tx_misra_ulong_to_thread_pointer_convert(ULONG value); VOID *_tx_misra_timer_indirect_to_void_pointer_convert(TX_TIMER_INTERNAL **pointer); CHAR *_tx_misra_const_char_to_char_pointer_convert(const char *pointer); TX_THREAD *_tx_misra_void_to_thread_pointer_convert(VOID *pointer); -UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer); +const UCHAR *_tx_misra_char_to_uchar_pointer_convert(TX_NAME_CONST CHAR *pointer); +const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *pointer, ULONG amount); VOID _tx_misra_event_flags_group_not_used(TX_EVENT_FLAGS_GROUP *group_ptr); VOID _tx_misra_event_flags_set_notify_not_used(VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr)); VOID _tx_misra_queue_not_used(TX_QUEUE *queue_ptr); @@ -1945,6 +1959,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #define TX_MEMSET(a,b,c) _tx_misra_memset((a), (UINT) (b), (UINT) (c)) #define TX_UCHAR_POINTER_ADD(a,b) _tx_misra_uchar_pointer_add((UCHAR *) (a), (ULONG) (b)) +#define TX_CONST_UCHAR_POINTER_ADD(a,b) _tx_misra_const_uchar_pointer_add((const UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_SUB(a,b) _tx_misra_uchar_pointer_sub((UCHAR *) (a), (ULONG) (b)) #define TX_UCHAR_POINTER_DIF(a,b) _tx_misra_uchar_pointer_dif((UCHAR *) (a), (UCHAR *) (b)) #define TX_ULONG_POINTER_ADD(a,b) _tx_misra_ulong_pointer_add((ULONG *) (a), (ULONG) (b)) @@ -2005,6 +2020,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #endif #define TX_UCHAR_POINTER_ADD(a,b) (((UCHAR *) (a)) + ((UINT) (b))) +#define TX_CONST_UCHAR_POINTER_ADD(a,b) (((const UCHAR *) (a)) + ((UINT) (b))) #define TX_UCHAR_POINTER_SUB(a,b) (((UCHAR *) (a)) - ((UINT) (b))) #define TX_UCHAR_POINTER_DIF(a,b) ((ULONG)(((UCHAR *) (a)) - ((UCHAR *) (b)))) #define TX_ULONG_POINTER_ADD(a,b) (((ULONG *) (a)) + ((UINT) (b))) @@ -2052,7 +2068,7 @@ VOID _tx_misra_thread_entry_exit_notify_not_used(VOID (*threa #endif #define TX_CONST_CHAR_TO_CHAR_POINTER_CONVERT(a) ((CHAR *) ((VOID *) (a))) #define TX_VOID_TO_THREAD_POINTER_CONVERT(a) ((TX_THREAD *) ((VOID *) (a))) -#define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a))) +#define TX_CHAR_TO_UCHAR_POINTER_CONVERT(a) ((const UCHAR *) ((const VOID *) (a))) #ifndef TX_EVENT_FLAGS_GROUP_NOT_USED #define TX_EVENT_FLAGS_GROUP_NOT_USED(a) ((void)(a)) #endif @@ -2343,4 +2359,3 @@ void __ghs_rnerr(char *errMsg, int stackLevels, int stackTraceDisplay, void *hex #endif #endif - diff --git a/common_smp/inc/tx_trace.h b/common_smp/inc/tx_trace.h index ea0e59e5..2f4447d4 100644 --- a/common_smp/inc/tx_trace.h +++ b/common_smp/inc/tx_trace.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -452,7 +454,7 @@ TRACE_DECLARE ULONG _tx_trace_registry_search_start #define TX_TRACE_INITIALIZE _tx_trace_initialize(); -#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b) _tx_trace_object_register((UCHAR) (t), (VOID *) (p), (CHAR *) (n), (ULONG) (a), (ULONG) (b)); +#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b) _tx_trace_object_register((UCHAR) (t), (VOID *) (p), (n), (ULONG) (a), (ULONG) (b)); #define TX_TRACE_OBJECT_UNREGISTER(o) _tx_trace_object_unregister((VOID *) (o)); #ifndef TX_TRACE_IN_LINE_INSERT #define TX_TRACE_IN_LINE_INSERT(i,a,b,c,d,e) \ @@ -515,7 +517,7 @@ TRACE_DECLARE ULONG _tx_trace_registry_search_start /* Define internal function prototypes of the trace component, only if compiling ThreadX source code. */ VOID _tx_trace_initialize(VOID); -VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2); +VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, TX_NAME_CONST CHAR *object_name, ULONG parameter_1, ULONG parameter_2); VOID _tx_trace_object_unregister(VOID *object_ptr); diff --git a/common_smp/inc/tx_user_sample.h b/common_smp/inc/tx_user_sample.h index 64ff9aed..1514a0db 100644 --- a/common_smp/inc/tx_user_sample.h +++ b/common_smp/inc/tx_user_sample.h @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -100,6 +102,12 @@ #define TX_TIMER_TICKS_PER_SECOND (100UL) */ +/* Define this option to qualify object names as pointers to const. */ + +/* +#define TX_ENABLE_CONST_NAMES +*/ + /* Determine if there is a FileX pointer in the thread control block. By default, the pointer is there for legacy/backwards compatibility. The pointer must also be there for applications using FileX. @@ -288,4 +296,3 @@ */ #endif - diff --git a/common_smp/src/tx_block_pool_create.c b/common_smp/src/tx_block_pool_create.c index 1d2c803c..8781dc78 100644 --- a/common_smp/src/tx_block_pool_create.c +++ b/common_smp/src/tx_block_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -66,7 +68,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size) { diff --git a/common_smp/src/tx_block_pool_info_get.c b/common_smp/src/tx_block_pool_info_get.c index 5998f1db..5e1e89fd 100644 --- a/common_smp/src/tx_block_pool_info_get.c +++ b/common_smp/src/tx_block_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool) { diff --git a/common_smp/src/tx_byte_pool_create.c b/common_smp/src/tx_byte_pool_create.c index 21abbe35..f5c8460d 100644 --- a/common_smp/src/tx_byte_pool_create.c +++ b/common_smp/src/tx_byte_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size) +UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common_smp/src/tx_byte_pool_info_get.c b/common_smp/src/tx_byte_pool_info_get.c index bd096440..e9e9efa4 100644 --- a/common_smp/src/tx_byte_pool_info_get.c +++ b/common_smp/src/tx_byte_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool) { diff --git a/common_smp/src/tx_event_flags_create.c b/common_smp/src/tx_event_flags_create.c index 2a9c042d..361fafa4 100644 --- a/common_smp/src/tx_event_flags_create.c +++ b/common_smp/src/tx_event_flags_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr) +UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr) { TX_INTERRUPT_SAVE_AREA diff --git a/common_smp/src/tx_event_flags_info_get.c b/common_smp/src/tx_event_flags_info_get.c index 21e85c9a..51ec345f 100644 --- a/common_smp/src/tx_event_flags_info_get.c +++ b/common_smp/src/tx_event_flags_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -71,7 +73,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group) { diff --git a/common_smp/src/tx_misra.c b/common_smp/src/tx_misra.c index f37cebaa..b9144a70 100644 --- a/common_smp/src/tx_misra.c +++ b/common_smp/src/tx_misra.c @@ -819,15 +819,29 @@ UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFER_ENTRY *pointer) /***********************************************************************************************/ /***********************************************************************************************/ /** */ -/** UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer); */ +/** const UCHAR *_tx_misra_char_to_uchar_pointer_convert(TX_NAME_CONST CHAR *pointer); */ /** */ /***********************************************************************************************/ /***********************************************************************************************/ -UCHAR *_tx_misra_char_to_uchar_pointer_convert(CHAR *pointer) +const UCHAR *_tx_misra_char_to_uchar_pointer_convert(TX_NAME_CONST CHAR *pointer) { /* Return a UCHAR pointer. */ - return((UCHAR *) ((VOID *) pointer)); + return((const UCHAR *) ((const VOID *) pointer)); +} + + +/***********************************************************************************************/ +/***********************************************************************************************/ +/** */ +/** const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *ptr, ULONG amount); */ +/** */ +/***********************************************************************************************/ +/***********************************************************************************************/ +const UCHAR *_tx_misra_const_uchar_pointer_add(const UCHAR *ptr, ULONG amount) +{ + ptr = ptr + amount; + return(ptr); } diff --git a/common_smp/src/tx_mutex_create.c b/common_smp/src/tx_mutex_create.c index 436c01f5..a1f5eba8 100644 --- a/common_smp/src/tx_mutex_create.c +++ b/common_smp/src/tx_mutex_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -65,7 +67,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit) +UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit) { TX_INTERRUPT_SAVE_AREA diff --git a/common_smp/src/tx_mutex_info_get.c b/common_smp/src/tx_mutex_info_get.c index a24d1e30..3be2606b 100644 --- a/common_smp/src/tx_mutex_info_get.c +++ b/common_smp/src/tx_mutex_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex) { diff --git a/common_smp/src/tx_queue_create.c b/common_smp/src/tx_queue_create.c index 59ae154e..afb5648d 100644 --- a/common_smp/src/tx_queue_create.c +++ b/common_smp/src/tx_queue_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -66,7 +68,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _tx_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size) { diff --git a/common_smp/src/tx_queue_info_get.c b/common_smp/src/tx_queue_info_get.c index d0ecb2b6..e25da54e 100644 --- a/common_smp/src/tx_queue_info_get.c +++ b/common_smp/src/tx_queue_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue) { diff --git a/common_smp/src/tx_semaphore_create.c b/common_smp/src/tx_semaphore_create.c index 849f5d3b..14553ca8 100644 --- a/common_smp/src/tx_semaphore_create.c +++ b/common_smp/src/tx_semaphore_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -64,7 +66,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count) +UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count) { TX_INTERRUPT_SAVE_AREA diff --git a/common_smp/src/tx_semaphore_info_get.c b/common_smp/src/tx_semaphore_info_get.c index 89fd9423..2ffad1f7 100644 --- a/common_smp/src/tx_semaphore_info_get.c +++ b/common_smp/src/tx_semaphore_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore) { diff --git a/common_smp/src/tx_thread_create.c b/common_smp/src/tx_thread_create.c index 5be0d05b..3b158f47 100644 --- a/common_smp/src/tx_thread_create.c +++ b/common_smp/src/tx_thread_create.c @@ -79,7 +79,7 @@ /* _tx_timer_initialize Create system timer thread */ /* */ /**************************************************************************/ -UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _tx_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, ULONG time_slice, UINT auto_start) diff --git a/common_smp/src/tx_thread_info_get.c b/common_smp/src/tx_thread_info_get.c index 740a3b95..cd0df6ec 100644 --- a/common_smp/src/tx_thread_info_get.c +++ b/common_smp/src/tx_thread_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -72,7 +74,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _tx_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread) { diff --git a/common_smp/src/tx_timer_create.c b/common_smp/src/tx_timer_create.c index 73fa67cd..81af4c9b 100644 --- a/common_smp/src/tx_timer_create.c +++ b/common_smp/src/tx_timer_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -68,7 +70,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _tx_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG id), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate) { diff --git a/common_smp/src/tx_timer_info_get.c b/common_smp/src/tx_timer_info_get.c index 31c801f9..0811b592 100644 --- a/common_smp/src/tx_timer_info_get.c +++ b/common_smp/src/tx_timer_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -68,7 +70,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _tx_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _tx_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer) { diff --git a/common_smp/src/tx_trace_object_register.c b/common_smp/src/tx_trace_object_register.c index f7cd4a4a..a2a1e0b4 100644 --- a/common_smp/src/tx_trace_object_register.c +++ b/common_smp/src/tx_trace_object_register.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -66,7 +68,7 @@ /* Application Code */ /* */ /**************************************************************************/ -VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2) +VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, TX_NAME_CONST CHAR *object_name, ULONG parameter_1, ULONG parameter_2) { #ifdef TX_ENABLE_EVENT_TRACE @@ -75,6 +77,7 @@ UINT i, entries; UINT found, loop_break; TX_THREAD *thread_ptr; UCHAR *work_ptr; +const UCHAR *name_ptr; TX_TRACE_OBJECT_ENTRY *entry_ptr; @@ -211,21 +214,21 @@ TX_TRACE_OBJECT_ENTRY *entry_ptr; for (i = ((ULONG) 0); i < (((ULONG) TX_TRACE_OBJECT_REGISTRY_NAME)-((ULONG) 1)); i++) { - /* Setup work pointer to the object name character. */ - work_ptr = TX_CHAR_TO_UCHAR_POINTER_CONVERT(object_name); - work_ptr = TX_UCHAR_POINTER_ADD(work_ptr, i); + /* Setup name pointer to the object name character. */ + name_ptr = TX_CHAR_TO_UCHAR_POINTER_CONVERT(object_name); + name_ptr = TX_CONST_UCHAR_POINTER_ADD(name_ptr, i); - /* Determine if object_name (work_ptr) is null. */ - if (work_ptr == TX_NULL) + /* Determine if object_name (name_ptr) is null. */ + if (name_ptr == TX_NULL) { break; } /* Copy a character of the name. */ - entry_ptr -> tx_trace_object_entry_name[i] = (UCHAR) *work_ptr; + entry_ptr -> tx_trace_object_entry_name[i] = (UCHAR) *name_ptr; /* Determine if we are at the end. */ - if (*work_ptr == ((UCHAR) 0)) + if (*name_ptr == ((UCHAR) 0)) { break; } diff --git a/common_smp/src/txe_block_pool_create.c b/common_smp/src/txe_block_pool_create.c index 08ef7e69..b4c7e13f 100644 --- a/common_smp/src/txe_block_pool_create.c +++ b/common_smp/src/txe_block_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -74,7 +76,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) { diff --git a/common_smp/src/txe_block_pool_info_get.c b/common_smp/src/txe_block_pool_info_get.c index f91ca206..4c6003d7 100644 --- a/common_smp/src/txe_block_pool_info_get.c +++ b/common_smp/src/txe_block_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool) { diff --git a/common_smp/src/txe_byte_pool_create.c b/common_smp/src/txe_byte_pool_create.c index 99a89698..9ae72ee9 100644 --- a/common_smp/src/txe_byte_pool_create.c +++ b/common_smp/src/txe_byte_pool_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -73,7 +75,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) +UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common_smp/src/txe_byte_pool_info_get.c b/common_smp/src/txe_byte_pool_info_get.c index 85e7a233..a83c907b 100644 --- a/common_smp/src/txe_byte_pool_info_get.c +++ b/common_smp/src/txe_byte_pool_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, +UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool) { diff --git a/common_smp/src/txe_event_flags_create.c b/common_smp/src/txe_event_flags_create.c index 4e3fed77..20984738 100644 --- a/common_smp/src/txe_event_flags_create.c +++ b/common_smp/src/txe_event_flags_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size) +UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common_smp/src/txe_event_flags_info_get.c b/common_smp/src/txe_event_flags_info_get.c index e551d025..d7bddca4 100644 --- a/common_smp/src/txe_event_flags_info_get.c +++ b/common_smp/src/txe_event_flags_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -72,7 +74,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, +UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group) { diff --git a/common_smp/src/txe_mutex_create.c b/common_smp/src/txe_mutex_create.c index 392f8b0e..a0461294 100644 --- a/common_smp/src/txe_mutex_create.c +++ b/common_smp/src/txe_mutex_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -71,7 +73,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size) +UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common_smp/src/txe_mutex_info_get.c b/common_smp/src/txe_mutex_info_get.c index f4ef4168..93b43f91 100644 --- a/common_smp/src/txe_mutex_info_get.c +++ b/common_smp/src/txe_mutex_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -71,7 +73,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, +UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex) { diff --git a/common_smp/src/txe_queue_create.c b/common_smp/src/txe_queue_create.c index 387eacb6..ca3b8531 100644 --- a/common_smp/src/txe_queue_create.c +++ b/common_smp/src/txe_queue_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -72,7 +74,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size) { diff --git a/common_smp/src/txe_queue_info_get.c b/common_smp/src/txe_queue_info_get.c index 78d98392..90fdd410 100644 --- a/common_smp/src/txe_queue_info_get.c +++ b/common_smp/src/txe_queue_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, +UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue) { diff --git a/common_smp/src/txe_semaphore_create.c b/common_smp/src/txe_semaphore_create.c index a190b03c..d538f5fe 100644 --- a/common_smp/src/txe_semaphore_create.c +++ b/common_smp/src/txe_semaphore_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size) +UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size) { TX_INTERRUPT_SAVE_AREA diff --git a/common_smp/src/txe_semaphore_info_get.c b/common_smp/src/txe_semaphore_info_get.c index 7695028e..85747dc3 100644 --- a/common_smp/src/txe_semaphore_info_get.c +++ b/common_smp/src/txe_semaphore_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -70,7 +72,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, +UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore) { diff --git a/common_smp/src/txe_thread_create.c b/common_smp/src/txe_thread_create.c index d319bc9e..cc5033b2 100644 --- a/common_smp/src/txe_thread_create.c +++ b/common_smp/src/txe_thread_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -79,7 +81,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, diff --git a/common_smp/src/txe_thread_info_get.c b/common_smp/src/txe_thread_info_get.c index ad1db3f7..19e248eb 100644 --- a/common_smp/src/txe_thread_info_get.c +++ b/common_smp/src/txe_thread_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -74,7 +76,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, +UINT _txe_thread_info_get(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread) { diff --git a/common_smp/src/txe_timer_create.c b/common_smp/src/txe_timer_create.c index 02cf7c1a..8c481bde 100644 --- a/common_smp/src/txe_timer_create.c +++ b/common_smp/src/txe_timer_create.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -74,7 +76,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG id), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size) { diff --git a/common_smp/src/txe_timer_info_get.c b/common_smp/src/txe_timer_info_get.c index 16ac5f64..be2e9a13 100644 --- a/common_smp/src/txe_timer_info_get.c +++ b/common_smp/src/txe_timer_info_get.c @@ -9,6 +9,8 @@ * SPDX-License-Identifier: MIT **************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /**************************************************************************/ /**************************************************************************/ @@ -69,7 +71,7 @@ /* Application Code */ /* */ /**************************************************************************/ -UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, +UINT _txe_timer_info_get(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer) { diff --git a/test/freertos/regression/txfr_test_harness.c b/test/freertos/regression/txfr_test_harness.c index 9f9ec887..b5bd45de 100644 --- a/test/freertos/regression/txfr_test_harness.c +++ b/test/freertos/regression/txfr_test_harness.c @@ -37,17 +37,17 @@ static int txfr_failures; /* The real entry points, supplied by the linker in response to --wrap. */ UINT __real__txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option); UINT __real__txe_byte_release(VOID *memory_ptr); -UINT __real__txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); +UINT __real__txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); UINT __real__txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr); -UINT __real__txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); +UINT __real__txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); UINT __real__txe_mutex_delete(TX_MUTEX *mutex_ptr); -UINT __real__txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); +UINT __real__txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size); UINT __real__txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr); -UINT __real__txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, VOID (*expiration_function)(ULONG input), +UINT __real__txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); UINT __real__txe_timer_delete(TX_TIMER *timer_ptr); -UINT __real__txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), +UINT __real__txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST 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); @@ -93,7 +93,7 @@ UINT __wrap__txe_byte_release(VOID *memory_ptr) } -UINT __wrap__txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size) +UINT __wrap__txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size) { if(txfr_should_fail(TXFR_INJECT_SEMAPHORE_CREATE) != 0) { @@ -121,7 +121,7 @@ UINT __wrap__txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr) } -UINT __wrap__txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size) +UINT __wrap__txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size) { if(txfr_should_fail(TXFR_INJECT_MUTEX_CREATE) != 0) { @@ -149,7 +149,7 @@ UINT __wrap__txe_mutex_delete(TX_MUTEX *mutex_ptr) } -UINT __wrap__txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size) +UINT __wrap__txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size) { if(txfr_should_fail(TXFR_INJECT_EVENT_FLAGS_CREATE) != 0) { @@ -177,7 +177,7 @@ UINT __wrap__txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr) } -UINT __wrap__txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, VOID (*expiration_function)(ULONG input), +UINT __wrap__txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG input), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size) { @@ -208,7 +208,7 @@ UINT __wrap__txe_timer_delete(TX_TIMER *timer_ptr) } -UINT __wrap__txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), +UINT __wrap__txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST 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) diff --git a/test/smp/regression/threadx_block_memory_basic_test.c b/test/smp/regression/threadx_block_memory_basic_test.c index 28edee3f..27990f88 100644 --- a/test/smp/regression/threadx_block_memory_basic_test.c +++ b/test/smp/regression/threadx_block_memory_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test simple memory block pool creation, deletion, and allocates and releases. */ @@ -72,7 +74,7 @@ void test_control_return(UINT status); /* Prototype direct call to block pool core service. */ -UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size); diff --git a/test/smp/regression/threadx_block_memory_error_detection_test.c b/test/smp/regression/threadx_block_memory_error_detection_test.c index 41148120..b0303b76 100644 --- a/test/smp/regression/threadx_block_memory_error_detection_test.c +++ b/test/smp/regression/threadx_block_memory_error_detection_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test error detection for simple memory block operations. */ #include @@ -29,7 +31,7 @@ static CHAR *pointer; static void thread_0_entry(ULONG thread_input); -UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); diff --git a/test/smp/regression/threadx_block_memory_information_test.c b/test/smp/regression/threadx_block_memory_information_test.c index 82d57f40..0c04cb7e 100644 --- a/test/smp/regression/threadx_block_memory_information_test.c +++ b/test/smp/regression/threadx_block_memory_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test block memory information services. */ #include @@ -68,7 +70,7 @@ static void thread_5_entry(ULONG thread_input); static void thread_6_entry(ULONG thread_input); /* Direct core function to bypass the error checking shell. */ -UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); @@ -227,7 +229,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; VOID *pointer; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG available; ULONG total_blocks; TX_THREAD *first_suspended; @@ -369,7 +371,7 @@ ULONG timeouts; status += tx_block_pool_info_get(&block_pool_0, &name, &available, &total_blocks, &first_suspended, &suspended_count, &next_pool); /* Check for an error condition. */ - if ((status) || (available != block_pool_0.tx_block_pool_available) || (total_blocks != block_pool_0.tx_block_pool_total) || + if ((status) || (name != block_pool_0.tx_block_pool_name) || (available != block_pool_0.tx_block_pool_available) || (total_blocks != block_pool_0.tx_block_pool_total) || (first_suspended != &thread_4) || (suspended_count != block_pool_0.tx_block_pool_suspended_count) || (next_pool != &block_pool_0)) { diff --git a/test/smp/regression/threadx_byte_memory_basic_test.c b/test/smp/regression/threadx_byte_memory_basic_test.c index 45a2518d..d7c1232e 100644 --- a/test/smp/regression/threadx_byte_memory_basic_test.c +++ b/test/smp/regression/threadx_byte_memory_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test simple memory byte pool creation, deletion, and allocates and releases. */ @@ -42,7 +44,7 @@ extern UINT test_byte_pool_create_init; extern VOID (*test_isr_dispatch)(void); -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); diff --git a/test/smp/regression/threadx_byte_memory_information_test.c b/test/smp/regression/threadx_byte_memory_information_test.c index f1624a65..f65efac3 100644 --- a/test/smp/regression/threadx_byte_memory_information_test.c +++ b/test/smp/regression/threadx_byte_memory_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test byte memory information. */ #include @@ -226,7 +228,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; VOID *pointer; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG available; ULONG fragments; TX_THREAD *first_suspended; @@ -369,7 +371,7 @@ ULONG timeouts; status += tx_byte_pool_info_get(&byte_pool_0, &name, &available, &fragments, &first_suspended, &suspended_count, &next_pool); /* Check the status. */ - if ((status != TX_SUCCESS) || (available != byte_pool_0.tx_byte_pool_available) || (fragments != byte_pool_0.tx_byte_pool_fragments) || + if ((status != TX_SUCCESS) || (name != byte_pool_0.tx_byte_pool_name) || (available != byte_pool_0.tx_byte_pool_available) || (fragments != byte_pool_0.tx_byte_pool_fragments) || (first_suspended != &thread_4) || (suspended_count != byte_pool_0.tx_byte_pool_suspended_count) || (next_pool != &byte_pool_0)) { diff --git a/test/smp/regression/threadx_byte_memory_long_search_test.c b/test/smp/regression/threadx_byte_memory_long_search_test.c index 86a99be0..8f076335 100644 --- a/test/smp/regression/threadx_byte_memory_long_search_test.c +++ b/test/smp/regression/threadx_byte_memory_long_search_test.c @@ -133,7 +133,7 @@ void threadx_byte_memory_long_search_application_define(void *first_unused_me UINT status; CHAR *pointer; UINT i; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG available; ULONG fragments; void *probe_ptr; @@ -259,7 +259,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; UINT i; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG available; ULONG fragments; diff --git a/test/smp/regression/threadx_event_flag_basic_test.c b/test/smp/regression/threadx_event_flag_basic_test.c index 8ab990f7..fed424a6 100644 --- a/test/smp/regression/threadx_event_flag_basic_test.c +++ b/test/smp/regression/threadx_event_flag_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test simple event flag group creation, deletion, gets and sets. */ @@ -57,7 +59,7 @@ static TX_EVENT_FLAGS_GROUP group_3; static void thread_0_entry(ULONG thread_input); static void thread_1_entry(ULONG thread_input); -UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); +UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size); /* Prototype for test control return. */ diff --git a/test/smp/regression/threadx_event_flag_information_test.c b/test/smp/regression/threadx_event_flag_information_test.c index 45e547f9..1c7cfd2d 100644 --- a/test/smp/regression/threadx_event_flag_information_test.c +++ b/test/smp/regression/threadx_event_flag_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the event flag group information gathering services. */ #include @@ -134,7 +136,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; ULONG actual_events; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG current_flags; TX_THREAD *first_suspended; ULONG suspended_count; @@ -356,7 +358,7 @@ ULONG timeouts; status += tx_event_flags_info_get(&group_0, &name, ¤t_flags, &first_suspended, &suspended_count, &next_group); /* Check the status. */ - if ((status != TX_SUCCESS) || (current_flags != group_0.tx_event_flags_group_current) || (first_suspended != TX_NULL) || (suspended_count != 0) || (next_group != &group_1)) + if ((status != TX_SUCCESS) || (name != group_0.tx_event_flags_group_name) || (current_flags != group_0.tx_event_flags_group_current) || (first_suspended != TX_NULL) || (suspended_count != 0) || (next_group != &group_1)) { /* Event flag error. */ diff --git a/test/smp/regression/threadx_mutex_basic_test.c b/test/smp/regression/threadx_mutex_basic_test.c index bb81eb9a..5a652843 100644 --- a/test/smp/regression/threadx_mutex_basic_test.c +++ b/test/smp/regression/threadx_mutex_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the mutex create/delete and immediate return gets and puts. */ @@ -69,7 +71,7 @@ static void thread_2_entry(ULONG thread_input); static void thread_3_entry(ULONG thread_input); static void thread_4_entry(ULONG thread_input); -UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); +UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); /* Prototype for test control return. */ diff --git a/test/smp/regression/threadx_mutex_information_test.c b/test/smp/regression/threadx_mutex_information_test.c index 3829122c..fea78c04 100644 --- a/test/smp/regression/threadx_mutex_information_test.c +++ b/test/smp/regression/threadx_mutex_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the mutex information services. */ #include @@ -134,7 +136,7 @@ static void thread_0_entry(ULONG thread_input) { UINT status; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG count; TX_THREAD *owner; TX_THREAD *first_suspended; @@ -300,7 +302,7 @@ ULONG inheritances; status += tx_mutex_info_get(&mutex_2, &name, &count, &owner, &first_suspended, &suspended_count, &next_mutex); /* Check status. */ - if ((status != TX_SUCCESS) || (count != mutex_2.tx_mutex_ownership_count) || (owner != mutex_2.tx_mutex_owner) || + if ((status != TX_SUCCESS) || (name != mutex_2.tx_mutex_name) || (count != mutex_2.tx_mutex_ownership_count) || (owner != mutex_2.tx_mutex_owner) || (first_suspended != mutex_2.tx_mutex_suspension_list) || (suspended_count != mutex_2.tx_mutex_suspended_count) || (next_mutex != mutex_2.tx_mutex_created_next)) { diff --git a/test/smp/regression/threadx_queue_basic_one_word_test.c b/test/smp/regression/threadx_queue_basic_one_word_test.c index 1abb6986..58142471 100644 --- a/test/smp/regression/threadx_queue_basic_one_word_test.c +++ b/test/smp/regression/threadx_queue_basic_one_word_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test immediate response queue services including create and delete. This test is for queue sizes of 1 ULONG. Two queues are used one with a capacity of 1 message and another with a capacity of 3 messages. */ @@ -51,7 +53,7 @@ static void thread_0_entry(ULONG thread_input); static void thread_1_entry(ULONG thread_input); -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size); diff --git a/test/smp/regression/threadx_queue_information_test.c b/test/smp/regression/threadx_queue_information_test.c index f884bd0d..8929c465 100644 --- a/test/smp/regression/threadx_queue_information_test.c +++ b/test/smp/regression/threadx_queue_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the queue information services. */ #include @@ -102,7 +104,7 @@ UINT status; ULONG source_message = 0x12345678UL; ULONG dest_message; ULONG expected_message; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG enqueued; ULONG available_storage; TX_THREAD *first_suspended; @@ -409,7 +411,7 @@ ULONG timeouts; status += tx_queue_info_get(&queue_0, &name, &enqueued, &available_storage, &first_suspended, &suspended_count, &next_queue); /* Check for errors. */ - if ((status != TX_SUCCESS) || (enqueued != queue_0.tx_queue_enqueued) || (available_storage != queue_0.tx_queue_available_storage) || + if ((status != TX_SUCCESS) || (name != queue_0.tx_queue_name) || (enqueued != queue_0.tx_queue_enqueued) || (available_storage != queue_0.tx_queue_available_storage) || (first_suspended != queue_0.tx_queue_suspension_list) || (suspended_count != queue_0.tx_queue_suspended_count) || (next_queue != queue_0.tx_queue_created_next)) { diff --git a/test/smp/regression/threadx_semaphore_basic_test.c b/test/smp/regression/threadx_semaphore_basic_test.c index 3209b586..a1a3d340 100644 --- a/test/smp/regression/threadx_semaphore_basic_test.c +++ b/test/smp/regression/threadx_semaphore_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the semaphore create/delete and immediate return gets and puts. */ #include @@ -62,7 +64,7 @@ static TX_SEMAPHORE semaphore_3; static void thread_0_entry(ULONG thread_input); static void thread_1_entry(ULONG thread_input); -UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); +UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); /* Prototype for test control return. */ diff --git a/test/smp/regression/threadx_semaphore_information_test.c b/test/smp/regression/threadx_semaphore_information_test.c index ede276e9..c0bb3c72 100644 --- a/test/smp/regression/threadx_semaphore_information_test.c +++ b/test/smp/regression/threadx_semaphore_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the semaphore information services. */ #include @@ -100,7 +102,7 @@ static void thread_0_entry(ULONG thread_input) { UINT status; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG current_value; TX_THREAD *first_suspended; ULONG suspended_count; @@ -211,7 +213,7 @@ ULONG timeouts; status += tx_semaphore_info_get(&semaphore_0, &name, ¤t_value, &first_suspended, &suspended_count, &next_semaphore); /* Check status. */ - if ((status != TX_SUCCESS) || (current_value != semaphore_0.tx_semaphore_count) || + if ((status != TX_SUCCESS) || (name != semaphore_0.tx_semaphore_name) || (current_value != semaphore_0.tx_semaphore_count) || (first_suspended != semaphore_0.tx_semaphore_suspension_list) || (suspended_count != semaphore_0.tx_semaphore_suspended_count) || (next_semaphore != semaphore_0.tx_semaphore_created_next)) { diff --git a/test/smp/regression/threadx_thread_basic_execution_test.c b/test/smp/regression/threadx_thread_basic_execution_test.c index d90d0769..b0acc842 100644 --- a/test/smp/regression/threadx_thread_basic_execution_test.c +++ b/test/smp/regression/threadx_thread_basic_execution_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to see if one thread can be created and executed. It thread_0_entry is hit, then the thread was successfully scheduled. On success, thread_0_counter gets incremented. */ @@ -69,7 +71,7 @@ static unsigned long isr_executed = 0; static void thread_0_entry(ULONG task_input); -UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, diff --git a/test/smp/regression/threadx_thread_information_test.c b/test/smp/regression/threadx_thread_information_test.c index b5d06e71..fef3473f 100644 --- a/test/smp/regression/threadx_thread_information_test.c +++ b/test/smp/regression/threadx_thread_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is for the thread information services. */ #include @@ -63,7 +65,7 @@ static void thread_0_entry(ULONG thread_input) { UINT status; -CHAR *name; +TX_NAME_CONST CHAR *name; UINT state; ULONG run_count; UINT priority; @@ -96,7 +98,7 @@ ULONG idle_returns; status += tx_thread_info_get(&thread_0, &name, &state, &run_count, &priority, &preemption_threshold, &time_slice, &next_thread, &suspended_thread); /* Check for error status. */ - if ((status != TX_SUCCESS) || (state != TX_READY) || (run_count != thread_0.tx_thread_run_count) || (priority != 16) || (preemption_threshold != 16) || + if ((status != TX_SUCCESS) || (name != thread_0.tx_thread_name) || (state != TX_READY) || (run_count != thread_0.tx_thread_run_count) || (priority != 16) || (preemption_threshold != 16) || (time_slice != 0) || (next_thread != thread_0.tx_thread_created_next) || (suspended_thread != thread_0.tx_thread_suspended_next)) { diff --git a/test/smp/regression/threadx_timer_information_test.c b/test/smp/regression/threadx_timer_information_test.c index ae3bb414..cbb88239 100644 --- a/test/smp/regression/threadx_timer_information_test.c +++ b/test/smp/regression/threadx_timer_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test timer information services. */ #include @@ -104,7 +106,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; UINT interrupt_status; -CHAR *name; +TX_NAME_CONST CHAR *name; UINT active; ULONG remaining_ticks; ULONG reschedule_ticks; @@ -231,7 +233,7 @@ TX_TIMER_INTERNAL **list_head; status += tx_timer_info_get(&timer_0, &name, &active, &remaining_ticks, &reschedule_ticks, &next_timer); /* Check for successful completion. */ - if ((status != TX_SUCCESS) || (active != TX_TRUE) || (remaining_ticks != 100) || (reschedule_ticks != 200) || (next_timer != &timer_1)) + if ((status != TX_SUCCESS) || (name != timer_0.tx_timer_name) || (active != TX_TRUE) || (remaining_ticks != 100) || (reschedule_ticks != 200) || (next_timer != &timer_1)) { /* Application timer error. */ diff --git a/test/smp/regression/threadx_timer_simple_test.c b/test/smp/regression/threadx_timer_simple_test.c index e2272bd2..5abd1d3c 100644 --- a/test/smp/regression/threadx_timer_simple_test.c +++ b/test/smp/regression/threadx_timer_simple_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test a simple application timer services, including create, activate, deactivate, change, and delete. */ @@ -63,7 +65,7 @@ static void thread_1_entry(ULONG thread_input); static void timer_0_expiration(ULONG timer_input); static void timer_1_expiration(ULONG timer_input); -UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); diff --git a/test/smp/regression/threadx_trace_basic_test.c b/test/smp/regression/threadx_trace_basic_test.c index 51fa6256..10b927bb 100644 --- a/test/smp/regression/threadx_trace_basic_test.c +++ b/test/smp/regression/threadx_trace_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test trace functionality in ThreadX. */ #include @@ -30,7 +32,7 @@ extern VOID (*test_isr_dispatch)(void); extern UINT _tx_trace_interrupt_control(UINT new_posture); -extern VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2); +extern VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, TX_NAME_CONST CHAR *object_name, ULONG parameter_1, ULONG parameter_2); extern VOID _tx_trace_object_unregister(VOID *object_ptr); static unsigned long thread_0_counter = 0; diff --git a/test/tx/module_manager/threadx_module_manager_block_pool_parameters_test.c b/test/tx/module_manager/threadx_module_manager_block_pool_parameters_test.c index fb3f6ff9..4fbd3e50 100644 --- a/test/tx/module_manager/threadx_module_manager_block_pool_parameters_test.c +++ b/test/tx/module_manager/threadx_module_manager_block_pool_parameters_test.c @@ -414,7 +414,7 @@ static UINT test_service_record(ALIGN_TYPE object_ptr, ALIGN_TYPE name_ptr, ULO } -UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) { @@ -446,7 +446,7 @@ UINT status; } -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size) { @@ -478,7 +478,7 @@ UINT status; } -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size) { diff --git a/test/tx/regression/threadx_block_memory_basic_test.c b/test/tx/regression/threadx_block_memory_basic_test.c index 94cc8793..d7c609d2 100644 --- a/test/tx/regression/threadx_block_memory_basic_test.c +++ b/test/tx/regression/threadx_block_memory_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test simple memory block pool creation, deletion, and allocates and releases. */ @@ -72,7 +74,7 @@ void test_control_return(UINT status); /* Prototype direct call to block pool core service. */ -UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size); diff --git a/test/tx/regression/threadx_block_memory_error_detection_test.c b/test/tx/regression/threadx_block_memory_error_detection_test.c index 41148120..b0303b76 100644 --- a/test/tx/regression/threadx_block_memory_error_detection_test.c +++ b/test/tx/regression/threadx_block_memory_error_detection_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test error detection for simple memory block operations. */ #include @@ -29,7 +31,7 @@ static CHAR *pointer; static void thread_0_entry(ULONG thread_input); -UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, +UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); diff --git a/test/tx/regression/threadx_block_memory_information_test.c b/test/tx/regression/threadx_block_memory_information_test.c index 82d57f40..0c04cb7e 100644 --- a/test/tx/regression/threadx_block_memory_information_test.c +++ b/test/tx/regression/threadx_block_memory_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test block memory information services. */ #include @@ -68,7 +70,7 @@ static void thread_5_entry(ULONG thread_input); static void thread_6_entry(ULONG thread_input); /* Direct core function to bypass the error checking shell. */ -UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, +UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, TX_NAME_CONST CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool); @@ -227,7 +229,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; VOID *pointer; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG available; ULONG total_blocks; TX_THREAD *first_suspended; @@ -369,7 +371,7 @@ ULONG timeouts; status += tx_block_pool_info_get(&block_pool_0, &name, &available, &total_blocks, &first_suspended, &suspended_count, &next_pool); /* Check for an error condition. */ - if ((status) || (available != block_pool_0.tx_block_pool_available) || (total_blocks != block_pool_0.tx_block_pool_total) || + if ((status) || (name != block_pool_0.tx_block_pool_name) || (available != block_pool_0.tx_block_pool_available) || (total_blocks != block_pool_0.tx_block_pool_total) || (first_suspended != &thread_4) || (suspended_count != block_pool_0.tx_block_pool_suspended_count) || (next_pool != &block_pool_0)) { diff --git a/test/tx/regression/threadx_byte_memory_basic_test.c b/test/tx/regression/threadx_byte_memory_basic_test.c index 45f92e12..6b916f67 100644 --- a/test/tx/regression/threadx_byte_memory_basic_test.c +++ b/test/tx/regression/threadx_byte_memory_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test simple memory byte pool creation, deletion, and allocates and releases. */ @@ -51,7 +53,7 @@ extern UINT test_byte_pool_create_init; extern VOID (*test_isr_dispatch)(void); -UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, +UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, TX_NAME_CONST CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size); diff --git a/test/tx/regression/threadx_byte_memory_information_test.c b/test/tx/regression/threadx_byte_memory_information_test.c index f1624a65..f65efac3 100644 --- a/test/tx/regression/threadx_byte_memory_information_test.c +++ b/test/tx/regression/threadx_byte_memory_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test byte memory information. */ #include @@ -226,7 +228,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; VOID *pointer; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG available; ULONG fragments; TX_THREAD *first_suspended; @@ -369,7 +371,7 @@ ULONG timeouts; status += tx_byte_pool_info_get(&byte_pool_0, &name, &available, &fragments, &first_suspended, &suspended_count, &next_pool); /* Check the status. */ - if ((status != TX_SUCCESS) || (available != byte_pool_0.tx_byte_pool_available) || (fragments != byte_pool_0.tx_byte_pool_fragments) || + if ((status != TX_SUCCESS) || (name != byte_pool_0.tx_byte_pool_name) || (available != byte_pool_0.tx_byte_pool_available) || (fragments != byte_pool_0.tx_byte_pool_fragments) || (first_suspended != &thread_4) || (suspended_count != byte_pool_0.tx_byte_pool_suspended_count) || (next_pool != &byte_pool_0)) { diff --git a/test/tx/regression/threadx_event_flag_basic_test.c b/test/tx/regression/threadx_event_flag_basic_test.c index 8ab990f7..fed424a6 100644 --- a/test/tx/regression/threadx_event_flag_basic_test.c +++ b/test/tx/regression/threadx_event_flag_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test simple event flag group creation, deletion, gets and sets. */ @@ -57,7 +59,7 @@ static TX_EVENT_FLAGS_GROUP group_3; static void thread_0_entry(ULONG thread_input); static void thread_1_entry(ULONG thread_input); -UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size); +UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, TX_NAME_CONST CHAR *name_ptr, UINT event_control_block_size); /* Prototype for test control return. */ diff --git a/test/tx/regression/threadx_event_flag_information_test.c b/test/tx/regression/threadx_event_flag_information_test.c index 45e547f9..1c7cfd2d 100644 --- a/test/tx/regression/threadx_event_flag_information_test.c +++ b/test/tx/regression/threadx_event_flag_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the event flag group information gathering services. */ #include @@ -134,7 +136,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; ULONG actual_events; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG current_flags; TX_THREAD *first_suspended; ULONG suspended_count; @@ -356,7 +358,7 @@ ULONG timeouts; status += tx_event_flags_info_get(&group_0, &name, ¤t_flags, &first_suspended, &suspended_count, &next_group); /* Check the status. */ - if ((status != TX_SUCCESS) || (current_flags != group_0.tx_event_flags_group_current) || (first_suspended != TX_NULL) || (suspended_count != 0) || (next_group != &group_1)) + if ((status != TX_SUCCESS) || (name != group_0.tx_event_flags_group_name) || (current_flags != group_0.tx_event_flags_group_current) || (first_suspended != TX_NULL) || (suspended_count != 0) || (next_group != &group_1)) { /* Event flag error. */ diff --git a/test/tx/regression/threadx_mutex_basic_test.c b/test/tx/regression/threadx_mutex_basic_test.c index bb81eb9a..5a652843 100644 --- a/test/tx/regression/threadx_mutex_basic_test.c +++ b/test/tx/regression/threadx_mutex_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the mutex create/delete and immediate return gets and puts. */ @@ -69,7 +71,7 @@ static void thread_2_entry(ULONG thread_input); static void thread_3_entry(ULONG thread_input); static void thread_4_entry(ULONG thread_input); -UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); +UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, TX_NAME_CONST CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size); /* Prototype for test control return. */ diff --git a/test/tx/regression/threadx_mutex_information_test.c b/test/tx/regression/threadx_mutex_information_test.c index 3829122c..fea78c04 100644 --- a/test/tx/regression/threadx_mutex_information_test.c +++ b/test/tx/regression/threadx_mutex_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the mutex information services. */ #include @@ -134,7 +136,7 @@ static void thread_0_entry(ULONG thread_input) { UINT status; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG count; TX_THREAD *owner; TX_THREAD *first_suspended; @@ -300,7 +302,7 @@ ULONG inheritances; status += tx_mutex_info_get(&mutex_2, &name, &count, &owner, &first_suspended, &suspended_count, &next_mutex); /* Check status. */ - if ((status != TX_SUCCESS) || (count != mutex_2.tx_mutex_ownership_count) || (owner != mutex_2.tx_mutex_owner) || + if ((status != TX_SUCCESS) || (name != mutex_2.tx_mutex_name) || (count != mutex_2.tx_mutex_ownership_count) || (owner != mutex_2.tx_mutex_owner) || (first_suspended != mutex_2.tx_mutex_suspension_list) || (suspended_count != mutex_2.tx_mutex_suspended_count) || (next_mutex != mutex_2.tx_mutex_created_next)) { diff --git a/test/tx/regression/threadx_queue_basic_one_word_test.c b/test/tx/regression/threadx_queue_basic_one_word_test.c index 1abb6986..58142471 100644 --- a/test/tx/regression/threadx_queue_basic_one_word_test.c +++ b/test/tx/regression/threadx_queue_basic_one_word_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test immediate response queue services including create and delete. This test is for queue sizes of 1 ULONG. Two queues are used one with a capacity of 1 message and another with a capacity of 3 messages. */ @@ -51,7 +53,7 @@ static void thread_0_entry(ULONG thread_input); static void thread_1_entry(ULONG thread_input); -UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, +UINT _txe_queue_create(TX_QUEUE *queue_ptr, TX_NAME_CONST CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size); diff --git a/test/tx/regression/threadx_queue_information_test.c b/test/tx/regression/threadx_queue_information_test.c index f884bd0d..8929c465 100644 --- a/test/tx/regression/threadx_queue_information_test.c +++ b/test/tx/regression/threadx_queue_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the queue information services. */ #include @@ -102,7 +104,7 @@ UINT status; ULONG source_message = 0x12345678UL; ULONG dest_message; ULONG expected_message; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG enqueued; ULONG available_storage; TX_THREAD *first_suspended; @@ -409,7 +411,7 @@ ULONG timeouts; status += tx_queue_info_get(&queue_0, &name, &enqueued, &available_storage, &first_suspended, &suspended_count, &next_queue); /* Check for errors. */ - if ((status != TX_SUCCESS) || (enqueued != queue_0.tx_queue_enqueued) || (available_storage != queue_0.tx_queue_available_storage) || + if ((status != TX_SUCCESS) || (name != queue_0.tx_queue_name) || (enqueued != queue_0.tx_queue_enqueued) || (available_storage != queue_0.tx_queue_available_storage) || (first_suspended != queue_0.tx_queue_suspension_list) || (suspended_count != queue_0.tx_queue_suspended_count) || (next_queue != queue_0.tx_queue_created_next)) { diff --git a/test/tx/regression/threadx_semaphore_basic_test.c b/test/tx/regression/threadx_semaphore_basic_test.c index 3209b586..a1a3d340 100644 --- a/test/tx/regression/threadx_semaphore_basic_test.c +++ b/test/tx/regression/threadx_semaphore_basic_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the semaphore create/delete and immediate return gets and puts. */ #include @@ -62,7 +64,7 @@ static TX_SEMAPHORE semaphore_3; static void thread_0_entry(ULONG thread_input); static void thread_1_entry(ULONG thread_input); -UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); +UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, TX_NAME_CONST CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size); /* Prototype for test control return. */ diff --git a/test/tx/regression/threadx_semaphore_information_test.c b/test/tx/regression/threadx_semaphore_information_test.c index ede276e9..c0bb3c72 100644 --- a/test/tx/regression/threadx_semaphore_information_test.c +++ b/test/tx/regression/threadx_semaphore_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test the semaphore information services. */ #include @@ -100,7 +102,7 @@ static void thread_0_entry(ULONG thread_input) { UINT status; -CHAR *name; +TX_NAME_CONST CHAR *name; ULONG current_value; TX_THREAD *first_suspended; ULONG suspended_count; @@ -211,7 +213,7 @@ ULONG timeouts; status += tx_semaphore_info_get(&semaphore_0, &name, ¤t_value, &first_suspended, &suspended_count, &next_semaphore); /* Check status. */ - if ((status != TX_SUCCESS) || (current_value != semaphore_0.tx_semaphore_count) || + if ((status != TX_SUCCESS) || (name != semaphore_0.tx_semaphore_name) || (current_value != semaphore_0.tx_semaphore_count) || (first_suspended != semaphore_0.tx_semaphore_suspension_list) || (suspended_count != semaphore_0.tx_semaphore_suspended_count) || (next_semaphore != semaphore_0.tx_semaphore_created_next)) { diff --git a/test/tx/regression/threadx_thread_basic_execution_test.c b/test/tx/regression/threadx_thread_basic_execution_test.c index 8e9586f2..ea9b1177 100644 --- a/test/tx/regression/threadx_thread_basic_execution_test.c +++ b/test/tx/regression/threadx_thread_basic_execution_test.c @@ -73,7 +73,7 @@ extern TX_TIMER_INTERNAL *_tx_timer_expired_timer_ptr; static void thread_0_entry(ULONG task_input); -UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, +UINT _txe_thread_create(TX_THREAD *thread_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*entry_function)(ULONG), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, diff --git a/test/tx/regression/threadx_thread_information_test.c b/test/tx/regression/threadx_thread_information_test.c index b5d06e71..fef3473f 100644 --- a/test/tx/regression/threadx_thread_information_test.c +++ b/test/tx/regression/threadx_thread_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is for the thread information services. */ #include @@ -63,7 +65,7 @@ static void thread_0_entry(ULONG thread_input) { UINT status; -CHAR *name; +TX_NAME_CONST CHAR *name; UINT state; ULONG run_count; UINT priority; @@ -96,7 +98,7 @@ ULONG idle_returns; status += tx_thread_info_get(&thread_0, &name, &state, &run_count, &priority, &preemption_threshold, &time_slice, &next_thread, &suspended_thread); /* Check for error status. */ - if ((status != TX_SUCCESS) || (state != TX_READY) || (run_count != thread_0.tx_thread_run_count) || (priority != 16) || (preemption_threshold != 16) || + if ((status != TX_SUCCESS) || (name != thread_0.tx_thread_name) || (state != TX_READY) || (run_count != thread_0.tx_thread_run_count) || (priority != 16) || (preemption_threshold != 16) || (time_slice != 0) || (next_thread != thread_0.tx_thread_created_next) || (suspended_thread != thread_0.tx_thread_suspended_next)) { diff --git a/test/tx/regression/threadx_timer_information_test.c b/test/tx/regression/threadx_timer_information_test.c index ae3bb414..cbb88239 100644 --- a/test/tx/regression/threadx_timer_information_test.c +++ b/test/tx/regression/threadx_timer_information_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test timer information services. */ #include @@ -104,7 +106,7 @@ static void thread_0_entry(ULONG thread_input) UINT status; UINT interrupt_status; -CHAR *name; +TX_NAME_CONST CHAR *name; UINT active; ULONG remaining_ticks; ULONG reschedule_ticks; @@ -231,7 +233,7 @@ TX_TIMER_INTERNAL **list_head; status += tx_timer_info_get(&timer_0, &name, &active, &remaining_ticks, &reschedule_ticks, &next_timer); /* Check for successful completion. */ - if ((status != TX_SUCCESS) || (active != TX_TRUE) || (remaining_ticks != 100) || (reschedule_ticks != 200) || (next_timer != &timer_1)) + if ((status != TX_SUCCESS) || (name != timer_0.tx_timer_name) || (active != TX_TRUE) || (remaining_ticks != 100) || (reschedule_ticks != 200) || (next_timer != &timer_1)) { /* Application timer error. */ diff --git a/test/tx/regression/threadx_timer_simple_test.c b/test/tx/regression/threadx_timer_simple_test.c index cad67086..f9c93ee4 100644 --- a/test/tx/regression/threadx_timer_simple_test.c +++ b/test/tx/regression/threadx_timer_simple_test.c @@ -9,6 +9,8 @@ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ +/* Portions of this file were generated with AI assistance. */ + /* This test is designed to test a simple application timer services, including create, activate, deactivate, change, and delete. */ @@ -63,7 +65,7 @@ static void thread_1_entry(ULONG thread_input); static void timer_0_expiration(ULONG timer_input); static void timer_1_expiration(ULONG timer_input); -UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, +UINT _txe_timer_create(TX_TIMER *timer_ptr, TX_NAME_CONST CHAR *name_ptr, VOID (*expiration_function)(ULONG), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size); diff --git a/test/tx/regression/threadx_trace_basic_test.c b/test/tx/regression/threadx_trace_basic_test.c index 19f6953b..cacf72b3 100644 --- a/test/tx/regression/threadx_trace_basic_test.c +++ b/test/tx/regression/threadx_trace_basic_test.c @@ -25,7 +25,7 @@ extern VOID (*test_isr_dispatch)(void); extern UINT _tx_trace_interrupt_control(UINT new_posture); -extern VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2); +extern VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, TX_NAME_CONST CHAR *object_name, ULONG parameter_1, ULONG parameter_2); extern VOID _tx_trace_object_unregister(VOID *object_ptr); static unsigned long thread_0_counter = 0; diff --git a/utility/rtos_compatibility_layers/FreeRTOS/tx_freertos.c b/utility/rtos_compatibility_layers/FreeRTOS/tx_freertos.c index 1cceafb3..3391bf8a 100644 --- a/utility/rtos_compatibility_layers/FreeRTOS/tx_freertos.c +++ b/utility/rtos_compatibility_layers/FreeRTOS/tx_freertos.c @@ -652,7 +652,7 @@ void vTaskPrioritySet(TaskHandle_t xTask, char *pcTaskGetName(TaskHandle_t xTaskToQuery) { TX_THREAD *p_thread; - char *p_task_name; + const char *p_task_name; UINT ret; if(xTaskToQuery == NULL) { @@ -667,7 +667,8 @@ char *pcTaskGetName(TaskHandle_t xTaskToQuery) return 0; } - return p_task_name; + /* FreeRTOS exposes task names through a writable pointer type. */ + return (char *)p_task_name; }