| 90 | |
| 91 | #ifndef RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP |
| 92 | static void * |
| 93 | thread_start_wrapper(void *arg) |
| 94 | { |
| 95 | struct thread_start_context *ctx = (struct thread_start_context *)arg; |
| 96 | rte_thread_func thread_func = ctx->thread_func; |
| 97 | void *thread_args = ctx->thread_args; |
| 98 | int ret = 0; |
| 99 | |
| 100 | if (ctx->thread_attr != NULL && CPU_COUNT(&ctx->thread_attr->cpuset) > 0) { |
| 101 | ret = rte_thread_set_affinity_by_id(rte_thread_self(), &ctx->thread_attr->cpuset); |
| 102 | if (ret != 0) |
| 103 | RTE_LOG(DEBUG, EAL, "rte_thread_set_affinity_by_id failed\n"); |
| 104 | } |
| 105 | |
| 106 | pthread_mutex_lock(&ctx->wrapper_mutex); |
| 107 | ctx->wrapper_ret = ret; |
| 108 | ctx->wrapper_done = true; |
| 109 | pthread_cond_signal(&ctx->wrapper_cond); |
| 110 | pthread_mutex_unlock(&ctx->wrapper_mutex); |
| 111 | |
| 112 | if (ret != 0) |
| 113 | return NULL; |
| 114 | |
| 115 | return (void *)(uintptr_t)thread_func(thread_args); |
| 116 | } |
| 117 | #endif |
| 118 | |
| 119 | int |
nothing calls this directly
no test coverage detected