MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dma_pool_free

Function dma_pool_free

components/drivers/dma/dma_pool.c:302–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302static void dma_pool_free(struct rt_dma_pool *pool, rt_ubase_t offset, rt_size_t size)
303{
304 rt_size_t bit = (offset - pool->start) / ARCH_PAGE_SIZE, end_bit;
305
306 size = RT_DIV_ROUND_UP(size, ARCH_PAGE_SIZE);
307 end_bit = bit + size;
308
309 for (; bit < end_bit; ++bit)
310 {
311 rt_bitmap_clear_bit(pool->map, bit);
312 }
313}
314
315static void *dma_alloc(struct rt_device *dev, rt_size_t size,
316 rt_ubase_t *dma_handle, rt_ubase_t flags)

Callers 4

dma_allocFunction · 0.85
dma_freeFunction · 0.85
td_freeFunction · 0.85
ed_freeFunction · 0.85

Calls 1

rt_bitmap_clear_bitFunction · 0.85

Tested by

no test coverage detected