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_trace_basic_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_trace_basic_test.c')
| -rw-r--r-- | test/tx/regression/threadx_trace_basic_test.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/test/tx/regression/threadx_trace_basic_test.c b/test/tx/regression/threadx_trace_basic_test.c index bd6ca72f..0914650f 100644 --- a/test/tx/regression/threadx_trace_basic_test.c +++ b/test/tx/regression/threadx_trace_basic_test.c @@ -95,9 +95,9 @@ UINT old_interrupt; /* If win32, we can actually dump the file! */ trace_dump_file = fopen(trace_dump_file_name, "wb+"); - + fwrite(trace_buffer, 1, sizeof(trace_buffer), trace_dump_file); - + fclose(trace_dump_file); /* Restore interrupts. */ @@ -109,7 +109,7 @@ UINT old_interrupt; { trace_dump_file_name[11] = '0'; trace_dump_file_name[10]++; - + if (trace_dump_file_name[10] > '9') { trace_dump_file_name[10] = '0'; @@ -141,7 +141,7 @@ static void test_isr(void) /* Make ISR entry event. */ tx_trace_isr_enter_insert(1); - + /* Resume thread 2. */ tx_thread_resume(&thread_2); @@ -176,7 +176,7 @@ CHAR *pointer; /* Setup a pointer. */ pointer = (CHAR *) first_unused_memory; - + /* Adjust it forward just to make sure there is some space for the test below. */ pointer = pointer + 200; @@ -204,7 +204,7 @@ CHAR *pointer; /* Check status. */ if (status != TX_SUCCESS) { - + printf("Running Trace Basic Test............................................ ERROR #1\n"); test_control_return(1); } @@ -213,7 +213,7 @@ CHAR *pointer; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("Running Trace Basic Test............................................ ERROR #2\n"); test_control_return(1); } @@ -221,9 +221,9 @@ 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, 0, - pointer, TEST_STACK_SIZE_PRINTF, + + status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0, + pointer, TEST_STACK_SIZE_PRINTF, 16, 16, TX_NO_TIME_SLICE, TX_AUTO_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -235,8 +235,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, 15, 15, TX_NO_TIME_SLICE, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -248,8 +248,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, 14, 14, TX_NO_TIME_SLICE, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -361,7 +361,7 @@ ULONG object; /* Check status. */ if (status != TX_NOT_DONE) { - + printf("ERROR #6\n"); test_control_return(1); } @@ -370,7 +370,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("ERROR #7\n"); test_control_return(1); } @@ -381,7 +381,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("ERROR #8\n"); test_control_return(1); } @@ -392,7 +392,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("ERROR #9\n"); test_control_return(1); } @@ -403,7 +403,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("ERROR #10\n"); test_control_return(1); } @@ -433,7 +433,7 @@ ULONG object; printf("ERROR #12\n"); test_control_return(1); } - + /* Filter all events. */ status = tx_trace_event_filter(0); @@ -445,7 +445,7 @@ ULONG object; printf("ERROR #13\n"); test_control_return(1); } - + #endif /* Unfilter all events. */ @@ -485,7 +485,7 @@ ULONG object; } #endif - + /* Register the trace buffer full notification routine. */ status = tx_trace_buffer_full_notify(trace_buffer_full); @@ -509,7 +509,7 @@ ULONG object; printf("ERROR #18\n"); test_control_return(1); } - + /* Check the NULL path with trace disabled. */ status = tx_trace_buffer_full_notify(TX_NULL); @@ -521,7 +521,7 @@ ULONG object; printf("ERROR #19\n"); test_control_return(1); } - + #endif /* Create a timer for the test. */ @@ -542,7 +542,7 @@ ULONG object; /* Restore interrupts. */ tx_interrupt_control(old_interrupt); } - + /* Insert user event. */ status = tx_trace_user_event_insert(1027, 1, 2, 3, 4); @@ -629,7 +629,7 @@ ULONG object; break; #endif - } + } /* Clear the ISR. */ test_isr_dispatch = TX_NULL; @@ -661,7 +661,7 @@ ULONG object; /* Attempt to disable again, just to get the TX_NOT_DONE error code. */ status = tx_trace_disable(); - + #ifdef TX_ENABLE_EVENT_TRACE /* Check status. */ @@ -683,7 +683,7 @@ ULONG object; test_control_return(1); } #endif - + /* Attempt to enable event tracing with a bogus size. */ status = tx_trace_enable(trace_buffer, 1, 8); @@ -692,7 +692,7 @@ ULONG object; /* Check status. */ if (status != TX_SIZE_ERROR) { - + /* Trace error. */ printf("ERROR #31\n"); test_control_return(1); @@ -702,7 +702,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + /* Trace error. */ printf("ERROR #32\n"); test_control_return(1); @@ -718,7 +718,7 @@ ULONG object; /* Check status. */ if (status != TX_NOT_DONE) { - + /* Trace error. */ printf("ERROR #33\n"); test_control_return(1); @@ -728,7 +728,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + /* Trace error. */ printf("ERROR #34\n"); test_control_return(1); @@ -746,7 +746,7 @@ ULONG object; } else { - + /* Successful test. */ printf("SUCCESS!\n"); test_control_return(0); @@ -759,9 +759,9 @@ static void thread_1_entry(ULONG task_input) while(1) { - + thread_1_counter++; - tx_thread_suspend(&thread_1); + tx_thread_suspend(&thread_1); } } @@ -772,8 +772,8 @@ static void thread_2_entry(ULONG task_input) while(1) { - + thread_2_counter++; - tx_thread_suspend(&thread_2); + tx_thread_suspend(&thread_2); } } |
