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_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/smp/regression/threadx_trace_basic_test.c')
| -rw-r--r-- | test/smp/regression/threadx_trace_basic_test.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/test/smp/regression/threadx_trace_basic_test.c b/test/smp/regression/threadx_trace_basic_test.c index c6bc9be4..2f3227f8 100644 --- a/test/smp/regression/threadx_trace_basic_test.c +++ b/test/smp/regression/threadx_trace_basic_test.c @@ -102,9 +102,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. */ @@ -116,7 +116,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'; @@ -158,8 +158,8 @@ static void test_isr(void) /* Make ISR entry event. */ tx_trace_isr_enter_insert(1); - } - + } + /* Resume thread 2. */ tx_thread_resume(&thread_2); @@ -171,7 +171,7 @@ static void test_isr(void) /* Make ISR entry event. */ tx_trace_isr_exit_insert(0); - + } @@ -201,7 +201,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; @@ -229,7 +229,7 @@ CHAR *pointer; /* Check status. */ if (status != TX_SUCCESS) { - + printf("Running Trace Basic Test............................................ ERROR #1\n"); test_control_return(1); } @@ -238,7 +238,7 @@ CHAR *pointer; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("Running Trace Basic Test............................................ ERROR #2\n"); test_control_return(1); } @@ -246,9 +246,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; @@ -260,8 +260,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; @@ -273,8 +273,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; @@ -389,7 +389,7 @@ ULONG object; /* Check status. */ if (status != TX_NOT_DONE) { - + printf("ERROR #6\n"); test_control_return(1); } @@ -398,7 +398,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("ERROR #7\n"); test_control_return(1); } @@ -409,7 +409,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("ERROR #8\n"); test_control_return(1); } @@ -420,7 +420,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("ERROR #9\n"); test_control_return(1); } @@ -431,7 +431,7 @@ ULONG object; /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + printf("ERROR #10\n"); test_control_return(1); } @@ -461,7 +461,7 @@ ULONG object; printf("ERROR #12\n"); test_control_return(1); } - + /* Filter all events. */ status = tx_trace_event_filter(0); @@ -473,7 +473,7 @@ ULONG object; printf("ERROR #13\n"); test_control_return(1); } - + #endif /* Unfilter all events. */ @@ -513,7 +513,7 @@ ULONG object; } #endif - + /* Register the trace buffer full notification routine. */ status = tx_trace_buffer_full_notify(trace_buffer_full); @@ -537,7 +537,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); @@ -549,7 +549,7 @@ ULONG object; printf("ERROR #19\n"); test_control_return(1); } - + #endif /* Create a timer for the test. */ @@ -582,7 +582,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || (_tx_win32_critical_section.tx_win32_critical_section_nested_count != 0)) test_isr_dispatch = test_isr; } - + /* Insert user event. */ status = tx_trace_user_event_insert(1027, 1, 2, 3, 4); @@ -674,7 +674,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || break; #endif - } + } /* Clear the ISR. */ test_isr_dispatch = TX_NULL; @@ -706,7 +706,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || /* Attempt to disable again, just to get the TX_NOT_DONE error code. */ status = tx_trace_disable(); - + #ifdef TX_ENABLE_EVENT_TRACE /* Check status. */ @@ -728,7 +728,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || test_control_return(1); } #endif - + /* Attempt to enable event tracing with a bogus size. */ status = tx_trace_enable(trace_buffer, 1, 8); @@ -737,7 +737,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || /* Check status. */ if (status != TX_SIZE_ERROR) { - + /* Trace error. */ printf("ERROR #31\n"); test_control_return(1); @@ -747,7 +747,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + /* Trace error. */ printf("ERROR #32\n"); test_control_return(1); @@ -763,7 +763,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || /* Check status. */ if (status != TX_NOT_DONE) { - + /* Trace error. */ printf("ERROR #33\n"); test_control_return(1); @@ -773,7 +773,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || /* Check status. */ if (status != TX_FEATURE_NOT_ENABLED) { - + /* Trace error. */ printf("ERROR #34\n"); test_control_return(1); @@ -791,7 +791,7 @@ if ((_tx_thread_smp_protection.tx_thread_smp_protect_in_force != 0) || } else { - + /* Successful test. */ printf("SUCCESS!\n"); test_control_return(0); @@ -804,9 +804,9 @@ static void thread_1_entry(ULONG task_input) while(1) { - + thread_1_counter++; - tx_thread_suspend(&thread_1); + tx_thread_suspend(&thread_1); } } @@ -817,8 +817,8 @@ static void thread_2_entry(ULONG task_input) while(1) { - + thread_2_counter++; - tx_thread_suspend(&thread_2); + tx_thread_suspend(&thread_2); } } |
