| 28 | } |
| 29 | |
| 30 | static int |
| 31 | test_thread_create_join(void) |
| 32 | { |
| 33 | rte_thread_t thread_id; |
| 34 | rte_thread_t thread_main_id; |
| 35 | |
| 36 | thread_id_ready = 0; |
| 37 | RTE_TEST_ASSERT(rte_thread_create(&thread_id, NULL, thread_main, &thread_main_id) == 0, |
| 38 | "Failed to create thread."); |
| 39 | |
| 40 | while (__atomic_load_n(&thread_id_ready, __ATOMIC_ACQUIRE) == 0) |
| 41 | ; |
| 42 | |
| 43 | RTE_TEST_ASSERT(rte_thread_equal(thread_id, thread_main_id) != 0, |
| 44 | "Unexpected thread id."); |
| 45 | |
| 46 | __atomic_store_n(&thread_id_ready, 2, __ATOMIC_RELEASE); |
| 47 | |
| 48 | RTE_TEST_ASSERT(rte_thread_join(thread_id, NULL) == 0, |
| 49 | "Failed to join thread."); |
| 50 | |
| 51 | return 0; |
| 52 | } |
| 53 | |
| 54 | static int |
| 55 | test_thread_create_detach(void) |
nothing calls this directly
no test coverage detected