| 52 | } |
| 53 | |
| 54 | static int |
| 55 | test_thread_create_detach(void) |
| 56 | { |
| 57 | rte_thread_t thread_id; |
| 58 | rte_thread_t thread_main_id; |
| 59 | |
| 60 | thread_id_ready = 0; |
| 61 | RTE_TEST_ASSERT(rte_thread_create(&thread_id, NULL, thread_main, |
| 62 | &thread_main_id) == 0, "Failed to create thread."); |
| 63 | |
| 64 | while (__atomic_load_n(&thread_id_ready, __ATOMIC_ACQUIRE) == 0) |
| 65 | ; |
| 66 | |
| 67 | RTE_TEST_ASSERT(rte_thread_equal(thread_id, thread_main_id) != 0, |
| 68 | "Unexpected thread id."); |
| 69 | |
| 70 | __atomic_store_n(&thread_id_ready, 2, __ATOMIC_RELEASE); |
| 71 | |
| 72 | RTE_TEST_ASSERT(rte_thread_detach(thread_id) == 0, |
| 73 | "Failed to detach thread."); |
| 74 | |
| 75 | return 0; |
| 76 | } |
| 77 | |
| 78 | static int |
| 79 | test_thread_priority(void) |
nothing calls this directly
no test coverage detected