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

Function dfs_page_active

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

* @brief Move a page to active list * * This function moves a page to the active list * within its associated address space. * * @param[in] page The page to be moved to active list * @return int Always returns 0 on success */

Source from the content-addressed store, hash-verified

1298 * @return int Always returns 0 on success
1299 */
1300static int dfs_page_active(struct dfs_page *page)
1301{
1302 struct dfs_aspace *aspace = page->aspace;
1303
1304 dfs_aspace_lock(aspace);
1305 if (page->space_node.next != RT_NULL)
1306 {
1307 rt_list_remove(&page->space_node);
1308 rt_list_insert_before(&aspace->list_inactive, &page->space_node);
1309 }
1310 dfs_aspace_unlock(aspace);
1311
1312 return 0;
1313}
1314
1315/**
1316 * @brief Move a page to inactive list

Callers 1

dfs_page_searchFunction · 0.85

Calls 4

dfs_aspace_lockFunction · 0.85
rt_list_removeFunction · 0.85
rt_list_insert_beforeFunction · 0.85
dfs_aspace_unlockFunction · 0.85

Tested by

no test coverage detected