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/smp/regression/threadx_semaphore_ceiling_put_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/smp/regression/threadx_semaphore_ceiling_put_test.c')
| -rw-r--r-- | test/smp/regression/threadx_semaphore_ceiling_put_test.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/smp/regression/threadx_semaphore_ceiling_put_test.c b/test/smp/regression/threadx_semaphore_ceiling_put_test.c index 5364d2d9..7d4f5832 100644 --- a/test/smp/regression/threadx_semaphore_ceiling_put_test.c +++ b/test/smp/regression/threadx_semaphore_ceiling_put_test.c @@ -55,8 +55,8 @@ CHAR *pointer; /* Put system definition stuff in here, e.g. thread creates and other assorted create information. */ - 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, 16, 16, 100, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -68,8 +68,8 @@ CHAR *pointer; test_control_return(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, 100, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -81,8 +81,8 @@ CHAR *pointer; test_control_return(1); } - status = tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2, + pointer, TEST_STACK_SIZE_PRINTF, 16, 16, 100, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -108,7 +108,7 @@ CHAR *pointer; /* Setup the semaphore notify callback. */ status = tx_semaphore_put_notify(&semaphore_0, put_notify); - + #ifndef TX_DISABLE_NOTIFY_CALLBACKS /* Check for status. */ @@ -205,15 +205,15 @@ UINT status; /* At this point, we need to resume thread 2 and relinquish in order to get that thread suspended on the semaphore as well. */ tx_thread_resume(&thread_2); - tx_thread_relinquish(); - + tx_thread_relinquish(); + /* Perform 2 semaphore put operations to resume both threads. */ status = tx_semaphore_ceiling_put(&semaphore_0, 2); status += tx_semaphore_ceiling_put(&semaphore_0, 2); /* Let both threads run again. */ - tx_thread_relinquish(); - + tx_thread_relinquish(); + /* Check the status and the run counter of the other thread. */ if ((status != TX_SUCCESS) || (thread_1_counter != 5) || (thread_2_counter != 3)) { @@ -222,7 +222,7 @@ UINT status; printf("ERROR #11\n"); test_control_return(1); } - + /* Now turn off the semaphore notification. */ status = tx_semaphore_put_notify(&semaphore_0, TX_NULL); @@ -234,7 +234,7 @@ UINT status; /* Put a semaphore on a semaphore that does not have suspension. */ status += tx_semaphore_ceiling_put(&semaphore_1, 2); - + /* Repeat the semaphore ceiling put without notification process! */ /* Place an instance on the semaphore, this should resume the other thread @@ -265,15 +265,15 @@ UINT status; /* At this point, we need to resume thread 2 and relinquish in order to get that thread suspended on the semaphore as well. */ tx_thread_resume(&thread_2); - tx_thread_relinquish(); - + tx_thread_relinquish(); + /* Perform 2 semaphore put operations to resume both threads. */ status = tx_semaphore_ceiling_put(&semaphore_0, 2); status += tx_semaphore_ceiling_put(&semaphore_0, 2); /* Let both threads run again. */ - tx_thread_relinquish(); - + tx_thread_relinquish(); + /* Check the status and the run counter of the other thread. */ if ((status != TX_SUCCESS) || (thread_1_counter != 9) || (thread_2_counter != 5)) { @@ -281,7 +281,7 @@ UINT status; /* Semaphore error. */ printf("ERROR #11a\n"); test_control_return(1); - } + } else { @@ -299,7 +299,7 @@ UINT status; while(1) { - + /* Increment thread run counter. */ thread_1_counter++; @@ -320,7 +320,7 @@ UINT status; while(1) { - + /* Increment thread run counter. */ thread_2_counter++; |
