diff options
| author | Frédéric Desbiens <[email protected]> | 2026-03-06 19:27:49 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-06 19:27:49 +0100 |
| commit | 3726d7906b4808bfec7855fc088e073199df9120 (patch) | |
| tree | 8789bfd03d1d49e1967e80d04aa4ff606fda43eb /test/tx/regression/threadx_thread_preemptable_suspension_test.c | |
| parent | 4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff) | |
| parent | c3259a216026372e3833dd8996a68f77e8595fbd (diff) | |
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'test/tx/regression/threadx_thread_preemptable_suspension_test.c')
| -rw-r--r-- | test/tx/regression/threadx_thread_preemptable_suspension_test.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/tx/regression/threadx_thread_preemptable_suspension_test.c b/test/tx/regression/threadx_thread_preemptable_suspension_test.c index b1c1bc52..8e4dbdd6 100644 --- a/test/tx/regression/threadx_thread_preemptable_suspension_test.c +++ b/test/tx/regression/threadx_thread_preemptable_suspension_test.c @@ -1,6 +1,6 @@ -/* This test is designed to see if multiple threads can be created and suspended. - The order the suspension and resumption occurs makes sure everything is working right. - All the counters should increment at the same rate. This test differs from test 4 in +/* This test is designed to see if multiple threads can be created and suspended. + The order the suspension and resumption occurs makes sure everything is working right. + All the counters should increment at the same rate. This test differs from test 4 in that thread 5 is preemptable. */ #include <stdio.h> @@ -58,8 +58,8 @@ CHAR *pointer; create information. */ /* Create thread 0. */ - status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 1, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 1, + pointer, TEST_STACK_SIZE_PRINTF, 13, 13, TX_NO_TIME_SLICE, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -72,8 +72,8 @@ CHAR *pointer; } /* Create thread 1. */ - status = tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1, + pointer, TEST_STACK_SIZE_PRINTF, 16, 16, TX_NO_TIME_SLICE, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -86,8 +86,8 @@ CHAR *pointer; } /* Create thread 2. */ - status = tx_thread_create(&thread_2, "thread 2", thread_2_entry, 1, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_2, "thread 2", thread_2_entry, 1, + pointer, TEST_STACK_SIZE_PRINTF, 16, 16, TX_NO_TIME_SLICE, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -100,8 +100,8 @@ CHAR *pointer; } /* Create thread 3. */ - status = tx_thread_create(&thread_3, "thread 3", thread_3_entry, 1, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_3, "thread 3", thread_3_entry, 1, + pointer, TEST_STACK_SIZE_PRINTF, 16, 16, TX_NO_TIME_SLICE, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -114,8 +114,8 @@ CHAR *pointer; } /* Create thread 4. */ - status = tx_thread_create(&thread_4, "thread 4", thread_4_entry, 1, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_4, "thread 4", thread_4_entry, 1, + pointer, TEST_STACK_SIZE_PRINTF, 15, 15, TX_NO_TIME_SLICE, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -128,8 +128,8 @@ CHAR *pointer; } /* Create thread 5. Make this thread fully preemptable... */ - status = tx_thread_create(&thread_5, "thread 5", thread_5_entry, 1, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_5, "thread 5", thread_5_entry, 1, + pointer, TEST_STACK_SIZE_PRINTF, 17, 17, TX_NO_TIME_SLICE, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -159,7 +159,7 @@ static void thread_0_entry(ULONG thread_input) /* Suspend this thread... */ tx_thread_suspend(&thread_0); - + /* Resume thread 5... */ tx_thread_resume(&thread_5); } @@ -251,7 +251,7 @@ UINT status; } /* Make sure that each thread has run once. */ - if ((thread_0_counter != 1) || (thread_1_counter != 1) || + if ((thread_0_counter != 1) || (thread_1_counter != 1) || (thread_2_counter != 1) || (thread_3_counter != 1) || (thread_4_counter != 1)) { @@ -276,7 +276,7 @@ UINT status; } /* Make sure that each thread has run the proper amount. */ - if ((thread_0_counter != 2) || (thread_1_counter != 1) || + if ((thread_0_counter != 2) || (thread_1_counter != 1) || (thread_2_counter != 1) || (thread_3_counter != 1) || (thread_4_counter != 1)) { @@ -300,7 +300,7 @@ UINT status; } /* Make sure that each thread has run the proper amount. */ - if ((thread_0_counter != 2) || (thread_1_counter != 2) || + if ((thread_0_counter != 2) || (thread_1_counter != 2) || (thread_2_counter != 1) || (thread_3_counter != 1) || (thread_4_counter != 1)) { @@ -324,7 +324,7 @@ UINT status; } /* Make sure that each thread has the proper amount. */ - if ((thread_0_counter != 2) || (thread_1_counter != 2) || + if ((thread_0_counter != 2) || (thread_1_counter != 2) || (thread_2_counter != 2) || (thread_3_counter != 1) || (thread_4_counter != 1)) { @@ -348,7 +348,7 @@ UINT status; } /* Make sure that each thread has run the proper amount. */ - if ((thread_0_counter != 2) || (thread_1_counter != 2) || + if ((thread_0_counter != 2) || (thread_1_counter != 2) || (thread_2_counter != 2) || (thread_3_counter != 2) || (thread_4_counter != 1)) { @@ -372,7 +372,7 @@ UINT status; } /* Make sure that each thread has run once. */ - if ((thread_0_counter != 2) || (thread_1_counter != 2) || + if ((thread_0_counter != 2) || (thread_1_counter != 2) || (thread_2_counter != 2) || (thread_3_counter != 2) || (thread_4_counter != 2)) { @@ -397,7 +397,7 @@ UINT status; } /* Make sure that each thread has run twice. */ - if ((thread_0_counter != 2) || (thread_1_counter != 2) || + if ((thread_0_counter != 2) || (thread_1_counter != 2) || (thread_2_counter != 2) || (thread_3_counter != 2) || (thread_4_counter != 2)) { |
