summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/bitops.h3
-rw-r--r--src/vppinfra/cpu.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/vppinfra/bitops.h b/src/vppinfra/bitops.h
index 15454ca5036..7a4be3ce4c3 100644
--- a/src/vppinfra/bitops.h
+++ b/src/vppinfra/bitops.h
@@ -38,6 +38,9 @@
#ifndef included_clib_bitops_h
#define included_clib_bitops_h
+#define SET_BIT(i) (1 << i)
+#define GET_BIT(n, i) (n >> i) & 1U
+
static_always_inline uword
clear_lowest_set_bit (uword x)
{
diff --git a/src/vppinfra/cpu.h b/src/vppinfra/cpu.h
index d123f39871d..3c5e59e6e01 100644
--- a/src/vppinfra/cpu.h
+++ b/src/vppinfra/cpu.h
@@ -168,6 +168,8 @@ _ (sve, 22)
u32 clib_get_current_cpu_id ();
u32 clib_get_current_numa_node ();
+typedef int (*clib_cpu_supports_func_t) ();
+
#if defined(__x86_64__)
#include "cpuid.h"
@@ -183,8 +185,6 @@ clib_get_cpuid (const u32 lev, u32 * eax, u32 * ebx, u32 * ecx, u32 * edx)
return 1;
}
-typedef int (*clib_cpu_supports_func_t) ();
-
#define _(flag, func, reg, bit) \
static inline int \
clib_cpu_supports_ ## flag() \