aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho do Couto <renato@netgate.com>2024-06-21 14:00:10 +0000
committerMatthew Smith <mgsmith@netgate.com>2024-06-26 19:25:50 +0000
commit7f3c21763f7a977037208aa603f706782b92c73c (patch)
treea85345bc51e9c50f2cb924ea872c4bacee55f54a
parent1b794cf1b639534b58ea7eab4baadff11bd3d19e (diff)
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>
-rw-r--r--src/vppinfra/unix-misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vppinfra/unix-misc.c b/src/vppinfra/unix-misc.c
index af48e99ebe6..88a56d88afc 100644
--- a/src/vppinfra/unix-misc.c
+++ b/src/vppinfra/unix-misc.c
@@ -291,7 +291,7 @@ os_get_cpu_affinity_bitmap (int pid)
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 @@ os_get_cpu_affinity_bitmap (int pid)
}
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__)