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

Function thread_update_affinity

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

Source from the content-addressed store, hash-verified

62}
63
64static void
65thread_update_affinity(rte_cpuset_t *cpusetp)
66{
67 unsigned int lcore_id = rte_lcore_id();
68
69 /* store socket_id in TLS for quick access */
70 RTE_PER_LCORE(_socket_id) =
71 eal_cpuset_socket_id(cpusetp);
72
73 /* store cpuset in TLS for quick access */
74 memmove(&RTE_PER_LCORE(_cpuset), cpusetp,
75 sizeof(rte_cpuset_t));
76
77 if (lcore_id != (unsigned)LCORE_ID_ANY) {
78 /* EAL thread will update lcore_config */
79 lcore_config[lcore_id].socket_id = RTE_PER_LCORE(_socket_id);
80 memmove(&lcore_config[lcore_id].cpuset, cpusetp,
81 sizeof(rte_cpuset_t));
82 }
83}
84
85int
86rte_thread_set_affinity(rte_cpuset_t *cpusetp)

Callers 2

rte_thread_set_affinityFunction · 0.85
__rte_thread_initFunction · 0.85

Calls 3

rte_lcore_idFunction · 0.85
eal_cpuset_socket_idFunction · 0.85
memmoveFunction · 0.50

Tested by

no test coverage detected