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

Function dfs_aspace_fpos

components/dfs/dfs_v2/src/dfs_pcache.c:2059–2062  ·  view source on GitHub ↗

* Calculate file position from virtual address. * * @param[in] varea The virtual memory area * @param[in] vaddr The virtual address to convert * * @return The calculated file position offset */

Source from the content-addressed store, hash-verified

2057 * @return The calculated file position offset
2058 */
2059off_t dfs_aspace_fpos(struct rt_varea *varea, void *vaddr)
2060{
2061 return (off_t)(intptr_t)vaddr - (off_t)(intptr_t)varea->start + varea->offset * ARCH_PAGE_SIZE;
2062}
2063
2064/**
2065 * Get the virtual address corresponding to a file position in a virtual area.

Callers 5

dfs_aspace_mmapFunction · 0.85
dfs_aspace_page_unmapFunction · 0.85
dfs_aspace_page_dirtyFunction · 0.85
dfs_aspace_mmap_readFunction · 0.85
dfs_aspace_mmap_writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected