Lines Matching refs:num_blocks
340 size_t num_blocks = DIV_ROUND_UP(total_size, conf->tx.block_size); in alloc_tx_buffer() local
353 r = sys_bitarray_alloc(conf->tx_usage_bitmap, num_blocks, in alloc_tx_buffer()
378 r = sys_bitarray_alloc(conf->tx_usage_bitmap, num_blocks, &tx_block_index); in alloc_tx_buffer()
410 num_blocks = next_bit - tx_block_index; in alloc_tx_buffer()
414 *size = conf->tx.block_size * num_blocks - BLOCK_HEADER_SIZE; in alloc_tx_buffer()
440 size_t num_blocks; in release_tx_blocks() local
449 num_blocks = DIV_ROUND_UP(total_size, conf->tx.block_size); in release_tx_blocks()
455 if (new_num_blocks > num_blocks) { in release_tx_blocks()
457 num_blocks); in release_tx_blocks()
464 num_blocks = num_blocks - new_num_blocks; in release_tx_blocks()
470 if (num_blocks > 0) { in release_tx_blocks()
472 r = sys_bitarray_free(conf->tx_usage_bitmap, num_blocks, in release_tx_blocks()