| 233 | } |
| 234 | |
| 235 | static int |
| 236 | test_thread_control_create_join(void) |
| 237 | { |
| 238 | rte_thread_t thread_id; |
| 239 | rte_thread_t thread_main_id; |
| 240 | |
| 241 | thread_id_ready = 0; |
| 242 | RTE_TEST_ASSERT(rte_thread_create_control(&thread_id, "dpdk-test-thcc", |
| 243 | thread_main, &thread_main_id) == 0, |
| 244 | "Failed to create thread."); |
| 245 | |
| 246 | while (__atomic_load_n(&thread_id_ready, __ATOMIC_ACQUIRE) == 0) |
| 247 | ; |
| 248 | |
| 249 | RTE_TEST_ASSERT(rte_thread_equal(thread_id, thread_main_id) != 0, |
| 250 | "Unexpected thread id."); |
| 251 | |
| 252 | __atomic_store_n(&thread_id_ready, 2, __ATOMIC_RELEASE); |
| 253 | |
| 254 | RTE_TEST_ASSERT(rte_thread_join(thread_id, NULL) == 0, |
| 255 | "Failed to join thread."); |
| 256 | |
| 257 | return 0; |
| 258 | } |
| 259 | |
| 260 | static struct unit_test_suite threads_test_suite = { |
| 261 | .suite_name = "threads autotest", |
nothing calls this directly
no test coverage detected