Home
last modified time | relevance | path

Searched refs:num_blocks (Results 1 – 25 of 34) sorted by relevance

12

/Zephyr-latest/lib/mem_blocks/
Dmem_blocks.c16 static void *alloc_blocks(sys_mem_blocks_t *mem_block, size_t num_blocks) in alloc_blocks() argument
27 r = sys_bitarray_alloc(mem_block->bitmap, num_blocks, &offset); in alloc_blocks()
37 mem_block->info.used_blocks += (uint32_t)num_blocks; in alloc_blocks()
54 size_t num_blocks) in free_blocks() argument
67 if (offset >= mem_block->info.num_blocks) { in free_blocks()
75 ret = sys_bitarray_free(mem_block->bitmap, num_blocks, offset); in free_blocks()
79 mem_block->info.used_blocks -= (uint32_t)num_blocks; in free_blocks()
103 if (count > mem_block->info.num_blocks) { in sys_mem_blocks_alloc_contiguous()
142 if (count > mem_block->info.num_blocks) { in sys_mem_blocks_alloc()
187 __ASSERT_NO_MSG(offset + count <= mem_block->info.num_blocks); in sys_mem_blocks_is_region_free()
[all …]
/Zephyr-latest/include/zephyr/sd/
Dmmc.h38 uint32_t start_block, uint32_t num_blocks);
55 uint32_t start_block, uint32_t num_blocks);
Dsdmmc.h38 uint32_t start_block, uint32_t num_blocks);
55 uint32_t start_block, uint32_t num_blocks);
/Zephyr-latest/subsys/net/lib/shell/
Dmem.c66 slab, slab->info.num_blocks, k_mem_slab_num_free_get(slab)); in context_info()
68 PR("%p\t%d\tETX\n", slab, slab->info.num_blocks); in context_info()
120 rx, rx->info.num_blocks, k_mem_slab_num_free_get(rx)); in cmd_net_mem()
123 tx, tx->info.num_blocks, k_mem_slab_num_free_get(tx)); in cmd_net_mem()
133 PR("%p\t%d\tRX\n", rx, rx->info.num_blocks); in cmd_net_mem()
134 PR("%p\t%d\tTX\n", tx, tx->info.num_blocks); in cmd_net_mem()
Dpkt.c15 size_t last_offset = (slab->info.num_blocks - 1) * slab->info.block_size; in is_pkt_part_of_slab()
/Zephyr-latest/tests/drivers/disk/disk_performance/src/
Dmain.c86 static uint64_t read_helper(uint32_t num_blocks) in read_helper() argument
101 rc = disk_access_read(disk_pdrv, test_buf, 0, num_blocks); in read_helper()
139 static uint64_t write_helper(uint32_t num_blocks) in write_helper() argument
150 rc = disk_access_read(disk_pdrv, backup_buf, 0, num_blocks); in write_helper()
154 sys_rand_get(test_buf, num_blocks * SECTOR_SIZE); in write_helper()
160 rc = disk_access_write(disk_pdrv, test_buf, 0, num_blocks); in write_helper()
173 rc = disk_access_write(disk_pdrv, backup_buf, 0, num_blocks); in write_helper()
/Zephyr-latest/subsys/sd/
Dsd_ops.c491 static int card_read(struct sd_card *card, uint8_t *rbuf, uint32_t start_block, uint32_t num_blocks) in card_read() argument
509 cmd.opcode = (num_blocks == 1U) ? SD_READ_SINGLE_BLOCK : SD_READ_MULTIPLE_BLOCK; in card_read()
522 data.blocks = num_blocks; in card_read()
526 LOG_DBG("READ: Sector = %u, Count = %u", start_block, num_blocks); in card_read()
544 int card_read_blocks(struct sd_card *card, uint8_t *rbuf, uint32_t start_block, uint32_t num_blocks) in card_read_blocks() argument
551 if ((start_block + num_blocks) > card->block_count) { in card_read_blocks()
581 while (sector < num_blocks) { in card_read_blocks()
597 ret = card_read(card, rbuf, start_block, num_blocks); in card_read_blocks()
654 uint32_t num_blocks) in card_write() argument
665 cmd.opcode = (num_blocks == 1) ? SD_WRITE_SINGLE_BLOCK : SD_WRITE_MULTIPLE_BLOCK; in card_write()
[all …]
Dsd_ops.h51 uint32_t start_block, uint32_t num_blocks);
54 uint32_t start_block, uint32_t num_blocks);
Dmmc.c56 uint32_t num_blocks) in mmc_write_blocks() argument
58 return card_write_blocks(card, wbuf, start_block, num_blocks); in mmc_write_blocks()
62 uint32_t num_blocks) in mmc_read_blocks() argument
64 return card_read_blocks(card, rbuf, start_block, num_blocks); in mmc_read_blocks()
Dsdmmc.c786 uint32_t num_blocks) in sdmmc_read_blocks() argument
788 return card_read_blocks(card, rbuf, start_block, num_blocks); in sdmmc_read_blocks()
792 uint32_t num_blocks) in sdmmc_write_blocks() argument
794 return card_write_blocks(card, wbuf, start_block, num_blocks); in sdmmc_write_blocks()
/Zephyr-latest/kernel/
Dmem_slab.c51 ptr->free_bytes = (slab->info.num_blocks - slab->info.num_used) * in k_mem_slab_stats_query()
115 p = slab->buffer + slab->info.block_size * (slab->info.num_blocks - 1); in create_free_list()
172 size_t block_size, uint32_t num_blocks) in k_mem_slab_init() argument
176 slab->info.num_blocks = num_blocks; in k_mem_slab_init()
217 (offset < (slab->info.block_size * slab->info.num_blocks)) && in slab_ptr_is_good()
234 slab->info.num_used == slab->info.num_blocks) || in k_mem_slab_alloc()
311 stats->free_bytes = (slab->info.num_blocks - slab->info.num_used) * in k_mem_slab_runtime_stats_get()
/Zephyr-latest/drivers/flash/
Dflash_page_layout.c81 size_t block, num_blocks, page = 0, i; in flash_page_foreach() local
84 api->page_layout(dev, &layout, &num_blocks); in flash_page_foreach()
86 for (block = 0; block < num_blocks; block++) { in flash_page_foreach()
Dflash_mspi_emul_device.c150 const size_t num_blocks = size / SPI_NOR_BLOCK_SIZE; in flash_mspi_emul_erase() local
171 for (i = 0; i < num_blocks; i++) { in flash_mspi_emul_erase()
Dflash_mspi_atxp032.c483 const size_t num_blocks = size / SPI_NOR_BLOCK_SIZE; in flash_mspi_atxp032_erase() local
516 for (i = 0; i < num_blocks; i++) { in flash_mspi_atxp032_erase()
/Zephyr-latest/tests/kernel/obj_core/obj_core_stats/src/
Dmain.c415 zassert_equal(raw.num_blocks, expected->num_blocks, in test_mem_block_raw()
417 str, expected->num_blocks, raw.num_blocks); in test_mem_block_raw()
459 .num_blocks = 4, .blk_sz_shift = 5, in ZTEST()
574 zassert_equal(raw.num_blocks, expected->num_blocks, in test_mem_slab_raw()
576 str, expected->num_blocks, raw.num_blocks); in test_mem_slab_raw()
616 .num_blocks = 4, .block_size = 32, .num_used = 0, in ZTEST()
/Zephyr-latest/tests/bluetooth/audio/mocks/src/
Dmem_slab.c12 if (slab->info.num_used >= slab->info.num_blocks) { in k_mem_slab_alloc()
/Zephyr-latest/subsys/ipc/ipc_service/backends/
Dipc_icbmsg.c340 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()
[all …]
/Zephyr-latest/tests/net/bridge/src/
Dmain.c200 orig_rx_num_blocks = rx->info.num_blocks; in get_free_packet_count()
201 orig_tx_num_blocks = tx->info.num_blocks; in get_free_packet_count()
209 zassert_equal(rx->info.num_blocks, orig_rx_num_blocks, ""); in check_free_packet_count()
210 zassert_equal(tx->info.num_blocks, orig_tx_num_blocks, ""); in check_free_packet_count()
/Zephyr-latest/tests/lib/mem_blocks/src/
Dmain.c65 mem_block->info.num_blocks); in check_buffer_bound()
116 int num_blocks, int num_iters) in alloc_free() argument
137 for (i = 0; i < num_blocks; i++) { in alloc_free()
167 if (num_blocks >= NUM_BLOCKS) { in alloc_free()
177 for (i = 0; i < num_blocks; i++) { in alloc_free()
710 mem_block_01.info.num_blocks); in ZTEST()
801 mem_block_01.info.num_blocks); in ZTEST()
/Zephyr-latest/include/zephyr/sys/
Dmem_blocks.h86 uint32_t num_blocks; /* Total number of blocks */ member
/Zephyr-latest/subsys/portability/cmsis_rtos_v2/
Dmempool.c175 return mslab->z_mslab.info.num_blocks; in osMemoryPoolGetCapacity()
/Zephyr-latest/tests/drivers/build_all/sensor/src/
Dgeneric_test.c61 sensor_read_rtio_ctx.block_pool->info.num_blocks, in before()
/Zephyr-latest/drivers/spi/
Dspi_b_renesas_ra8.c683 .num_blocks = 0, \
709 .num_blocks = 0, \
/Zephyr-latest/include/zephyr/rtio/
Drtio.h478 uint32_t buff_size = mem_pool->info.num_blocks * block_size; in __rtio_compute_mempool_block_index()
1184 r->block_pool->buffer + blk_size * r->block_pool->info.num_blocks); in z_impl_rtio_cqe_get_mempool_buffer()
/Zephyr-latest/subsys/tracing/sysview/
DSYSVIEW_Zephyr.txt89 84 k_mem_slab_init slab=%I, buffer=%p, bock_size=%u, num_blocks=%u | Returns ErrCodePos…

12