tests: move vppinfra tests to src/vppinfra/test
[vpp.git] / src / vppinfra / linux / syscall.h
index f8ec591..c07cad6 100644 (file)
 #include <unistd.h>
 #include <sys/syscall.h>
 
+#ifndef HAVE_GETCPU
+static inline int
+getcpu (unsigned *cpu, unsigned *node)
+{
+  return syscall (__NR_getcpu, cpu, node, 0);
+}
+#endif
+
 static inline long
 set_mempolicy (int mode, const unsigned long *nodemask, unsigned long maxnode)
 {
@@ -39,11 +47,13 @@ move_pages (int pid, unsigned long count, void **pages, const int *nodes,
   return syscall (__NR_move_pages, pid, count, pages, nodes, status, flags);
 }
 
+#ifndef HAVE_MEMFD_CREATE
 static inline int
 memfd_create (const char *name, unsigned int flags)
 {
   return syscall (__NR_memfd_create, name, flags);
 }
+#endif
 
 #endif /* included_linux_syscall_h */