summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/timing_wheel.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-12-13 23:26:56 +0100
committerDave Barach <openvpp@barachs.net>2020-12-14 12:14:21 +0000
commitf0ca1e8d92114582ec9142bd15a40f1eb0102793 (patch)
treeaba56d88d909387605ba7fdaf7fc0fd5d3ff565c /src/vppinfra/timing_wheel.c
parentb2c31b685fd2cf28436ca32bc93e23eb24c74878 (diff)
misc: refactor clib_bitmap_foreach macro
Type: refactor Change-Id: I077110e1a422722e20aa546a6f3224c06ab0cde5 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/timing_wheel.c')
-rw-r--r--src/vppinfra/timing_wheel.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vppinfra/timing_wheel.c b/src/vppinfra/timing_wheel.c
index a6c476b2cfa..2c46d72a2fe 100644
--- a/src/vppinfra/timing_wheel.c
+++ b/src/vppinfra/timing_wheel.c
@@ -303,11 +303,11 @@ timing_wheel_insert (timing_wheel_t * w, u64 insert_cpu_time, u32 user_data)
vec_foreach (l, w->levels)
{
/* *INDENT-OFF* */
- clib_bitmap_foreach (wi, l->occupancy_bitmap, ({
+ clib_bitmap_foreach (wi, l->occupancy_bitmap) {
l->elts[wi] = delete_user_data (l->elts[wi], user_data);
if (vec_len (l->elts[wi]) == 0)
l->occupancy_bitmap = clib_bitmap_andnoti (l->occupancy_bitmap, wi);
- }));
+ }
/* *INDENT-ON* */
}
@@ -486,7 +486,7 @@ advance_cpu_time_base (timing_wheel_t * w, u32 * expired_user_data)
{
uword wi;
/* *INDENT-OFF* */
- clib_bitmap_foreach (wi, l->occupancy_bitmap, ({
+ clib_bitmap_foreach (wi, l->occupancy_bitmap) {
vec_foreach (e, l->elts[wi])
{
/* This should always be true since otherwise we would have already expired
@@ -495,7 +495,7 @@ advance_cpu_time_base (timing_wheel_t * w, u32 * expired_user_data)
ASSERT (e->cpu_time_relative_to_base >= delta);
e->cpu_time_relative_to_base -= delta;
}
- }));
+ }
/* *INDENT-ON* */
}
@@ -648,10 +648,10 @@ timing_wheel_advance (timing_wheel_t * w, u64 advance_cpu_time,
level = vec_elt_at_index (w->levels, level_index);
/* *INDENT-OFF* */
- clib_bitmap_foreach (wi, level->occupancy_bitmap, ({
+ clib_bitmap_foreach (wi, level->occupancy_bitmap) {
expired_user_data = expire_bin (w, level_index, wi, advance_cpu_time,
expired_user_data);
- }));
+ }
/* *INDENT-ON* */
}