diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d348e684..e988d3a60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,21 @@ endif() if(NOT DEFINED THREADX_TOOLCHAIN) message(FATAL_ERROR "Error: THREADX_TOOLCHAIN not defined") endif() + +option(THREADX_SMP "Build ThreadX SMP version" OFF) + +if(THREADX_SMP) + set(TX_PORT_DIR "ports_smp") + set(TX_COMMON_DIR "common_smp") + set(TX_ARCH_DIR "${THREADX_ARCH}_smp") + message(STATUS "Building ThreadX SMP version") +else() + set(TX_PORT_DIR "ports") + set(TX_COMMON_DIR "common") + set(TX_ARCH_DIR "${THREADX_ARCH}") + message(STATUS "Building standard ThreadX version") +endif() + message(STATUS "THREADX_ARCH: ${THREADX_ARCH}") message(STATUS "THREADX_TOOLCHAIN: ${THREADX_TOOLCHAIN}") @@ -25,11 +40,11 @@ set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc) if(DEFINED THREADX_CUSTOM_PORT) add_subdirectory(${THREADX_CUSTOM_PORT} threadx_port) else() - add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN}) + add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_PORT_DIR}/${TX_ARCH_DIR}/${THREADX_TOOLCHAIN}) endif() # Pick up the common stuff -add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common) +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR}) # Define the FreeRTOS adaptation layer add_library(freertos-threadx EXCLUDE_FROM_ALL) @@ -46,7 +61,7 @@ target_link_libraries(freertos-threadx PUBLIC threadx) # If the user provided an override, copy it to the custom directory if (NOT TX_USER_FILE) message(STATUS "Using default tx_user.h file") - set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/common/inc/tx_user_sample.h) + set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR}/inc/tx_user_sample.h) else() message(STATUS "Using custom tx_user.h file from ${TX_USER_FILE}") endif() @@ -56,6 +71,9 @@ target_include_directories(${PROJECT_NAME} ${CUSTOM_INC_DIR} ) target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_INCLUDE_USER_DEFINE_FILE" ) +if(THREADX_SMP) + target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_MPCORE" ) +endif() # Enable a build target that produces a ZIP file of all sources set(CPACK_SOURCE_GENERATOR "ZIP") diff --git a/cmake/cortex_a9.cmake b/cmake/cortex_a9.cmake new file mode 100644 index 000000000..b84963a47 --- /dev/null +++ b/cmake/cortex_a9.cmake @@ -0,0 +1,13 @@ +# Name of the target +set(CMAKE_SYSTEM_NAME Generic) +set(CMAKE_SYSTEM_PROCESSOR cortex-a9) + +set(THREADX_ARCH "cortex_a9") +set(THREADX_TOOLCHAIN "gnu") + +set(MCPU_FLAGS "-marm -mcpu=cortex-a9") +set(VFP_FLAGS "") +set(SPEC_FLAGS "--specs=nosys.specs") +# set(LD_FLAGS "-nostartfiles") + +include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake) diff --git a/common/inc/tx_user_sample.h b/common/inc/tx_user_sample.h index 9621c30cd..0733c16c4 100644 --- a/common/inc/tx_user_sample.h +++ b/common/inc/tx_user_sample.h @@ -95,7 +95,7 @@ the new value must be a multiple of ULONG. */ /* -#define TX_QUEUE_MESSAGE_MAX_SIZE TX_ULONG_16 +#define TX_QUEUE_MESSAGE_MAX_SIZE TX_16_ULONG */ /* Define the common timer tick reference for use by other middleware components. The default diff --git a/common_smp/CMakeLists.txt b/common_smp/CMakeLists.txt new file mode 100644 index 000000000..80b9d3154 --- /dev/null +++ b/common_smp/CMakeLists.txt @@ -0,0 +1,218 @@ +function(target_sources_if_not_overridden filename) + list(FIND TX_SRC_OVERRIDES ${filename} OVERRIDE_FOUND) + if( OVERRIDE_FOUND EQUAL -1 ) + # message(STATUS "** Using original ${filename} from common_smp/src **") + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src/${filename}) + endif() +endfunction() + +# These files can be overridden by setting them in the variable list named TX_SRC_OVERRIDES +target_sources_if_not_overridden("tx_thread_delete.c") +target_sources_if_not_overridden("tx_thread_reset.c") + +target_sources(${PROJECT_NAME} + PRIVATE + # {{BEGIN_TARGET_SOURCES}} + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_allocate.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_cleanup.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_performance_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_performance_system_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_release.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_allocate.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_cleanup.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_performance_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_performance_system_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_search.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_release.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_cleanup.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_performance_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_performance_system_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_set_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_set.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_high_level.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_kernel_enter.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_kernel_setup.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_misra.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_cleanup.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_performance_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_performance_system_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_priority_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_put.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_cleanup.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_flush.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_front_send.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_performance_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_performance_system_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_receive.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_send_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_send.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_ceiling_put.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_cleanup.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_performance_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_performance_system_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_put_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_put.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_entry_exit_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_identify.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_performance_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_performance_system_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_preemption_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_priority_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_relinquish.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_reset.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_resume.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_shell_entry.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_sleep.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_exclude_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_exclude.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_current_state_set.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_debug_entry_insert.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_high_level_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_rebalance_execute_list.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_utilities.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_analyze.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_error_handler.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_error_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_suspend.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_preempt_check.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_resume.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_suspend.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_terminate.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_time_slice_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_time_slice.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_timeout.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_wait_abort.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_time_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_time_set.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_activate.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_deactivate.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_expiration_process.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_performance_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_performance_system_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_smp_core_exclude_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_smp_core_exclude.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_system_activate.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_system_deactivate.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_thread_entry.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_buffer_full_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_disable.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_enable.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_event_filter.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_event_unfilter.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_initialize.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_interrupt_control.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_isr_enter_insert.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_isr_exit_insert.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_object_register.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_object_unregister.c + ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_user_event_insert.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_allocate.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_release.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_allocate.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_release.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_set_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_set.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_put.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_flush.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_front_send.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_receive.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_send_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_send.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_ceiling_put.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_prioritize.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_put_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_put.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_entry_exit_notify.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_info_get.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_preemption_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_priority_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_relinquish.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_reset.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_resume.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_suspend.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_terminate.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_time_slice_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_wait_abort.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_activate.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_change.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_create.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_deactivate.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_delete.c + ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_info_get.c + # {{END_TARGET_SOURCES}} +) + +# Add the Common/inc directory to the project include list +target_include_directories(${PROJECT_NAME} + SYSTEM + PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/inc +) diff --git a/ports/cortex_a12/gnu/example_build/v7.h b/ports/cortex_a12/gnu/example_build/v7.h index c18b945c5..1133b0acc 100644 --- a/ports/cortex_a12/gnu/example_build/v7.h +++ b/ports/cortex_a12/gnu/example_build/v7.h @@ -37,7 +37,6 @@ void disableInterrupts(void); void invalidateCaches_IS(void); void cleanInvalidateDCache(void); -void invalidateCaches_IS(void); void enableCaches(void); void disableCaches(void); void invalidateCaches(void); diff --git a/ports/cortex_a15/gnu/example_build/v7.h b/ports/cortex_a15/gnu/example_build/v7.h index c18b945c5..1133b0acc 100644 --- a/ports/cortex_a15/gnu/example_build/v7.h +++ b/ports/cortex_a15/gnu/example_build/v7.h @@ -37,7 +37,6 @@ void disableInterrupts(void); void invalidateCaches_IS(void); void cleanInvalidateDCache(void); -void invalidateCaches_IS(void); void enableCaches(void); void disableCaches(void); void invalidateCaches(void); diff --git a/ports/cortex_a17/gnu/example_build/v7.h b/ports/cortex_a17/gnu/example_build/v7.h index c18b945c5..1133b0acc 100644 --- a/ports/cortex_a17/gnu/example_build/v7.h +++ b/ports/cortex_a17/gnu/example_build/v7.h @@ -37,7 +37,6 @@ void disableInterrupts(void); void invalidateCaches_IS(void); void cleanInvalidateDCache(void); -void invalidateCaches_IS(void); void enableCaches(void); void disableCaches(void); void invalidateCaches(void); diff --git a/ports/cortex_a5/gnu/example_build/v7.h b/ports/cortex_a5/gnu/example_build/v7.h index c18b945c5..1133b0acc 100644 --- a/ports/cortex_a5/gnu/example_build/v7.h +++ b/ports/cortex_a5/gnu/example_build/v7.h @@ -37,7 +37,6 @@ void disableInterrupts(void); void invalidateCaches_IS(void); void cleanInvalidateDCache(void); -void invalidateCaches_IS(void); void enableCaches(void); void disableCaches(void); void invalidateCaches(void); diff --git a/ports/cortex_a7/gnu/example_build/v7.h b/ports/cortex_a7/gnu/example_build/v7.h index c18b945c5..1133b0acc 100644 --- a/ports/cortex_a7/gnu/example_build/v7.h +++ b/ports/cortex_a7/gnu/example_build/v7.h @@ -37,7 +37,6 @@ void disableInterrupts(void); void invalidateCaches_IS(void); void cleanInvalidateDCache(void); -void invalidateCaches_IS(void); void enableCaches(void); void disableCaches(void); void invalidateCaches(void); diff --git a/ports/cortex_a8/gnu/example_build/v7.h b/ports/cortex_a8/gnu/example_build/v7.h index c18b945c5..1133b0acc 100644 --- a/ports/cortex_a8/gnu/example_build/v7.h +++ b/ports/cortex_a8/gnu/example_build/v7.h @@ -37,7 +37,6 @@ void disableInterrupts(void); void invalidateCaches_IS(void); void cleanInvalidateDCache(void); -void invalidateCaches_IS(void); void enableCaches(void); void disableCaches(void); void invalidateCaches(void); diff --git a/ports/cortex_a9/gnu/example_build/v7.h b/ports/cortex_a9/gnu/example_build/v7.h index c18b945c5..1133b0acc 100644 --- a/ports/cortex_a9/gnu/example_build/v7.h +++ b/ports/cortex_a9/gnu/example_build/v7.h @@ -37,7 +37,6 @@ void disableInterrupts(void); void invalidateCaches_IS(void); void cleanInvalidateDCache(void); -void invalidateCaches_IS(void); void enableCaches(void); void disableCaches(void); void invalidateCaches(void); diff --git a/ports/cortex_m0/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_m0/ac5/example_build/tx_initialize_low_level.s index b16b3e200..3a585477f 100644 --- a/ports/cortex_m0/ac5/example_build/tx_initialize_low_level.s +++ b/ports/cortex_m0/ac5/example_build/tx_initialize_low_level.s @@ -169,6 +169,9 @@ _tx_initialize_low_level ; /* Configure SysTick. */ ; LDR r0, =0xE000E000 ; Build address of NVIC registers + LDR r1, =0 + STR r1, [r0, #0x10] ; Reset SysTick Control + STR r1, [r0, #0x18] ; Reset SysTick Counter Value LDR r1, =SYSTICK_CYCLES STR r1, [r0, #0x14] ; Setup SysTick Reload Value MOVS r1, #0x7 ; Build SysTick Control Enable Value diff --git a/ports/cortex_m0/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_m0/gnu/example_build/tx_initialize_low_level.S index e9dfb3297..36738f3db 100644 --- a/ports/cortex_m0/gnu/example_build/tx_initialize_low_level.S +++ b/ports/cortex_m0/gnu/example_build/tx_initialize_low_level.S @@ -123,6 +123,9 @@ _tx_initialize_low_level: @ /* Configure SysTick for 100Hz clock, or 16384 cycles if no reference. */ @ LDR r0, =0xE000E000 @ Build address of NVIC registers + LDR r1, =0 + STR r1, [r0, #0x10] // Reset SysTick Control + STR r1, [r0, #0x18] // Reset SysTick Counter Value LDR r1, =SYSTICK_CYCLES STR r1, [r0, #0x14] // Setup SysTick Reload Value LDR r1, =0x7 // Build SysTick Control Enable Value diff --git a/ports/cortex_m0/iar/example_build/tx_initialize_low_level.s b/ports/cortex_m0/iar/example_build/tx_initialize_low_level.s index cec6e9b2b..991f7809a 100644 --- a/ports/cortex_m0/iar/example_build/tx_initialize_low_level.s +++ b/ports/cortex_m0/iar/example_build/tx_initialize_low_level.s @@ -118,6 +118,9 @@ _tx_initialize_low_level: ; /* Configure SysTick. */ ; LDR r0, =0xE000E000 ; Build address of NVIC registers + LDR r1, =0 + STR r1, [r0, #0x10] ; Reset SysTick Control + STR r1, [r0, #0x18] ; Reset SysTick Counter Value LDR r1, =SYSTICK_CYCLES STR r1, [r0, #0x14] ; Setup SysTick Reload Value MOVS r1, #0x7 ; Build SysTick Control Enable Value diff --git a/ports/cortex_m0/keil/example_build/tx_initialize_low_level.s b/ports/cortex_m0/keil/example_build/tx_initialize_low_level.s index b16b3e200..3a585477f 100644 --- a/ports/cortex_m0/keil/example_build/tx_initialize_low_level.s +++ b/ports/cortex_m0/keil/example_build/tx_initialize_low_level.s @@ -169,6 +169,9 @@ _tx_initialize_low_level ; /* Configure SysTick. */ ; LDR r0, =0xE000E000 ; Build address of NVIC registers + LDR r1, =0 + STR r1, [r0, #0x10] ; Reset SysTick Control + STR r1, [r0, #0x18] ; Reset SysTick Counter Value LDR r1, =SYSTICK_CYCLES STR r1, [r0, #0x14] ; Setup SysTick Reload Value MOVS r1, #0x7 ; Build SysTick Control Enable Value diff --git a/ports/risc-v64/gnu/example_build/qemu_virt/csr.h b/ports/risc-v64/gnu/example_build/qemu_virt/csr.h index 92ca66445..83d05afd4 100644 --- a/ports/risc-v64/gnu/example_build/qemu_virt/csr.h +++ b/ports/risc-v64/gnu/example_build/qemu_virt/csr.h @@ -22,6 +22,7 @@ #define MSTATUS_MIE (1L << 3) // machine-mode interrupt enable. #define MSTATUS_MPIE (1L << 7) #define MSTATUS_FS (1L << 13) +#define MSTATUS_VS (1L << 9) // Machine-mode Interrupt Enable #define MIE_MTIE (1L << 7) diff --git a/ports/risc-v64/gnu/example_build/qemu_virt/demo_threadx.c b/ports/risc-v64/gnu/example_build/qemu_virt/demo_threadx.c index 229dcc689..9cbb33da2 100644 --- a/ports/risc-v64/gnu/example_build/qemu_virt/demo_threadx.c +++ b/ports/risc-v64/gnu/example_build/qemu_virt/demo_threadx.c @@ -4,8 +4,13 @@ #include "tx_api.h" #include "uart.h" +#if defined(__riscv_vector) +#define DEMO_STACK_SIZE (1024 + 16448) /* 16448 for RVV Extension */ +#define DEMO_BYTE_POOL_SIZE (9180 + 148032) /* 148032 for RVV Extension */ +#else #define DEMO_STACK_SIZE 1024 #define DEMO_BYTE_POOL_SIZE 9180 +#endif #define DEMO_BLOCK_POOL_SIZE 100 #define DEMO_QUEUE_SIZE 100 diff --git a/ports/risc-v64/gnu/example_build/qemu_virt/entry.s b/ports/risc-v64/gnu/example_build/qemu_virt/entry.s index 9b202ca16..791d08eb2 100644 --- a/ports/risc-v64/gnu/example_build/qemu_virt/entry.s +++ b/ports/risc-v64/gnu/example_build/qemu_virt/entry.s @@ -41,7 +41,11 @@ _start: li x30, 0 li x31, 0 la t0, _sysstack_start +#ifdef __riscv_vector + li t1, 0x5000 +#else li t1, 0x1000 +#endif add sp, t0, t1 la t0, _bss_start la t1, _bss_end diff --git a/ports/risc-v64/gnu/example_build/qemu_virt/link.lds b/ports/risc-v64/gnu/example_build/qemu_virt/link.lds index 522f90d96..d0d8a6bc1 100644 --- a/ports/risc-v64/gnu/example_build/qemu_virt/link.lds +++ b/ports/risc-v64/gnu/example_build/qemu_virt/link.lds @@ -42,6 +42,9 @@ SECTIONS . = ALIGN(4096); _sysstack_start = .; . += 0x1000; +#ifdef __riscv_vector + . += 0x4000; +#endif _sysstack_end = .; } diff --git a/ports/risc-v64/gnu/example_build/qemu_virt/tx_initialize_low_level.S b/ports/risc-v64/gnu/example_build/qemu_virt/tx_initialize_low_level.S index eba6c4587..a9b2fda76 100644 --- a/ports/risc-v64/gnu/example_build/qemu_virt/tx_initialize_low_level.S +++ b/ports/risc-v64/gnu/example_build/qemu_virt/tx_initialize_low_level.S @@ -66,6 +66,13 @@ #else addi sp, sp, -256 // Allocate space for all registers - without floating point enabled (32*8) #endif +#if defined(__riscv_vector) + /* Allocate space for vector registers */ + csrr t4, vlenb + slli t4, t4, 5 + addi t4, t4, 4*8 + sub sp, sp, t4 +#endif sd x1, 224(sp) // Store RA (28*8 = 224, because call will override ra [ra is a callee register in riscv]) @@ -149,6 +156,10 @@ _tx_initialize_low_level: li t0, MSTATUS_FS csrrs zero, mstatus, t0 // set MSTATUS_FS bit to open f/d isa in riscv fscsr x0 +#endif +#ifdef __riscv_vector + li t0, MSTATUS_VS + csrrs zero, mstatus, t0 // set MSTATUS_VS bit to open vector isa in riscv #endif addi sp, sp, -8 sd ra, 0(sp) diff --git a/ports/risc-v64/gnu/inc/tx_port.h b/ports/risc-v64/gnu/inc/tx_port.h index ae617b397..c8f5b3124 100644 --- a/ports/risc-v64/gnu/inc/tx_port.h +++ b/ports/risc-v64/gnu/inc/tx_port.h @@ -100,7 +100,11 @@ typedef unsigned short USHORT; thread creation is less than this value, the thread create call will return an error. */ #ifndef TX_MINIMUM_STACK -#define TX_MINIMUM_STACK 1024 /* Minimum stack size for this port */ +#if defined(__riscv_vector) +#define TX_MINIMUM_STACK (1024 + 16448) /* Minimum stack size for this port */ +#else +#define TX_MINIMUM_STACK 1024 /* Minimum stack size for this port */ +#endif #endif @@ -108,7 +112,11 @@ typedef unsigned short USHORT; if TX_TIMER_PROCESS_IN_ISR is not defined. */ #ifndef TX_TIMER_THREAD_STACK_SIZE -#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */ +#if defined(__riscv_vector) +#define TX_TIMER_THREAD_STACK_SIZE (1024 + 16448) /* Default timer thread stack size */ +#else +#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */ +#endif #endif #ifndef TX_TIMER_THREAD_PRIORITY diff --git a/ports/risc-v64/gnu/src/tx_thread_context_restore.S b/ports/risc-v64/gnu/src/tx_thread_context_restore.S index 6aae3981b..4473a39b2 100644 --- a/ports/risc-v64/gnu/src/tx_thread_context_restore.S +++ b/ports/risc-v64/gnu/src/tx_thread_context_restore.S @@ -133,6 +133,34 @@ _tx_thread_context_restore: csrw fcsr, t0 #endif +#if defined(__riscv_vector) + /* Recover vector registers v0-v31 */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t1, sp, 64*8 +#else + addi t1, sp, 31*8 +#endif + addi t2, t1, 4*8 + vsetvli t3, zero, e8, m8, ta, ma + vle8.v v0, (t2) // Recover v0 ~ v7 + add t2, t2, t3 + vle8.v v8, (t2) // Recover v8 ~ v15 + add t2, t2, t3 + vle8.v v16, (t2) // Recover v16 ~ v23 + add t2, t2, t3 + vle8.v v24, (t2) // Recover v24 ~ v31 + add t2, t2, t3 + + /* Recover vector CSRs */ + ld t2, 0*8(t1) + ld t3, 1*8(t1) + ld t4, 2*8(t1) + vsetvl zero, t4, t3 + csrw vstart, t2 + ld t4, 3*8(t1) + csrw vcsr, t4 +#endif + /* Recover standard registers. */ /* Restore registers, @@ -163,6 +191,10 @@ _tx_thread_context_restore: #if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) li t0, 0x2000 // Set FS bits (bits 14:13 to 01) for FP state or t1, t1, t0 +#endif +#if defined(__riscv_vector) + li t0, 0x0200 // Set VS bits (bits 10:9 to 01) for vector state + or t1, t1, t0 #endif csrw mstatus, t1 // Update mstatus safely @@ -189,6 +221,21 @@ _tx_thread_context_restore: #else addi sp, sp, 32*8 // Recover stack frame - without floating point enabled #endif + +#if defined(__riscv_vector) +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t0, sp, -65*8 +#else + addi t0, sp, -32*8 +#endif + csrr t1, vlenb // Get vector register byte length + slli t1, t1, 5 // Multiply by 32 (number of vector registers) + addi t1, t1, 4*8 // Add vector CSR space: vstart, vtype, vl, vcsr + add sp, sp, t1 // Recover vector stack frame + + ld t1, 18*8(t0) // Recover t1 + ld t0, 19*8(t0) // Recover t0 +#endif mret // Return to point of interrupt /* } */ @@ -268,6 +315,34 @@ _tx_thread_no_preempt_restore: csrw fcsr, t0 // Restore fcsr #endif +#if defined(__riscv_vector) + /* Recover vector registers v0-v31 */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t1, sp, 64*8 +#else + addi t1, sp, 31*8 +#endif + addi t2, t1, 4*8 + vsetvli t3, zero, e8, m8, ta, ma + vle8.v v0, (t2) // Recover v0 ~ v7 + add t2, t2, t3 + vle8.v v8, (t2) // Recover v8 ~ v15 + add t2, t2, t3 + vle8.v v16, (t2) // Recover v16 ~ v23 + add t2, t2, t3 + vle8.v v24, (t2) // Recover v24 ~ v31 + add t2, t2, t3 + + /* Recover vector CSRs */ + ld t2, 0*8(t1) + ld t3, 1*8(t1) + ld t4, 2*8(t1) + vsetvl zero, t4, t3 + csrw vstart, t2 + ld t4, 3*8(t1) + csrw vcsr, t4 +#endif + /* Recover the saved context and return to the point of interrupt. */ /* Recover standard registers. */ @@ -289,6 +364,10 @@ _tx_thread_no_preempt_restore: #if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) li t0, 0x2000 // Set FS bits for FP state or t1, t1, t0 +#endif +#if defined(__riscv_vector) + li t0, 0x0200 // Set VS bits (bits 10:9 to 01) for vector state + or t1, t1, t0 #endif csrw mstatus, t1 // Update mstatus safely @@ -315,6 +394,21 @@ _tx_thread_no_preempt_restore: #else addi sp, sp, 32*8 // Recover stack frame - without floating point enabled #endif + +#if defined(__riscv_vector) +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t0, sp, -65*8 +#else + addi t0, sp, -32*8 +#endif + csrr t1, vlenb // Get vector register byte length + slli t1, t1, 5 // Multiply by 32 (number of vector registers) + addi t1, t1, 4*8 // Add vector CSR space: vstart, vtype, vl, vcsr + add sp, sp, t1 // Recover vector stack frame + + ld t1, 18*8(t0) // Recover t1 + ld t0, 19*8(t0) // Recover t0 +#endif mret // Return to point of interrupt /* } @@ -357,6 +451,36 @@ _tx_thread_preempt_restore: fsd f27, 58*8(t0) // Store fs11 #endif +#if defined(__riscv_vector) + /* Store vector registers and CSRs */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t1, t0, 64*8 +#else + addi t1, t0, 31*8 +#endif + /* Store vector CSRs */ + csrr t2, vstart // Store vstart + sd t2, 0*8(t1) + csrr t2, vtype // Store vtype + sd t2, 1*8(t1) + csrr t2, vl // Store vl + sd t2, 2*8(t1) + csrr t2, vcsr // Store vcsr + sd t2, 3*8(t1) + + /* Store vector registers v0-v31 */ + addi t2, t1, 4*8 + vsetvli t3, zero, e8, m8, ta, ma + vse8.v v0, 0(t2) // Store v0 ~ v7 + add t2, t2, t3 + vse8.v v8, 0(t2) // Store v8 ~ v15 + add t2, t2, t3 + vse8.v v16, 0(t2) // Store v16 ~ v23 + add t2, t2, t3 + vse8.v v24, 0(t2) // Store v24 ~ v31 + add t2, t2, t3 +#endif + /* Store standard preserved registers. */ sd x9, 11*8(t0) // Store s1 diff --git a/ports/risc-v64/gnu/src/tx_thread_context_save.S b/ports/risc-v64/gnu/src/tx_thread_context_save.S index df6f2c9a3..1a6389907 100644 --- a/ports/risc-v64/gnu/src/tx_thread_context_save.S +++ b/ports/risc-v64/gnu/src/tx_thread_context_save.S @@ -146,6 +146,36 @@ _tx_thread_context_save: sd t0, 63*8(sp) // Store fcsr #endif +#if defined(__riscv_vector) + /* Store vector registers and CSRs */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t1, sp, 64*8 +#else + addi t1, sp, 31*8 +#endif + /* Store vector CSRs */ + csrr t2, vstart // Store vstart + sd t2, 0*8(t1) + csrr t2, vtype // Store vtype + sd t2, 1*8(t1) + csrr t2, vl // Store vl + sd t2, 2*8(t1) + csrr t2, vcsr // Store vcsr + sd t2, 3*8(t1) + + /* Store vector registers v0-v31 */ + addi t2, t1, 4*8 + vsetvli t3, zero, e8, m8, ta, ma + vse8.v v0, 0(t2) // Store v0 ~ v7 + add t2, t2, t3 + vse8.v v8, 0(t2) // Store v8 ~ v15 + add t2, t2, t3 + vse8.v v16, 0(t2) // Store v16 ~ v23 + add t2, t2, t3 + vse8.v v24, 0(t2) // Store v24 ~ v31 + add t2, t2, t3 +#endif + #ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY call _tx_execution_isr_enter // Call the ISR execution enter function #endif @@ -236,6 +266,36 @@ _tx_thread_not_nested_save: sd t0, 63*8(sp) // Store fcsr #endif +#if defined(__riscv_vector) + /* Store vector registers and CSRs */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t1, sp, 64*8 +#else + addi t1, sp, 31*8 +#endif + /* Store vector CSRs */ + csrr t2, vstart // Store vstart + sd t2, 0*8(t1) + csrr t2, vtype // Store vtype + sd t2, 1*8(t1) + csrr t2, vl // Store vl + sd t2, 2*8(t1) + csrr t2, vcsr // Store vcsr + sd t2, 3*8(t1) + + /* Store vector registers v0-v31 */ + addi t2, t1, 4*8 + vsetvli t3, zero, e8, m8, ta, ma + vse8.v v0, 0(t2) // Store v0 ~ v7 + add t2, t2, t3 + vse8.v v8, 0(t2) // Store v8 ~ v15 + add t2, t2, t3 + vse8.v v16, 0(t2) // Store v16 ~ v23 + add t2, t2, t3 + vse8.v v24, 0(t2) // Store v24 ~ v31 + add t2, t2, t3 +#endif + /* Save the current stack pointer in the thread's control block. */ /* _tx_thread_current_ptr -> tx_thread_stack_ptr = sp; */ @@ -275,4 +335,19 @@ _tx_thread_idle_system_save: #else addi sp, sp, 32*8 // Recover the reserved stack space #endif + +#if defined(__riscv_vector) +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t0, sp, -65*8 +#else + addi t0, sp, -32*8 +#endif + csrr t1, vlenb // Get vector register byte length + slli t1, t1, 5 // Multiply by 32 (number of vector registers) + addi t1, t1, 4*8 // Add vector CSR space: vstart, vtype, vl, vcsr + add sp, sp, t1 // Recover vector stack frame + + ld t1, 18*8(t0) // Recover t1 + ld t0, 19*8(t0) // Recover t0 +#endif ret // Return to calling ISR diff --git a/ports/risc-v64/gnu/src/tx_thread_schedule.S b/ports/risc-v64/gnu/src/tx_thread_schedule.S index d33328967..85fc9488f 100644 --- a/ports/risc-v64/gnu/src/tx_thread_schedule.S +++ b/ports/risc-v64/gnu/src/tx_thread_schedule.S @@ -206,6 +206,34 @@ _tx_thread_schedule_loop: csrw fcsr, t0 // Restore fcsr #endif +#if defined(__riscv_vector) + /* Recover vector registers v0-v31 */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t1, sp, 64*8 +#else + addi t1, sp, 31*8 +#endif + addi t2, t1, 4*8 + vsetvli t3, zero, e8, m8, ta, ma + vle8.v v0, (t2) // Recover v0 ~ v7 + add t2, t2, t3 + vle8.v v8, (t2) // Recover v8 ~ v15 + add t2, t2, t3 + vle8.v v16, (t2) // Recover v16 ~ v23 + add t2, t2, t3 + vle8.v v24, (t2) // Recover v24 ~ v31 + add t2, t2, t3 + + /* Recover vector CSRs */ + ld t2, 0*8(t1) + ld t3, 1*8(t1) + ld t4, 2*8(t1) + vsetvl zero, t4, t3 + csrw vstart, t2 + ld t4, 3*8(t1) + csrw vcsr, t4 +#endif + /* Recover standard registers. */ ld t0, 30*8(sp) // Recover mepc @@ -214,6 +242,10 @@ _tx_thread_schedule_loop: #if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) li t1, 0x2000 // Set FS bits for FP state or t0, t0, t1 +#endif +#if defined(__riscv_vector) + li t1, 0x0200 // Set VS bits (bits 10:9 to 01) for vector state + or t0, t0, t1 #endif csrw mstatus, t0 // Set mstatus @@ -250,6 +282,20 @@ _tx_thread_schedule_loop: addi sp, sp, 65*8 // Recover stack frame - with floating point registers #else addi sp, sp, 32*8 // Recover stack frame - without floating point registers +#endif +#if defined(__riscv_vector) +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t0, sp, -65*8 +#else + addi t0, sp, -32*8 +#endif + csrr t1, vlenb // Get vector register byte length + slli t1, t1, 5 // Multiply by 32 (number of vector registers) + addi t1, t1, 4*8 // Add vector CSR space: vstart, vtype, vl, vcsr + add sp, sp, t1 // Recover vector stack frame + + ld t1, 18*8(t0) // Recover t1 + ld t0, 19*8(t0) // Recover t0 #endif mret // Return to point of interrupt @@ -287,6 +333,34 @@ _tx_thread_synch_return: csrw fcsr, t0 // #endif +#if defined(__riscv_vector) + /* Recover vector registers v0-v31 */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t1, sp, 28*8 +#else + addi t1, sp, 15*8 +#endif + addi t2, t1, 4*8 + vsetvli t3, zero, e8, m8, ta, ma + vle8.v v0, (t2) // Recover v0 ~ v7 + add t2, t2, t3 + vle8.v v8, (t2) // Recover v8 ~ v15 + add t2, t2, t3 + vle8.v v16, (t2) // Recover v16 ~ v23 + add t2, t2, t3 + vle8.v v24, (t2) // Recover v24 ~ v31 + add t2, t2, t3 + + /* Recover vector CSRs */ + ld t2, 0*8(t1) + ld t3, 1*8(t1) + ld t4, 2*8(t1) + vsetvl zero, t4, t3 + csrw vstart, t2 + ld t4, 3*8(t1) + csrw vcsr, t4 +#endif + /* Recover standard preserved registers. */ /* Recover standard registers. */ @@ -309,6 +383,12 @@ _tx_thread_synch_return: addi sp, sp, 29*8 // Recover stack frame #else addi sp, sp, 16*8 // Recover stack frame +#endif +#if defined(__riscv_vector) + csrr t1, vlenb // Get vector register byte length + slli t1, t1, 5 // Multiply by 32 (number of vector registers) + addi t1, t1, 4*8 // Add vector CSR space: vstart, vtype, vl, vcsr + add sp, sp, t1 // Recover vector stack frame #endif ret // Return to thread diff --git a/ports/risc-v64/gnu/src/tx_thread_stack_build.S b/ports/risc-v64/gnu/src/tx_thread_stack_build.S index 8663a6f1b..410f6cc84 100644 --- a/ports/risc-v64/gnu/src/tx_thread_stack_build.S +++ b/ports/risc-v64/gnu/src/tx_thread_stack_build.S @@ -128,6 +128,15 @@ If floating point support: f30 61 Inital ft10 f31 62 Inital ft11 fscr 63 Inital fscr +If vector extension support: + vstart 64 Initial vstart + vtype 65 Initial vtype + vl 66 Initial vl + vcsr 67 Initial vcsr + v0 68 Initial v0 + v1 69 Initial v1 + ... + v31 99 Initial v31 Stack Bottom: (higher memory address) */ @@ -142,6 +151,17 @@ If floating point support: #else addi t0, t0, -32*8 // Allocate space for the stack frame #endif + +#if defined(__riscv_vector) + /* Vector extension support: calculate space based on vlenb */ + csrr t4, vlenb // Get vector register byte length + slli t4, t4, 5 // Multiply by 32 (number of vector registers) + addi t4, t4, 4*8 // Add vector CSR space: vstart, vtype, vl, vcsr + sub t0, t0, t4 // Allocate vector space for the stack frame +#else + li t4, 0 +#endif + li t1, 1 // Build stack type sd t1, 0*8(t0) // Place stack type on the top sd zero, 1*8(t0) // Initial s11 @@ -208,9 +228,31 @@ If floating point support: sd zero, 62*8(t0) // Initial ft11 csrr a1, fcsr // Read fcsr for initial value sd a1, 63*8(t0) // Initial fcsr - sd zero, 64*8(t0) // Reserved word (0) +#endif + +#if defined(__riscv_vector) + /* Clear vector register space */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t2, t0, 64*8 // t2 = start of vector registers +#else + addi t2, t0, 31*8 // t2 = start of vector registers +#endif + add t3, t2, t4 // t3 = end of vector registers + +vector_clear_loop: + beq t2, t3, vector_clear_done // Done if reached end + sd zero, 0(t2) // Clear 8 bytes + addi t2, t2, 8 // Move to next 8 bytes + j vector_clear_loop + +vector_clear_done: +#endif + + add t2, t0, t4 +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + sd zero, 64*8(t2) // Reserved word (0) #else - sd zero, 31*8(t0) // Reserved word (0) + sd zero, 31*8(t2) // Reserved word (0) #endif /* Setup stack pointer. */ diff --git a/ports/risc-v64/gnu/src/tx_thread_system_return.S b/ports/risc-v64/gnu/src/tx_thread_system_return.S index 4e954ebe3..61babae35 100644 --- a/ports/risc-v64/gnu/src/tx_thread_system_return.S +++ b/ports/risc-v64/gnu/src/tx_thread_system_return.S @@ -68,6 +68,12 @@ _tx_thread_system_return: #else addi sp, sp, -16*8 // Allocate space on the stack - without floating point enabled #endif +#if defined(__riscv_vector) + csrr t1, vlenb // Get vector register byte length + slli t1, t1, 5 // Multiply by 32 (number of vector registers) + addi t1, t1, 4*8 // Add vector CSR space: vstart, vtype, vl, vcsr + sub sp, sp, t1 // Allocate vector space on the stack +#endif /* Store floating point preserved registers. */ #if defined(__riscv_float_abi_single) @@ -102,6 +108,36 @@ _tx_thread_system_return: sd t0, 27*8(sp) // Store fcsr #endif +#if defined(__riscv_vector) + /* Store vector registers and CSRs */ +#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double) + addi t1, sp, 28*8 +#else + addi t1, sp, 15*8 +#endif + /* Store vector CSRs */ + csrr t2, vstart // Store vstart + sd t2, 0*8(t1) + csrr t2, vtype // Store vtype + sd t2, 1*8(t1) + csrr t2, vl // Store vl + sd t2, 2*8(t1) + csrr t2, vcsr // Store vcsr + sd t2, 3*8(t1) + + /* Store vector registers v0-v31 */ + addi t2, t1, 4*8 + vsetvli t3, zero, e8, m8, ta, ma + vse8.v v0, 0(t2) // Store v0 ~ v7 + add t2, t2, t3 + vse8.v v8, 0(t2) // Store v8 ~ v15 + add t2, t2, t3 + vse8.v v16, 0(t2) // Store v16 ~ v23 + add t2, t2, t3 + vse8.v v24, 0(t2) // Store v24 ~ v31 + add t2, t2, t3 +#endif + sd zero, 0(sp) // Solicited stack type sd ra, 13*8(sp) // Save return address sd s0, 12*8(sp) // Save s0 diff --git a/ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h b/ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h index c18b945c5..1133b0acc 100644 --- a/ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h +++ b/ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h @@ -37,7 +37,6 @@ void disableInterrupts(void); void invalidateCaches_IS(void); void cleanInvalidateDCache(void); -void invalidateCaches_IS(void); void enableCaches(void); void disableCaches(void); void invalidateCaches(void); diff --git a/ports_smp/cortex_a5_smp/ac5/example_build/sample_threadx/v7.h b/ports_smp/cortex_a5_smp/ac5/example_build/sample_threadx/v7.h index c18b945c5..4a500a593 100644 --- a/ports_smp/cortex_a5_smp/ac5/example_build/sample_threadx/v7.h +++ b/ports_smp/cortex_a5_smp/ac5/example_build/sample_threadx/v7.h @@ -35,7 +35,6 @@ void disableInterrupts(void); // ------------------------------------------------------------ // Caches -void invalidateCaches_IS(void); void cleanInvalidateDCache(void); void invalidateCaches_IS(void); void enableCaches(void); diff --git a/ports_smp/cortex_a5_smp/gnu/example_build/v7.h b/ports_smp/cortex_a5_smp/gnu/example_build/v7.h index c18b945c5..4a500a593 100644 --- a/ports_smp/cortex_a5_smp/gnu/example_build/v7.h +++ b/ports_smp/cortex_a5_smp/gnu/example_build/v7.h @@ -35,7 +35,6 @@ void disableInterrupts(void); // ------------------------------------------------------------ // Caches -void invalidateCaches_IS(void); void cleanInvalidateDCache(void); void invalidateCaches_IS(void); void enableCaches(void); diff --git a/ports_smp/cortex_a75_smp/gnu/inc/tx_port.h b/ports_smp/cortex_a75_smp/gnu/inc/tx_port.h index 262f2ddf7..085cffb2a 100644 --- a/ports_smp/cortex_a75_smp/gnu/inc/tx_port.h +++ b/ports_smp/cortex_a75_smp/gnu/inc/tx_port.h @@ -187,7 +187,7 @@ typedef unsigned long long ALIGN_TYPE; /* Define various constants for the ThreadX ARM port. */ #define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */ -#define TX_INT_ENABLE 0x00 /* Enable IRQ & FIQ interrupts */ +#define TX_INT_ENABLE 0x00 /* Enable IRQ & FIQ interrupts */ /* Define the clock source for trace event entry time stamp. The following two item are port specific. diff --git a/ports_smp/cortex_a7_smp/ac5/example_build/sample_threadx/v7.h b/ports_smp/cortex_a7_smp/ac5/example_build/sample_threadx/v7.h index c18b945c5..4a500a593 100644 --- a/ports_smp/cortex_a7_smp/ac5/example_build/sample_threadx/v7.h +++ b/ports_smp/cortex_a7_smp/ac5/example_build/sample_threadx/v7.h @@ -35,7 +35,6 @@ void disableInterrupts(void); // ------------------------------------------------------------ // Caches -void invalidateCaches_IS(void); void cleanInvalidateDCache(void); void invalidateCaches_IS(void); void enableCaches(void); diff --git a/ports_smp/cortex_a7_smp/gnu/example_build/v7.h b/ports_smp/cortex_a7_smp/gnu/example_build/v7.h index 0fc0183f3..88e88508d 100644 --- a/ports_smp/cortex_a7_smp/gnu/example_build/v7.h +++ b/ports_smp/cortex_a7_smp/gnu/example_build/v7.h @@ -23,7 +23,6 @@ void disableInterrupts(void); // ------------------------------------------------------------ // Caches -void invalidateCaches_IS(void); void cleanInvalidateDCache(void); void invalidateCaches_IS(void); void enableCaches(void); diff --git a/ports_smp/cortex_a9_smp/gnu/CMakeLists.txt b/ports_smp/cortex_a9_smp/gnu/CMakeLists.txt new file mode 100644 index 000000000..4b13e1a15 --- /dev/null +++ b/ports_smp/cortex_a9_smp/gnu/CMakeLists.txt @@ -0,0 +1,31 @@ +target_sources(${PROJECT_NAME} + PRIVATE + # {{BEGIN_TARGET_SOURCES}} + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_restore.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_end.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_start.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_get.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_preempt.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_current_state_get.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_current_thread_get.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_initialize_wait.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_low_level_initialize.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_protect.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_time_get.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_unprotect.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_vectored_context_save.S + ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_interrupt.S + # {{END_TARGET_SOURCES}} +) + +target_include_directories(${PROJECT_NAME} + PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/inc +) diff --git a/ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat b/ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat index 22d0a618b..07f887eda 100644 --- a/ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat +++ b/ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat @@ -1,8 +1,8 @@ -arm-none-eabi-gcc -c -g -I../../../../common_smp/inc -I../inc -mcpu=cortex-a5 sample_threadx.c +arm-none-eabi-gcc -c -g -I../../../../common_smp/inc -I../inc -mcpu=cortex-a9 sample_threadx.c arm-none-eabi-gcc -c -g -mcpu=cortex-a9 startup.S arm-none-eabi-gcc -c -g -mcpu=cortex-a9 MP_GIC.S arm-none-eabi-gcc -c -g -mcpu=cortex-a9 MP_SCU.S arm-none-eabi-gcc -c -g -mcpu=cortex-a9 MP_Mutexes.S arm-none-eabi-gcc -c -g -mcpu=cortex-a9 MP_PrivateTimer.S arm-none-eabi-gcc -c -g -mcpu=cortex-a9 v7.S -arm-none-eabi-gcc -T sample_threadx.ld -e Vectors -o sample_threadx.axf MP_PrivateTimer.o MP_GIC.o MP_Mutexes.o MP_SCU.o sample_threadx.o startup.o v7.o tx.a -Wl,-M > sample_threadx.map +arm-none-eabi-gcc -T sample_threadx.ld -e Vectors -mcpu=cortex-a9 --specs=nosys.specs -o sample_threadx.axf MP_PrivateTimer.o MP_GIC.o MP_Mutexes.o MP_SCU.o sample_threadx.o startup.o v7.o tx.a -Wl,-M > sample_threadx.map diff --git a/ports_smp/cortex_a9_smp/gnu/example_build/v7.h b/ports_smp/cortex_a9_smp/gnu/example_build/v7.h index c18b945c5..4a500a593 100644 --- a/ports_smp/cortex_a9_smp/gnu/example_build/v7.h +++ b/ports_smp/cortex_a9_smp/gnu/example_build/v7.h @@ -35,7 +35,6 @@ void disableInterrupts(void); // ------------------------------------------------------------ // Caches -void invalidateCaches_IS(void); void cleanInvalidateDCache(void); void invalidateCaches_IS(void); void enableCaches(void); diff --git a/test/smp/cmake/regression/CMakeLists.txt b/test/smp/cmake/regression/CMakeLists.txt index c23626202..f7226c216 100644 --- a/test/smp/cmake/regression/CMakeLists.txt +++ b/test/smp/cmake/regression/CMakeLists.txt @@ -75,8 +75,8 @@ set(regression_test_cases ${SOURCE_DIR}/threadx_smp_random_resume_suspend_test.c ${SOURCE_DIR}/threadx_smp_rebalance_exclusion_test.c ${SOURCE_DIR}/threadx_smp_relinquish_test.c - ${SOURCE_DIR}/threadx_smp_resume_suspend_accending_order_test.c - ${SOURCE_DIR}/threadx_smp_resume_suspend_decending_order_test.c + ${SOURCE_DIR}/threadx_smp_resume_suspend_ascending_order_test.c + ${SOURCE_DIR}/threadx_smp_resume_suspend_descending_order_test.c ${SOURCE_DIR}/threadx_smp_time_slice_test.c ${SOURCE_DIR}/threadx_smp_two_threads_one_core_test.c ${SOURCE_DIR}/threadx_thread_basic_execution_test.c diff --git a/test/smp/regression/testcontrol.c b/test/smp/regression/testcontrol.c index 6b45750d0..dacaf70e8 100644 --- a/test/smp/regression/testcontrol.c +++ b/test/smp/regression/testcontrol.c @@ -209,7 +209,7 @@ void threadx_semaphore_information_application_define(void *); void threadx_thread_basic_execution_application_define(void *); void threadx_thread_completed_application_define(void *); void threadx_thread_relinquish_application_define(void *); -void threadx_thread_simple_supsend_application_define(void *); +void threadx_thread_simple_suspend_application_define(void *); void threadx_thread_multiple_suspension_application_define(void *); void threadx_thread_multiple_non_current_suspension_application_define(void *); void threadx_thread_multi_level_preemption_threshold_application_define(void *); @@ -250,8 +250,8 @@ void threadx_smp_two_threads_one_core_test(void *first_unused_memory); void threadx_smp_multiple_threads_one_core_test(void *first_unused_memory); void threadx_smp_one_thread_dynamic_exclusion_test(void *first_unused_memory); void threadx_smp_non_trivial_scheduling_test(void *first_unused_memory); -void threadx_smp_resume_suspend_accending_order_test(void *first_unused_memory); -void threadx_smp_resume_suspend_decending_order_test(void *first_unused_memory); +void threadx_smp_resume_suspend_ascending_order_test(void *first_unused_memory); +void threadx_smp_resume_suspend_descending_order_test(void *first_unused_memory); void threadx_smp_preemption_threshold_test(void *first_unused_memory); void threadx_smp_relinquish_test(void *first_unused_memory); void threadx_smp_time_slice_test(void *first_unused_memory); @@ -274,8 +274,8 @@ TEST_ENTRY test_control_tests[] = threadx_smp_multiple_threads_one_core_test, threadx_smp_one_thread_dynamic_exclusion_test, threadx_smp_non_trivial_scheduling_test, - threadx_smp_resume_suspend_accending_order_test, - threadx_smp_resume_suspend_decending_order_test, + threadx_smp_resume_suspend_ascending_order_test, + threadx_smp_resume_suspend_descending_order_test, threadx_smp_preemption_threshold_test, threadx_smp_relinquish_test, threadx_smp_time_slice_test, @@ -353,7 +353,7 @@ TEST_ENTRY test_control_tests[] = threadx_thread_basic_execution_application_define, threadx_thread_completed_application_define, threadx_thread_relinquish_application_define, - threadx_thread_simple_supsend_application_define, + threadx_thread_simple_suspend_application_define, threadx_thread_multiple_suspension_application_define, threadx_thread_multiple_non_current_suspension_application_define, threadx_thread_multi_level_preemption_threshold_application_define, @@ -1429,8 +1429,8 @@ UINT old_posture = TX_INT_ENABLE; /* Are interrupts disabled? */ if (old_posture == TX_INT_DISABLE) { - - /* System error - interrupts should alwasy be enabled in our test threads! */ + + /* System error - interrupts should always be enabled in our test threads! */ printf(" ***** SYSTEM ERROR ***** test returned with interrupts disabled!\n"); test_control_system_errors++; } diff --git a/test/smp/regression/threadx_mutex_information_test.c b/test/smp/regression/threadx_mutex_information_test.c index 55503002e..74f4714bf 100644 --- a/test/smp/regression/threadx_mutex_information_test.c +++ b/test/smp/regression/threadx_mutex_information_test.c @@ -312,7 +312,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(&mutex_2, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -325,8 +325,8 @@ ULONG inheritances; printf("ERROR #19\n"); test_control_return(1); } - - /* Now get the system performance inforamtion. */ + + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(&puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -342,7 +342,7 @@ ULONG inheritances; #else - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(&mutex_2, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -354,7 +354,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -366,7 +366,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -378,7 +378,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -390,7 +390,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -402,7 +402,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inversions, &inheritances); /* Check status. */ @@ -414,7 +414,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inheritances); /* Check status. */ @@ -426,7 +426,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL); /* Check status. */ @@ -438,7 +438,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(&puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -450,7 +450,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -462,7 +462,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -474,7 +474,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -486,7 +486,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inversions, &inheritances); /* Check status. */ @@ -498,7 +498,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inheritances); /* Check status. */ @@ -510,7 +510,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL); /* Check status. */ diff --git a/test/smp/regression/threadx_mutex_nested_priority_inheritance_test.c b/test/smp/regression/threadx_mutex_nested_priority_inheritance_test.c index 1439ca855..e9b60bf5e 100644 --- a/test/smp/regression/threadx_mutex_nested_priority_inheritance_test.c +++ b/test/smp/regression/threadx_mutex_nested_priority_inheritance_test.c @@ -404,7 +404,7 @@ UINT status; tx_mutex_put(&mutex_2); - /* Should reurn us back to priority 15. */ + /* Should return us back to priority 15. */ if (thread_0.tx_thread_priority != 15) { @@ -441,7 +441,7 @@ UINT status; tx_mutex_put(&mutex_2); - /* Should reurn us back to priority 8. */ + /* Should return us back to priority 8. */ if (thread_0.tx_thread_priority != 8) { diff --git a/test/smp/regression/threadx_smp_resume_suspend_accending_order_test.c b/test/smp/regression/threadx_smp_resume_suspend_accending_order_test.c index fe55660a7..22140ab56 100644 --- a/test/smp/regression/threadx_smp_resume_suspend_accending_order_test.c +++ b/test/smp/regression/threadx_smp_resume_suspend_accending_order_test.c @@ -1,4 +1,4 @@ -/* Define the ThreadX SMP resume and suspend threads in accending order test. */ +/* Define the ThreadX SMP resume and suspend threads in ascending order test. */ #include #include "tx_api.h" @@ -71,7 +71,7 @@ static void delay(UINT i) #ifdef CTEST void test_application_define(void *first_unused_memory) #else -void threadx_smp_resume_suspend_accending_order_test(void *first_unused_memory) +void threadx_smp_resume_suspend_ascending_order_test(void *first_unused_memory) #endif { @@ -969,7 +969,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(1); status = tx_thread_suspend(&thread_1); @@ -982,8 +982,8 @@ UINT status; printf("ERROR #65\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ delay(2); status = tx_thread_suspend(&thread_2); @@ -997,7 +997,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(3); status = tx_thread_suspend(&thread_3); @@ -1011,7 +1011,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(4); status = tx_thread_suspend(&thread_4); @@ -1025,7 +1025,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(5); status = tx_thread_suspend(&thread_5); @@ -1039,7 +1039,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(6); status = tx_thread_suspend(&thread_6); @@ -1053,7 +1053,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(7); status = tx_thread_suspend(&thread_7); @@ -1067,7 +1067,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(8); status = tx_thread_suspend(&thread_8); @@ -1081,7 +1081,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(9); status = tx_thread_suspend(&thread_9); @@ -1095,7 +1095,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(10); status = tx_thread_suspend(&thread_10); @@ -1109,7 +1109,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(11); status = tx_thread_suspend(&thread_11); @@ -1123,7 +1123,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(12); status = tx_thread_suspend(&thread_12); @@ -1137,7 +1137,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(13); status = tx_thread_suspend(&thread_13); @@ -1150,8 +1150,8 @@ UINT status; printf("ERROR #77\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ delay(14); status = tx_thread_suspend(&thread_14); @@ -1164,8 +1164,8 @@ UINT status; printf("ERROR #78\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ delay(15); status = tx_thread_suspend(&thread_15); @@ -1178,8 +1178,8 @@ UINT status; printf("ERROR #79\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ delay(16); status = tx_thread_suspend(&thread_16); @@ -1193,7 +1193,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(17); status = tx_thread_suspend(&thread_17); @@ -1206,8 +1206,8 @@ UINT status; printf("ERROR #81\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ delay(18); status = tx_thread_suspend(&thread_18); @@ -1221,7 +1221,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(19); status = tx_thread_suspend(&thread_19); @@ -1235,7 +1235,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(20); status = tx_thread_suspend(&thread_20); @@ -1249,7 +1249,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(21); status = tx_thread_suspend(&thread_21); @@ -1263,7 +1263,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(22); status = tx_thread_suspend(&thread_22); @@ -1277,7 +1277,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(23); status = tx_thread_suspend(&thread_23); @@ -1291,7 +1291,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(24); status = tx_thread_suspend(&thread_24); @@ -1305,7 +1305,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(25); status = tx_thread_suspend(&thread_25); @@ -1319,7 +1319,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(26); status = tx_thread_suspend(&thread_26); @@ -1333,7 +1333,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(27); status = tx_thread_suspend(&thread_27); @@ -1347,7 +1347,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(28); status = tx_thread_suspend(&thread_28); @@ -1361,7 +1361,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(29); status = tx_thread_suspend(&thread_29); @@ -1375,7 +1375,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(30); status = tx_thread_suspend(&thread_30); @@ -1389,7 +1389,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ delay(31); status = tx_thread_suspend(&thread_31); diff --git a/test/smp/regression/threadx_smp_resume_suspend_decending_order_test.c b/test/smp/regression/threadx_smp_resume_suspend_decending_order_test.c index 83b6f1411..a269796f6 100644 --- a/test/smp/regression/threadx_smp_resume_suspend_decending_order_test.c +++ b/test/smp/regression/threadx_smp_resume_suspend_decending_order_test.c @@ -1,4 +1,4 @@ -/* Define the ThreadX SMP resume and suspend threads in accending order test. */ +/* Define the ThreadX SMP resume and suspend threads in ascending order test. */ #include #include "tx_api.h" @@ -71,7 +71,7 @@ static void delay(UINT i) #ifdef CTEST void test_application_define(void *first_unused_memory) #else -void threadx_smp_resume_suspend_decending_order_test(void *first_unused_memory) +void threadx_smp_resume_suspend_descending_order_test(void *first_unused_memory) #endif { @@ -96,7 +96,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #1\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #1\n"); test_control_return(1); } @@ -110,7 +110,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #2\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #2\n"); test_control_return(1); } @@ -124,7 +124,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #3\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #3\n"); test_control_return(1); } @@ -138,7 +138,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #4\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #4\n"); test_control_return(1); } @@ -152,7 +152,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #5\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #5\n"); test_control_return(1); } @@ -166,7 +166,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #6\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #6\n"); test_control_return(1); } @@ -180,7 +180,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #7\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #7\n"); test_control_return(1); } @@ -194,7 +194,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #8\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #8\n"); test_control_return(1); } @@ -208,7 +208,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #9\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #9\n"); test_control_return(1); } @@ -222,7 +222,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #9\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #9\n"); test_control_return(1); } @@ -236,7 +236,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #11\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #11\n"); test_control_return(1); } @@ -250,7 +250,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #12\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #12\n"); test_control_return(1); } @@ -264,7 +264,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #13\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #13\n"); test_control_return(1); } @@ -278,7 +278,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #14\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #14\n"); test_control_return(1); } @@ -292,7 +292,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #15\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #15\n"); test_control_return(1); } @@ -306,7 +306,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #16\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #16\n"); test_control_return(1); } @@ -320,7 +320,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #17\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #17\n"); test_control_return(1); } @@ -334,7 +334,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #18\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #18\n"); test_control_return(1); } @@ -348,7 +348,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #19\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #19\n"); test_control_return(1); } @@ -362,7 +362,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #20\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #20\n"); test_control_return(1); } @@ -376,7 +376,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #21\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #21\n"); test_control_return(1); } @@ -390,7 +390,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #22\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #22\n"); test_control_return(1); } @@ -404,7 +404,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #23\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #23\n"); test_control_return(1); } @@ -418,7 +418,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #24\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #24\n"); test_control_return(1); } @@ -432,7 +432,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #25\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #25\n"); test_control_return(1); } @@ -446,7 +446,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #26\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #26\n"); test_control_return(1); } @@ -460,7 +460,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #27\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #27\n"); test_control_return(1); } @@ -474,7 +474,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #28\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #28\n"); test_control_return(1); } @@ -488,7 +488,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #29\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #29\n"); test_control_return(1); } @@ -502,7 +502,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #30\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #30\n"); test_control_return(1); } @@ -516,7 +516,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #31\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #31\n"); test_control_return(1); } @@ -530,7 +530,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #32\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #32\n"); test_control_return(1); } @@ -547,7 +547,7 @@ UINT i; if (status != TX_SUCCESS) { - printf("Running SMP Resume-Suspend Decending Priority Order Test............ ERROR #33\n"); + printf("Running SMP Resume-Suspend descending Priority Order Test............ ERROR #33\n"); test_control_return(1); } } @@ -564,7 +564,7 @@ UINT status; /* Inform user. */ - printf("Running SMP Resume-Suspend Decending Priority Order Test............ "); + printf("Running SMP Resume-Suspend descending Priority Order Test............ "); /* Resume all the threads. */ status = tx_thread_resume(&thread_31); @@ -999,7 +999,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in decending priority. */ + /* Suspend thread in descending priority. */ status = tx_thread_suspend(&thread_31); /* Check for the correct results. */ @@ -1011,8 +1011,8 @@ UINT status; printf("ERROR #65\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_30); /* Check for the correct results. */ @@ -1025,7 +1025,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_29); /* Check for the correct results. */ @@ -1038,7 +1038,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_28); /* Check for the correct results. */ @@ -1051,7 +1051,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_27); /* Check for the correct results. */ @@ -1064,7 +1064,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_26); /* Check for the correct results. */ @@ -1077,7 +1077,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_25); /* Check for the correct results. */ @@ -1090,7 +1090,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_24); /* Check for the correct results. */ @@ -1103,7 +1103,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_23); /* Check for the correct results. */ @@ -1116,7 +1116,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_22); /* Check for the correct results. */ @@ -1129,7 +1129,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_21); /* Check for the correct results. */ @@ -1142,7 +1142,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_20); /* Check for the correct results. */ @@ -1155,7 +1155,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_19); /* Check for the correct results. */ @@ -1167,8 +1167,8 @@ UINT status; printf("ERROR #77\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_18); /* Check for the correct results. */ @@ -1180,8 +1180,8 @@ UINT status; printf("ERROR #78\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_17); /* Check for the correct results. */ @@ -1193,8 +1193,8 @@ UINT status; printf("ERROR #79\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_16); /* Check for the correct results. */ @@ -1207,7 +1207,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_15); /* Check for the correct results. */ @@ -1219,8 +1219,8 @@ UINT status; printf("ERROR #81\n"); test_control_return(1); } - - /* Suspend thread in accending priority. */ + + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_14); /* Check for the correct results. */ @@ -1233,7 +1233,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_13); /* Check for the correct results. */ @@ -1246,7 +1246,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_12); /* Check for the correct results. */ @@ -1259,7 +1259,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_11); /* Check for the correct results. */ @@ -1272,7 +1272,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_10); /* Check for the correct results. */ @@ -1285,7 +1285,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_9); /* Check for the correct results. */ @@ -1298,7 +1298,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_8); /* Check for the correct results. */ @@ -1311,7 +1311,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_7); /* Check for the correct results. */ @@ -1324,7 +1324,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_6); /* Check for the correct results. */ @@ -1337,7 +1337,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_5); /* Check for the correct results. */ @@ -1350,7 +1350,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_4); /* Check for the correct results. */ @@ -1363,7 +1363,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_3); /* Check for the correct results. */ @@ -1376,7 +1376,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_2); /* Check for the correct results. */ @@ -1389,7 +1389,7 @@ UINT status; test_control_return(1); } - /* Suspend thread in accending priority. */ + /* Suspend thread in ascending priority. */ status = tx_thread_suspend(&thread_1); /* Check for the correct results. */ diff --git a/test/smp/regression/threadx_thread_basic_execution_test.c b/test/smp/regression/threadx_thread_basic_execution_test.c index 5772f97ee..f10ce2e9f 100644 --- a/test/smp/regression/threadx_thread_basic_execution_test.c +++ b/test/smp/regression/threadx_thread_basic_execution_test.c @@ -741,7 +741,7 @@ VOID (*temp_mutex_release)(TX_THREAD *thread_ptr); test_control_return(1); } - /* Attempt a thread termiante with a NULL pointer. */ + /* Attempt a thread terminate with a NULL pointer. */ status = tx_thread_terminate(TX_NULL); /* Check for status. */ @@ -764,7 +764,7 @@ VOID (*temp_mutex_release)(TX_THREAD *thread_ptr); test_control_return(1); } - /* Attempt a thread time-slice chagne with a NULL pointer. */ + /* Attempt a thread time-slice change with a NULL pointer. */ status = tx_thread_time_slice_change(TX_NULL, 1, &old_time_slice); /* Check for status. */ diff --git a/test/smp/regression/threadx_thread_delayed_suspension_test.c b/test/smp/regression/threadx_thread_delayed_suspension_test.c index 91128f837..e5d1e0912 100644 --- a/test/smp/regression/threadx_thread_delayed_suspension_test.c +++ b/test/smp/regression/threadx_thread_delayed_suspension_test.c @@ -56,7 +56,7 @@ static volatile ULONG destination = 0; static ULONG start_time; static ULONG lower_bound; static ULONG upper_bound; -static ULONG current_itterations; +static ULONG current_iterations; #ifdef DEBUG_1 static ULONG last_loop_count; #endif @@ -106,9 +106,9 @@ ULONG i; if (upper_bound > max_loop_count) lower_bound = max_loop_count; - if ((current_itterations < lower_bound) || (current_itterations > upper_bound)) - current_itterations = lower_bound; - + if ((current_iterations < lower_bound) || (current_iterations > upper_bound)) + current_iterations = lower_bound; + #ifdef DEBUG_1 /* Last loop count. */ last_loop_count = loop_count; @@ -350,7 +350,7 @@ ULONG i; lower_bound = lower_bound - 5; upper_bound = max_loop_count + 5; - current_itterations = lower_bound; + current_iterations = lower_bound; /* This thread simply suspends over and over... */ while(1) @@ -366,20 +366,20 @@ ULONG i; /* Call delay function. */ delay_function(); loop_count++; - } while (loop_count < current_itterations); + } while (loop_count < current_iterations); /* Suspend this thread. */ tx_semaphore_get(&semaphore_1, TX_WAIT_FOREVER); - /* Adjust the current itterations. */ - current_itterations++; - if (current_itterations > upper_bound) + /* Adjust the current iterations. */ + current_iterations++; + if (current_iterations > upper_bound) { if (lower_bound > min_loop_count) lower_bound--; if (upper_bound < max_loop_count) upper_bound++; - current_itterations = lower_bound; + current_iterations = lower_bound; } /* Increment the thread counter. */ diff --git a/test/smp/regression/threadx_thread_simple_suspend_test.c b/test/smp/regression/threadx_thread_simple_suspend_test.c index a05797eca..2e21d0568 100644 --- a/test/smp/regression/threadx_thread_simple_suspend_test.c +++ b/test/smp/regression/threadx_thread_simple_suspend_test.c @@ -25,7 +25,7 @@ void test_control_return(UINT status); #ifdef CTEST void test_application_define(void *first_unused_memory) #else -void threadx_thread_simple_supsend_application_define(void *first_unused_memory) +void threadx_thread_simple_suspend_application_define(void *first_unused_memory) #endif { diff --git a/test/smp/regression/threadx_thread_sleep_for_100ticks_test.c b/test/smp/regression/threadx_thread_sleep_for_100ticks_test.c index d5c335f01..344672461 100644 --- a/test/smp/regression/threadx_thread_sleep_for_100ticks_test.c +++ b/test/smp/regression/threadx_thread_sleep_for_100ticks_test.c @@ -42,7 +42,7 @@ static ULONG array_delay[ARRAY_SIZE]; static ULONG start_time; static ULONG lower_bound; static ULONG upper_bound; -static ULONG current_itterations; +static ULONG current_iterations; #ifdef DEBUG_1 static ULONG last_loop_count; #endif @@ -108,9 +108,9 @@ ULONG i; if (upper_bound > max_loop_count) lower_bound = max_loop_count; - if ((current_itterations < lower_bound) || (current_itterations > upper_bound)) - current_itterations = lower_bound; - + if ((current_iterations < lower_bound) || (current_iterations > upper_bound)) + current_iterations = lower_bound; + #ifdef DEBUG_1 /* Last loop count. */ last_loop_count = loop_count; @@ -218,7 +218,7 @@ CHAR *pointer; min_loop_count = 0xFFFFFFFF; max_loop_count = 0; loop_count = 0xFFFFFFFF; - current_itterations = 0; + current_iterations = 0; #ifdef DEBUG_1 last_loop_count = 0x0; #endif @@ -305,7 +305,7 @@ volatile ULONG value = 0; upper_bound = max_loop_count; #endif - current_itterations = lower_bound; + current_iterations = lower_bound; #ifdef DEBUG i = 0; #endif @@ -323,7 +323,7 @@ volatile ULONG value = 0; /* Call delay function. */ delay_function(); loop_count++; - } while (loop_count < current_itterations); + } while (loop_count < current_iterations); /* Check for a timer interrupt... if so, just skip the semaphore get. */ if (start_time != _tx_timer_system_clock) @@ -331,16 +331,16 @@ volatile ULONG value = 0; /* Suspend on the semaphore for 20 ticks... */ tx_semaphore_get(&test_semaphore, 20); - - /* Adjust the current itterations. */ - current_itterations++; - if (current_itterations > upper_bound) + + /* Adjust the current iterations. */ + current_iterations++; + if (current_iterations > upper_bound) { if (lower_bound > min_loop_count) lower_bound--; if (upper_bound < max_loop_count) upper_bound++; - current_itterations = lower_bound; + current_iterations = lower_bound; } /* Set the tick count simply to use value. */ @@ -355,7 +355,7 @@ volatile ULONG value = 0; printf("loop count: NA\n"); else printf("loop count: %lu\n", loop_count); - printf("current: %lu\n", current_itterations); + printf("current: %lu\n", current_iterations); printf("last loop count: %lu\n", last_loop_count); printf("minimum: %lu\n", min_loop_count); printf("maximum: %lu\n", max_loop_count); @@ -373,7 +373,7 @@ volatile ULONG value = 0; printf("loop count: NA\n"); else printf("loop count: %lu\n", loop_count); - printf("current: %lu\n", current_itterations); + printf("current: %lu\n", current_iterations); printf("last loop count: %lu\n", last_loop_count); printf("minimum: %lu\n", min_loop_count); printf("maximum: %lu\n", max_loop_count); diff --git a/test/smp/regression/threadx_thread_terminate_delete_test.c b/test/smp/regression/threadx_thread_terminate_delete_test.c index 63fd6a69b..15e25e7d3 100644 --- a/test/smp/regression/threadx_thread_terminate_delete_test.c +++ b/test/smp/regression/threadx_thread_terminate_delete_test.c @@ -244,7 +244,7 @@ UINT status; test_control_return(1); } - /* Delete thread 1 (thread 1 alread terminated) and 2. */ + /* Delete thread 1 (thread 1 alreadyterminated) and 2. */ status = tx_thread_delete(&thread_2); /* Check for status. */ diff --git a/test/tx/regression/testcontrol.c b/test/tx/regression/testcontrol.c index 3d33bc7f9..4944784a6 100644 --- a/test/tx/regression/testcontrol.c +++ b/test/tx/regression/testcontrol.c @@ -195,7 +195,7 @@ void threadx_semaphore_information_application_define(void *); void threadx_thread_basic_execution_application_define(void *); void threadx_thread_completed_application_define(void *); void threadx_thread_relinquish_application_define(void *); -void threadx_thread_simple_supsend_application_define(void *); +void threadx_thread_simple_suspend_application_define(void *); void threadx_thread_multiple_suspension_application_define(void *); void threadx_thread_multiple_non_current_suspension_application_define(void *); void threadx_thread_multi_level_preemption_threshold_application_define(void *); @@ -312,7 +312,7 @@ TEST_ENTRY test_control_tests[] = threadx_thread_basic_execution_application_define, threadx_thread_completed_application_define, threadx_thread_relinquish_application_define, - threadx_thread_simple_supsend_application_define, + threadx_thread_simple_suspend_application_define, threadx_thread_multiple_suspension_application_define, threadx_thread_multiple_non_current_suspension_application_define, threadx_thread_multi_level_preemption_threshold_application_define, @@ -1232,8 +1232,8 @@ UINT old_posture = TX_INT_ENABLE; /* Are interrupts disabled? */ if (old_posture == TX_INT_DISABLE) { - - /* System error - interrupts should alwasy be enabled in our test threads! */ + + /* System error - interrupts should always be enabled in our test threads! */ printf(" ***** SYSTEM ERROR ***** test returned with interrupts disabled!\n"); test_control_system_errors++; } diff --git a/test/tx/regression/threadx_mutex_information_test.c b/test/tx/regression/threadx_mutex_information_test.c index 55503002e..74f4714bf 100644 --- a/test/tx/regression/threadx_mutex_information_test.c +++ b/test/tx/regression/threadx_mutex_information_test.c @@ -312,7 +312,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(&mutex_2, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -325,8 +325,8 @@ ULONG inheritances; printf("ERROR #19\n"); test_control_return(1); } - - /* Now get the system performance inforamtion. */ + + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(&puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -342,7 +342,7 @@ ULONG inheritances; #else - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(&mutex_2, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -354,7 +354,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -366,7 +366,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -378,7 +378,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -390,7 +390,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -402,7 +402,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inversions, &inheritances); /* Check status. */ @@ -414,7 +414,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inheritances); /* Check status. */ @@ -426,7 +426,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the performance inforamtion. */ + /* Now get the performance information. */ status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL); /* Check status. */ @@ -438,7 +438,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(&puts, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -450,7 +450,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, &gets, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -462,7 +462,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, &suspensions, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -474,7 +474,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, &timeouts, &inversions, &inheritances); /* Check status. */ @@ -486,7 +486,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inversions, &inheritances); /* Check status. */ @@ -498,7 +498,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inheritances); /* Check status. */ @@ -510,7 +510,7 @@ ULONG inheritances; test_control_return(1); } - /* Now get the system performance inforamtion. */ + /* Now get the system performance information. */ status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL); /* Check status. */ diff --git a/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c b/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c index 1439ca855..e9b60bf5e 100644 --- a/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c +++ b/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c @@ -404,7 +404,7 @@ UINT status; tx_mutex_put(&mutex_2); - /* Should reurn us back to priority 15. */ + /* Should return us back to priority 15. */ if (thread_0.tx_thread_priority != 15) { @@ -441,7 +441,7 @@ UINT status; tx_mutex_put(&mutex_2); - /* Should reurn us back to priority 8. */ + /* Should return us back to priority 8. */ if (thread_0.tx_thread_priority != 8) { diff --git a/test/tx/regression/threadx_thread_basic_execution_test.c b/test/tx/regression/threadx_thread_basic_execution_test.c index 9949eac8a..af2c8fa1c 100644 --- a/test/tx/regression/threadx_thread_basic_execution_test.c +++ b/test/tx/regression/threadx_thread_basic_execution_test.c @@ -813,7 +813,7 @@ VOID (*temp_mutex_release)(TX_THREAD *thread_ptr); test_control_return(1); } - /* Attempt a thread termiante with a NULL pointer. */ + /* Attempt a thread terminate with a NULL pointer. */ status = tx_thread_terminate(TX_NULL); /* Check for status. */ @@ -836,7 +836,7 @@ VOID (*temp_mutex_release)(TX_THREAD *thread_ptr); test_control_return(1); } - /* Attempt a thread time-slice chagne with a NULL pointer. */ + /* Attempt a thread time-slice change with a NULL pointer. */ status = tx_thread_time_slice_change(TX_NULL, 1, &old_time_slice); /* Check for status. */ diff --git a/test/tx/regression/threadx_thread_delayed_suspension_test.c b/test/tx/regression/threadx_thread_delayed_suspension_test.c index 91128f837..e5d1e0912 100644 --- a/test/tx/regression/threadx_thread_delayed_suspension_test.c +++ b/test/tx/regression/threadx_thread_delayed_suspension_test.c @@ -56,7 +56,7 @@ static volatile ULONG destination = 0; static ULONG start_time; static ULONG lower_bound; static ULONG upper_bound; -static ULONG current_itterations; +static ULONG current_iterations; #ifdef DEBUG_1 static ULONG last_loop_count; #endif @@ -106,9 +106,9 @@ ULONG i; if (upper_bound > max_loop_count) lower_bound = max_loop_count; - if ((current_itterations < lower_bound) || (current_itterations > upper_bound)) - current_itterations = lower_bound; - + if ((current_iterations < lower_bound) || (current_iterations > upper_bound)) + current_iterations = lower_bound; + #ifdef DEBUG_1 /* Last loop count. */ last_loop_count = loop_count; @@ -350,7 +350,7 @@ ULONG i; lower_bound = lower_bound - 5; upper_bound = max_loop_count + 5; - current_itterations = lower_bound; + current_iterations = lower_bound; /* This thread simply suspends over and over... */ while(1) @@ -366,20 +366,20 @@ ULONG i; /* Call delay function. */ delay_function(); loop_count++; - } while (loop_count < current_itterations); + } while (loop_count < current_iterations); /* Suspend this thread. */ tx_semaphore_get(&semaphore_1, TX_WAIT_FOREVER); - /* Adjust the current itterations. */ - current_itterations++; - if (current_itterations > upper_bound) + /* Adjust the current iterations. */ + current_iterations++; + if (current_iterations > upper_bound) { if (lower_bound > min_loop_count) lower_bound--; if (upper_bound < max_loop_count) upper_bound++; - current_itterations = lower_bound; + current_iterations = lower_bound; } /* Increment the thread counter. */ diff --git a/test/tx/regression/threadx_thread_simple_suspend_test.c b/test/tx/regression/threadx_thread_simple_suspend_test.c index a05797eca..2e21d0568 100644 --- a/test/tx/regression/threadx_thread_simple_suspend_test.c +++ b/test/tx/regression/threadx_thread_simple_suspend_test.c @@ -25,7 +25,7 @@ void test_control_return(UINT status); #ifdef CTEST void test_application_define(void *first_unused_memory) #else -void threadx_thread_simple_supsend_application_define(void *first_unused_memory) +void threadx_thread_simple_suspend_application_define(void *first_unused_memory) #endif { diff --git a/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c b/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c index d5c335f01..344672461 100644 --- a/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c +++ b/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c @@ -42,7 +42,7 @@ static ULONG array_delay[ARRAY_SIZE]; static ULONG start_time; static ULONG lower_bound; static ULONG upper_bound; -static ULONG current_itterations; +static ULONG current_iterations; #ifdef DEBUG_1 static ULONG last_loop_count; #endif @@ -108,9 +108,9 @@ ULONG i; if (upper_bound > max_loop_count) lower_bound = max_loop_count; - if ((current_itterations < lower_bound) || (current_itterations > upper_bound)) - current_itterations = lower_bound; - + if ((current_iterations < lower_bound) || (current_iterations > upper_bound)) + current_iterations = lower_bound; + #ifdef DEBUG_1 /* Last loop count. */ last_loop_count = loop_count; @@ -218,7 +218,7 @@ CHAR *pointer; min_loop_count = 0xFFFFFFFF; max_loop_count = 0; loop_count = 0xFFFFFFFF; - current_itterations = 0; + current_iterations = 0; #ifdef DEBUG_1 last_loop_count = 0x0; #endif @@ -305,7 +305,7 @@ volatile ULONG value = 0; upper_bound = max_loop_count; #endif - current_itterations = lower_bound; + current_iterations = lower_bound; #ifdef DEBUG i = 0; #endif @@ -323,7 +323,7 @@ volatile ULONG value = 0; /* Call delay function. */ delay_function(); loop_count++; - } while (loop_count < current_itterations); + } while (loop_count < current_iterations); /* Check for a timer interrupt... if so, just skip the semaphore get. */ if (start_time != _tx_timer_system_clock) @@ -331,16 +331,16 @@ volatile ULONG value = 0; /* Suspend on the semaphore for 20 ticks... */ tx_semaphore_get(&test_semaphore, 20); - - /* Adjust the current itterations. */ - current_itterations++; - if (current_itterations > upper_bound) + + /* Adjust the current iterations. */ + current_iterations++; + if (current_iterations > upper_bound) { if (lower_bound > min_loop_count) lower_bound--; if (upper_bound < max_loop_count) upper_bound++; - current_itterations = lower_bound; + current_iterations = lower_bound; } /* Set the tick count simply to use value. */ @@ -355,7 +355,7 @@ volatile ULONG value = 0; printf("loop count: NA\n"); else printf("loop count: %lu\n", loop_count); - printf("current: %lu\n", current_itterations); + printf("current: %lu\n", current_iterations); printf("last loop count: %lu\n", last_loop_count); printf("minimum: %lu\n", min_loop_count); printf("maximum: %lu\n", max_loop_count); @@ -373,7 +373,7 @@ volatile ULONG value = 0; printf("loop count: NA\n"); else printf("loop count: %lu\n", loop_count); - printf("current: %lu\n", current_itterations); + printf("current: %lu\n", current_iterations); printf("last loop count: %lu\n", last_loop_count); printf("minimum: %lu\n", min_loop_count); printf("maximum: %lu\n", max_loop_count); diff --git a/test/tx/regression/threadx_thread_terminate_delete_test.c b/test/tx/regression/threadx_thread_terminate_delete_test.c index 63fd6a69b..15e25e7d3 100644 --- a/test/tx/regression/threadx_thread_terminate_delete_test.c +++ b/test/tx/regression/threadx_thread_terminate_delete_test.c @@ -244,7 +244,7 @@ UINT status; test_control_return(1); } - /* Delete thread 1 (thread 1 alread terminated) and 2. */ + /* Delete thread 1 (thread 1 alreadyterminated) and 2. */ status = tx_thread_delete(&thread_2); /* Check for status. */