1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
11 * Basic loop of EAL thread, called for each worker thread by rte_eal_init().
14 * The lcore_id (passed as an integer) of this worker thread.
16 __rte_noreturn void *eal_thread_loop(void *arg);
19 * Get the NUMA socket id from cpu id.
20 * This function is private to EAL.
23 * The logical process id.
25 * socket_id or SOCKET_ID_ANY
27 unsigned eal_cpu_socket_id(unsigned cpu_id);
30 * Default buffer size to use with eal_thread_dump_affinity()
32 #define RTE_CPU_AFFINITY_STR_LEN 256
35 * Dump the cpuset as a human readable string.
36 * This function is private to EAL.
39 * If the dump size is greater than the size of given buffer,
40 * the string will be truncated and with '\0' at the end.
43 * The CPU affinity object to dump.
45 * The string buffer the cpuset will dump to.
47 * The string buffer size.
49 * 0 for success, -1 if truncation happens.
52 eal_thread_dump_affinity(rte_cpuset_t *cpuset, char *str, unsigned int size);
55 * Dump the current thread cpuset.
56 * This is a wrapper on eal_thread_dump_affinity().
59 eal_thread_dump_current_affinity(char *str, unsigned int size);
62 * Called by the main thread to wake up a worker in 'WAIT' state.
63 * This function blocks until the worker acknowledge it started processing a
65 * This function is private to EAL.
68 * The lcore_id of a worker thread.
71 eal_thread_wake_worker(unsigned int worker_id);
74 * Called by a worker thread to sleep after entering 'WAIT' state.
75 * This function is private to EAL.
78 eal_thread_wait_command(void);
81 * Called by a worker thread to acknowledge new command after leaving 'WAIT'
83 * This function is private to EAL.
86 eal_thread_ack_command(void);
88 #endif /* EAL_THREAD_H */