1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2019 Intel Corporation
9 * This header should contain any definition
10 * which is not supported natively or named differently in Linux.
14 #include <sys/queue.h>
16 /* These macros are compatible with system's sys/queue.h. */
17 #define RTE_TAILQ_HEAD(name, type) TAILQ_HEAD(name, type)
18 #define RTE_TAILQ_ENTRY(type) TAILQ_ENTRY(type)
19 #define RTE_TAILQ_FOREACH(var, head, field) TAILQ_FOREACH(var, head, field)
20 #define RTE_TAILQ_FIRST(head) TAILQ_FIRST(head)
21 #define RTE_TAILQ_NEXT(elem, field) TAILQ_NEXT(elem, field)
22 #define RTE_STAILQ_HEAD(name, type) STAILQ_HEAD(name, type)
23 #define RTE_STAILQ_ENTRY(type) STAILQ_ENTRY(type)
25 #ifdef CPU_SETSIZE /* may require _GNU_SOURCE */
26 typedef cpu_set_t rte_cpuset_t;
27 #define RTE_HAS_CPUSET
28 #define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2)
29 #define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2)
30 #define RTE_CPU_FILL(set) do \
34 for (i = 0; i < CPU_SETSIZE; i++) \
37 #define RTE_CPU_NOT(dst, src) do \
41 CPU_XOR(dst, &tmp, src); \
45 #endif /* _RTE_OS_H_ */