mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
hv: refine bit scan API
Rename bsrl to bsr bsrq to bsr64 bitmap_ffs to fls64 get_first_zero_bit to ffz64 Remove ffsl Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -81,7 +81,7 @@ static void *allocate_mem(struct mem_pool *pool, unsigned int num_bytes)
|
||||
/* Find the first occurrence of requested_buffs number of free
|
||||
* buffers. The 0th bit in bitmap represents a free buffer.
|
||||
*/
|
||||
for (bit_idx = get_first_zero_bit(pool->bitmap[idx]);
|
||||
for (bit_idx = ffz64(pool->bitmap[idx]);
|
||||
bit_idx < BITMAP_WORD_SIZE; bit_idx++) {
|
||||
/* Check if selected buffer is free */
|
||||
if (pool->bitmap[idx] & (1 << bit_idx))
|
||||
|
Reference in New Issue
Block a user