Merge pull request #361 from howjmay/typo

Fixed typos in several regression test files
This commit is contained in:
Frédéric Desbiens
2026-04-15 11:38:51 -04:00
committed by GitHub
19 changed files with 220 additions and 220 deletions
+2 -2
View File
@@ -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
+8 -8
View File
@@ -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++;
}
@@ -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. */
@@ -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)
{
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -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. */
@@ -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. */
@@ -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
{
@@ -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);
@@ -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. */
+4 -4
View File
@@ -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++;
}
@@ -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. */
@@ -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)
{
@@ -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. */
@@ -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. */
@@ -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
{
@@ -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);
@@ -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. */