* Bitmap bit get * * @param bmp * Handle to bitmap instance * @param pos * Bit position * @return * 0 when bit is cleared, non-zero when bit is set */
| 342 | * 0 when bit is cleared, non-zero when bit is set |
| 343 | */ |
| 344 | static inline uint64_t |
| 345 | rte_bitmap_get(struct rte_bitmap *bmp, uint32_t pos) |
| 346 | { |
| 347 | uint64_t *slab2; |
| 348 | uint32_t index2, offset2; |
| 349 | |
| 350 | index2 = pos >> RTE_BITMAP_SLAB_BIT_SIZE_LOG2; |
| 351 | offset2 = pos & RTE_BITMAP_SLAB_BIT_MASK; |
| 352 | slab2 = bmp->array2 + index2; |
| 353 | return (*slab2) & (1llu << offset2); |
| 354 | } |
| 355 | |
| 356 | /** |
| 357 | * Bitmap bit set |
no outgoing calls