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

Function rt_page_bits

components/mm/mm_page.c:436–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436rt_size_t rt_page_bits(rt_size_t size)
437{
438 int bit = sizeof(rt_size_t) * 8 - rt_hw_clz(size) - 1;
439
440 if ((size ^ (1UL << bit)) != 0)
441 {
442 bit++;
443 }
444 bit -= ARCH_PAGE_SHIFT;
445 if (bit < 0)
446 {
447 bit = 0;
448 }
449 return bit;
450}
451
452struct rt_page *rt_page_addr2page(void *addr)
453{

Callers 15

_lwp_shmgetFunction · 0.85
_lwp_shmrmFunction · 0.85
nvme_blk_readFunction · 0.85
nvme_blk_writeFunction · 0.85
gicv3_its_irq_alloc_msiFunction · 0.85
_k230_pdma_llt_calFunction · 0.85
rt_hw_elcd_initFunction · 0.85
rt_hw_board_initFunction · 0.85
_lcd_drv_initFunction · 0.85
drv_clcd_hw_initFunction · 0.85
utest_tc_initFunction · 0.85
utest_tc_cleanupFunction · 0.85

Calls 1

rt_hw_clzFunction · 0.85

Tested by 5

test_varea_map_rangeFunction · 0.68
test_varea_unmap_rangeFunction · 0.68
_test_dcache_cleanFunction · 0.68
_test_dcache_invalidateFunction · 0.68