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

Function dfs_page_compare

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

* @brief Compare file positions for page alignment * * This function compares two file positions to determine if they belong to the same page. * It aligns both positions to page boundaries before comparison. * * @param[in] fpos File position to compare (byte offset) * @param[in] value Reference file position to compare against (byte offset) * * @return 0 if positions are in the same pag

Source from the content-addressed store, hash-verified

1103 * positive if fpos is after value
1104 */
1105static int dfs_page_compare(off_t fpos, off_t value)
1106{
1107 return fpos / ARCH_PAGE_SIZE * ARCH_PAGE_SIZE - value;
1108}
1109
1110/**
1111 * @brief Insert a page into the AVL tree of an address space

Callers 1

dfs_page_searchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected