vppinfra: remove pool_foreach_old, pool_foreach_index_old, clib_bitmap_foreach_old
Type: refactor Change-Id: Ifacdd001bdeb5d609d495406f53546090b86476d Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
committed by
Matthew Smith
parent
f2912e02ce
commit
04572bea34
@@ -364,25 +364,6 @@ clib_bitmap_set_region (uword * bitmap, uword i, uword value, uword n_bits)
|
||||
i != ~0; \
|
||||
i = clib_bitmap_next_set (ai, i + 1))
|
||||
|
||||
#define clib_bitmap_foreach_old(i,ai,body) \
|
||||
do { \
|
||||
uword __bitmap_i, __bitmap_ai, __bitmap_len, __bitmap_first_set; \
|
||||
__bitmap_len = vec_len ((ai)); \
|
||||
for (__bitmap_i = 0; __bitmap_i < __bitmap_len; __bitmap_i++) \
|
||||
{ \
|
||||
__bitmap_ai = (ai)[__bitmap_i]; \
|
||||
while (__bitmap_ai != 0) \
|
||||
{ \
|
||||
__bitmap_first_set = first_set (__bitmap_ai); \
|
||||
(i) = (__bitmap_i * BITS ((ai)[0]) \
|
||||
+ min_log2 (__bitmap_first_set)); \
|
||||
do { body; } while (0); \
|
||||
__bitmap_ai ^= __bitmap_first_set; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
/** Return the lowest numbered set bit in a bitmap
|
||||
@param ai - pointer to the bitmap
|
||||
@returns lowest numbered set bit, or ~0 if the entire bitmap is zero
|
||||
|
||||
@@ -537,10 +537,6 @@ do { \
|
||||
VAR < vec_end (POOL); \
|
||||
VAR = POOL + pool_get_next_index (POOL, VAR - POOL))
|
||||
|
||||
#define pool_foreach_old(VAR,POOL,BODY) \
|
||||
pool_foreach(VAR,POOL) \
|
||||
{ BODY; }
|
||||
|
||||
/** Returns pointer to element at given index.
|
||||
|
||||
ASSERTs that the supplied index is valid.
|
||||
@@ -579,11 +575,6 @@ do { \
|
||||
i < vec_len (v); \
|
||||
i = pool_get_next_index (v, i)) \
|
||||
|
||||
/** Iterate pool by index. */
|
||||
#define pool_foreach_index_old(i,v,body) \
|
||||
pool_foreach_index (i,v) \
|
||||
{ body; }
|
||||
|
||||
/**
|
||||
* @brief Remove all elements from a pool in a safe way
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user