51 #define LCORE_ID_ANY UINT32_MAX
53 #if defined(__linux__)
54 typedef cpu_set_t rte_cpuset_t;
55 #elif defined(__FreeBSD__)
56 #include <pthread_np.h>
57 typedef cpuset_t rte_cpuset_t;
91 static inline unsigned
103 static inline unsigned
115 static inline unsigned
134 if (lcore_id >= RTE_MAX_LCORE)
157 static inline unsigned
176 if (lcore_id >= RTE_MAX_LCORE)
178 return (cfg->
lcore_role[lcore_id] != ROLE_OFF);
194 static inline unsigned
201 while (i < RTE_MAX_LCORE) {
216 #define RTE_LCORE_FOREACH(i) \
217 for (i = rte_get_next_lcore(-1, 0, 0); \
219 i = rte_get_next_lcore(i, 0, 0))
224 #define RTE_LCORE_FOREACH_SLAVE(i) \
225 for (i = rte_get_next_lcore(-1, 1, 0); \
227 i = rte_get_next_lcore(i, 1, 0))
259 #if defined(__DOXYGEN__)
260 #define rte_thread_setname(...) pthread_setname_np(__VA_ARGS__)
263 #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
264 #if __GLIBC_PREREQ(2, 12)
265 #define rte_thread_setname(...) pthread_setname_np(__VA_ARGS__)
267 #define rte_thread_setname(...) 0
#define RTE_DECLARE_PER_LCORE(type, name)
void rte_thread_get_affinity(rte_cpuset_t *cpusetp)
static unsigned rte_lcore_to_socket_id(unsigned lcore_id)
static int rte_lcore_index(int lcore_id)
static unsigned rte_lcore_count(void)
static int rte_lcore_is_enabled(unsigned lcore_id)
enum rte_lcore_state_t state
static unsigned rte_lcore_id(void)
enum rte_lcore_role_t lcore_role[RTE_MAX_LCORE]
struct rte_config * rte_eal_get_configuration(void)
lcore_function_t *volatile f
static unsigned rte_get_master_lcore(void)
#define RTE_PER_LCORE(name)
int( lcore_function_t)(void *)
int rte_thread_set_affinity(rte_cpuset_t *cpusetp)
unsigned rte_socket_id(void)
static unsigned rte_get_next_lcore(unsigned i, int skip_master, int wrap)