vppinfra: Improve code portability
Use standard macros CPU_ISSET_S and CPU_ZERO_S and make code more
portable.
Type: improvement
Change-Id: I8e6a0fd79b90de8c6c33cad8882680eae2ca50ef
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
diff --git a/src/vppinfra/unix-misc.c b/src/vppinfra/unix-misc.c
index af48e99..88a56d8 100644
--- a/src/vppinfra/unix-misc.c
+++ b/src/vppinfra/unix-misc.c
@@ -291,7 +291,7 @@
clib_bitmap_alloc (affinity_cpus, sizeof (cpu_set_t));
clib_bitmap_zero (affinity_cpus);
- __CPU_ZERO_S (sizeof (cpu_set_t), &cpuset);
+ CPU_ZERO_S (sizeof (cpu_set_t), &cpuset);
ret = sched_getaffinity (0, sizeof (cpu_set_t), &cpuset);
@@ -302,7 +302,7 @@
}
for (index = 0; index < sizeof (cpu_set_t); index++)
- if (__CPU_ISSET_S (index, sizeof (cpu_set_t), &cpuset))
+ if (CPU_ISSET_S (index, sizeof (cpu_set_t), &cpuset))
clib_bitmap_set (affinity_cpus, index, 1);
return affinity_cpus;
#elif defined(__FreeBSD__)