f-stack/dpdk/lib/librte_eal/linux/include/rte_os.h

34 lines
783 B
C
Raw Permalink Normal View History

2021-02-05 08:48:47 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2019 Intel Corporation
*/
#ifndef _RTE_OS_H_
#define _RTE_OS_H_
/**
* This is header should contain any function/macro definition
* which are not supported natively or named differently in the
* linux OS. Functions will be added in future releases.
*/
#include <sched.h>
typedef cpu_set_t rte_cpuset_t;
#define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2)
#define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2)
#define RTE_CPU_FILL(set) do \
{ \
unsigned int i; \
CPU_ZERO(set); \
for (i = 0; i < CPU_SETSIZE; i++) \
CPU_SET(i, set); \
} while (0)
#define RTE_CPU_NOT(dst, src) do \
{ \
cpu_set_t tmp; \
RTE_CPU_FILL(&tmp); \
CPU_XOR(dst, &tmp, src); \
} while (0)
#endif /* _RTE_OS_H_ */