src/dpdk/lib/librte_eal/include/rte_bitmap.h
static inline void
rte_bitmap_clear(struct rte_bitmap *bmp, uint32_t pos)
{
	uint64_t *slab1, *slab2;
	uint32_t index1, index2, offset1, offset2;

	/* Clear bit in array2 slab */
	index2 = pos >> RTE_BITMAP_SLAB_BIT_SIZE_LOG2;
	offset2 = pos & RTE_BITMAP_SLAB_BIT_MASK;
	slab2 = bmp->array2 + index2;

	/* Return if array2 slab is not all-zeros */
	*slab2 &= ~(1llu << offset2);
	if (*slab2){
		return;
	}

	/* Check the entire cache line of array2 for all-zeros */
	index2 &= ~ RTE_BITMAP_CL_SLAB_MASK;
	slab2 = bmp->array2 + index2;
	if (__rte_bitmap_line_not_empty(slab2)) {
		return;
	}

	/* The array2 cache line is all-zeros, so clear bit in array1 slab */
	index1 = pos >> (RTE_BITMAP_SLAB_BIT_SIZE_LOG2 + RTE_BITMAP_CL_BIT_SIZE_LOG2);
	offset1 = (pos >> RTE_BITMAP_CL_BIT_SIZE_LOG2) & RTE_BITMAP_SLAB_BIT_MASK;
	slab1 = bmp->array1 + index1;
	*slab1 &= ~(1llu << offset1);

	return;
}
/**
 * Bitmap bit clear
 *
 * @param bmp
 *   Handle to bitmap instance
 * @param pos
 *   Bit position
 */
Bitmap bit clear
@param bmp
Handle to bitmap instance
@param pos
Bit position
Bitmap bit clear @param bmp Handle to bitmap instance @param pos Bit position
static inline void
rte_bitmap_clear(struct rte_bitmap *bmp, uint32_t pos)
{
	uint64_t *slab1, *slab2;
	uint32_t index1, index2, offset1, offset2;
	index2 = pos >> RTE_BITMAP_SLAB_BIT_SIZE_LOG2;
	offset2 = pos & RTE_BITMAP_SLAB_BIT_MASK;
	slab2 = bmp->array2 + index2;
	*slab2 &= ~(1llu << offset2);
	if (*slab2){
		return;
	}
	index2 &= ~ RTE_BITMAP_CL_SLAB_MASK;
	slab2 = bmp->array2 + index2;
	if (__rte_bitmap_line_not_empty(slab2)) {
		return;
	}
	index1 = pos >> (RTE_BITMAP_SLAB_BIT_SIZE_LOG2 + RTE_BITMAP_CL_BIT_SIZE_LOG2);
	offset1 = (pos >> RTE_BITMAP_CL_BIT_SIZE_LOG2) & RTE_BITMAP_SLAB_BIT_MASK;
	slab1 = bmp->array1 + index1;
	*slab1 &= ~(1llu << offset1);
	return;
}
static inline void rte_bitmap_clear ( struct rte_bitmap * bmp , uint32_t pos ) { uint64_t * slab1 , * slab2 ; uint32_t index1 , index2 , offset1 , offset2 ; index2 = pos >> RTE_BITMAP_SLAB_BIT_SIZE_LOG2 ; offset2 = pos & RTE_BITMAP_SLAB_BIT_MASK ; slab2 = bmp -> array2 + index2 ; * slab2 &= ~ ( 1llu << offset2 ) ; if ( * slab2 ) { return ; } index2 &= ~ RTE_BITMAP_CL_SLAB_MASK ; slab2 = bmp -> array2 + index2 ; if ( __rte_bitmap_line_not_empty ( slab2 ) ) { return ; } index1 = pos >> ( RTE_BITMAP_SLAB_BIT_SIZE_LOG2 + RTE_BITMAP_CL_BIT_SIZE_LOG2 ) ; offset1 = ( pos >> RTE_BITMAP_CL_BIT_SIZE_LOG2 ) & RTE_BITMAP_SLAB_BIT_MASK ; slab1 = bmp -> array1 + index1 ; * slab1 &= ~ ( 1llu << offset1 ) ; return ; }
Bitmap bit clear
 @param bmp
   Handle to bitmap instance
 @param pos
   Bit position
Bitmap bit clear @param bmp Handle to bitmap instance @param pos Bit position
/* Clear bit in array2 slab */ /* Return if array2 slab is not all-zeros */ /* Check the entire cache line of array2 for all-zeros */ /* The array2 cache line is all-zeros, so clear bit in array1 slab */