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 Windows.
21 /* These macros are compatible with bundled sys/queue.h. */
22 #define RTE_TAILQ_HEAD(name, type) \
24 struct type *tqh_first; \
25 struct type **tqh_last; \
27 #define RTE_TAILQ_ENTRY(type) \
29 struct type *tqe_next; \
30 struct type **tqe_prev; \
32 #define RTE_TAILQ_FOREACH(var, head, field) \
33 for ((var) = RTE_TAILQ_FIRST((head)); \
35 (var) = RTE_TAILQ_NEXT((var), field))
36 #define RTE_TAILQ_FIRST(head) ((head)->tqh_first)
37 #define RTE_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
38 #define RTE_STAILQ_HEAD(name, type) \
40 struct type *stqh_first; \
41 struct type **stqh_last; \
43 #define RTE_STAILQ_ENTRY(type) \
45 struct type *stqe_next; \
48 /* cpu_set macros implementation */
49 #define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2)
50 #define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2)
51 #define RTE_CPU_FILL(set) CPU_FILL(set)
52 #define RTE_CPU_NOT(dst, src) CPU_NOT(dst, src)
54 /* This is an exception without "rte_" prefix, because Windows does have
55 * ssize_t, but it's defined in <windows.h> which we avoid to expose.
56 * If ssize_t is defined in user code, it necessarily has the same type.
58 typedef long long ssize_t;
64 #endif /* _RTE_OS_H_ */