diff options
Diffstat (limited to 'test/smp/regression/threadx_mutex_proritize_test.c')
| -rw-r--r-- | test/smp/regression/threadx_mutex_proritize_test.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/test/smp/regression/threadx_mutex_proritize_test.c b/test/smp/regression/threadx_mutex_proritize_test.c index 4e25673f..bbc2845b 100644 --- a/test/smp/regression/threadx_mutex_proritize_test.c +++ b/test/smp/regression/threadx_mutex_proritize_test.c @@ -76,12 +76,12 @@ static void test_isr(void) } else { - + /* Abort the wait of thread 5. */ tx_thread_wait_abort(&thread_5); /* End the ISR processing. */ - test_status = 2; + test_status = 2; test_isr_dispatch = TX_NULL; } } @@ -107,8 +107,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; @@ -120,8 +120,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, 100, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -133,8 +133,8 @@ CHAR *pointer; test_control_return(1); } - 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, 14, 14, 100, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -146,8 +146,8 @@ CHAR *pointer; test_control_return(1); } - status = tx_thread_create(&thread_3, "thread 3", thread_3_entry, 3, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_3, "thread 3", thread_3_entry, 3, + pointer, TEST_STACK_SIZE_PRINTF, 3, 3, 100, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -159,8 +159,8 @@ CHAR *pointer; test_control_return(1); } - status = tx_thread_create(&thread_4, "thread 4", thread_4_entry, 4, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_4, "thread 4", thread_4_entry, 4, + pointer, TEST_STACK_SIZE_PRINTF, 4, 4, 100, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -172,8 +172,8 @@ CHAR *pointer; test_control_return(1); } - status = tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5, + pointer, TEST_STACK_SIZE_PRINTF, 5, 5, 100, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -185,8 +185,8 @@ CHAR *pointer; test_control_return(1); } - status = tx_thread_create(&thread_6, "thread 6", thread_6_entry, 6, - pointer, TEST_STACK_SIZE_PRINTF, + status = tx_thread_create(&thread_6, "thread 6", thread_6_entry, 6, + pointer, TEST_STACK_SIZE_PRINTF, 6, 6, 100, TX_DONT_START); pointer = pointer + TEST_STACK_SIZE_PRINTF; @@ -323,7 +323,7 @@ UINT status; tx_thread_resume(&thread_4); tx_thread_resume(&thread_5); tx_thread_resume(&thread_6); - + /* Prioritize the block pool suspension list. */ status = tx_mutex_prioritize(&mutex_0); @@ -338,7 +338,7 @@ UINT status; /* Now loop to test the interrupt of the prioritize loop logic. */ test_status = 1; - test_isr_dispatch = test_isr; + test_isr_dispatch = test_isr; do { @@ -355,10 +355,10 @@ UINT status; } } while (test_status == 1); - + /* Now determine if thread 4 is at the front of the list... It should be! */ if (mutex_0.tx_mutex_suspension_list != &thread_4) - { + { /* Mutex error. */ printf("ERROR #17\n"); @@ -382,19 +382,19 @@ UINT status; while (1) { - + /* Suspend on the mutex. */ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER); /* Release the mutex. */ status += tx_mutex_put(&mutex_0); - + /* Did we get the right status? */ if (status == TX_SUCCESS) thread_1_counter++; /* Self suspend. */ - tx_thread_suspend(&thread_1); + tx_thread_suspend(&thread_1); } } @@ -407,19 +407,19 @@ UINT status; while (1) { - + /* Suspend on the mutex. */ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER); /* Release the mutex. */ status += tx_mutex_put(&mutex_0); - + /* Did we get the right status? */ if (status == TX_SUCCESS) thread_2_counter++; /* Self suspend. */ - tx_thread_suspend(&thread_2); + tx_thread_suspend(&thread_2); } } @@ -432,19 +432,19 @@ UINT status; while (1) { - + /* Suspend on the mutex. */ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER); /* Release the mutex. */ status += tx_mutex_put(&mutex_0); - + /* Did we get the right status? */ if (status == TX_SUCCESS) thread_3_counter++; /* Self suspend. */ - tx_thread_suspend(&thread_3); + tx_thread_suspend(&thread_3); } } @@ -457,19 +457,19 @@ UINT status; while (1) { - + /* Suspend on the mutex. */ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER); /* Release the mutex. */ status += tx_mutex_put(&mutex_0); - + /* Did we get the right status? */ if (status == TX_SUCCESS) thread_4_counter++; /* Self suspend. */ - tx_thread_suspend(&thread_4); + tx_thread_suspend(&thread_4); } } @@ -482,19 +482,19 @@ UINT status; while (1) { - + /* Suspend on the mutex. */ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER); /* Release the mutex. */ status += tx_mutex_put(&mutex_0); - + /* Did we get the right status? */ if (status == TX_SUCCESS) thread_5_counter++; /* Self suspend. */ - tx_thread_suspend(&thread_5); + tx_thread_suspend(&thread_5); } } @@ -507,19 +507,19 @@ UINT status; while (1) { - + /* Suspend on the mutex. */ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER); /* Release the mutex. */ status += tx_mutex_put(&mutex_0); - + /* Did we get the right status? */ if (status == TX_SUCCESS) thread_6_counter++; /* Self suspend. */ - tx_thread_suspend(&thread_6); + tx_thread_suspend(&thread_6); } } |
