MCPcopy Create free account
hub / github.com/F-Stack/f-stack / control_thread_init

Function control_thread_init

dpdk/lib/eal/common/eal_common_thread.c:248–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246};
247
248static int control_thread_init(void *arg)
249{
250 struct internal_config *internal_conf =
251 eal_get_internal_configuration();
252 rte_cpuset_t *cpuset = &internal_conf->ctrl_cpuset;
253 struct control_thread_params *params = arg;
254
255 __rte_thread_init(rte_lcore_id(), cpuset);
256 /* Set control thread socket ID to SOCKET_ID_ANY
257 * as control threads may be scheduled on any NUMA node.
258 */
259 RTE_PER_LCORE(_socket_id) = SOCKET_ID_ANY;
260 params->ret = rte_thread_set_affinity_by_id(rte_thread_self(), cpuset);
261 if (params->ret != 0) {
262 rte_atomic_store_explicit(&params->status,
263 CTRL_THREAD_ERROR, rte_memory_order_release);
264 return 1;
265 }
266
267 rte_atomic_store_explicit(&params->status,
268 CTRL_THREAD_RUNNING, rte_memory_order_release);
269
270 return 0;
271}
272
273static uint32_t control_thread_start(void *arg)
274{

Callers 1

control_thread_startFunction · 0.85

Calls 5

__rte_thread_initFunction · 0.85
rte_lcore_idFunction · 0.85
rte_thread_selfFunction · 0.50

Tested by

no test coverage detected