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

	/* Set bit in array2 slab and set bit in array1 slab */
	index2 = pos >> RTE_BITMAP_SLAB_BIT_SIZE_LOG2;
	offset2 = pos & RTE_BITMAP_SLAB_BIT_MASK;
	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;
	slab2 = bmp->array2 + index2;
	slab1 = bmp->array1 + index1;

	*slab2 |= 1llu << offset2;
	*slab1 |= 1llu << offset1;
}
/**
 * Bitmap bit set
 *
 * @param bmp
 *   Handle to bitmap instance
 * @param pos
 *   Bit position
 */
Bitmap bit set
@param bmp
Handle to bitmap instance
@param pos
Bit position
Bitmap bit set @param bmp Handle to bitmap instance @param pos Bit position
static inline void
rte_bitmap_set(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;
	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;
	slab2 = bmp->array2 + index2;
	slab1 = bmp->array1 + index1;
	*slab2 |= 1llu << offset2;
	*slab1 |= 1llu << offset1;
}
static inline void rte_bitmap_set ( 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 ; 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 ; slab2 = bmp -> array2 + index2 ; slab1 = bmp -> array1 + index1 ; * slab2 |= 1llu << offset2 ; * slab1 |= 1llu << offset1 ; }
Bitmap bit set
 @param bmp
   Handle to bitmap instance
 @param pos
   Bit position
Bitmap bit set @param bmp Handle to bitmap instance @param pos Bit position
/* Set bit in array2 slab and set bit in array1 slab */