eal: move common header files
[dpdk.git] / lib / librte_eal / linux / eal / include / rte_os.h
index bc6ad14..218d4fa 100644 (file)
  * 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_ */