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

Function dfs_aspace_active

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

* @brief Move an address space to active list * * This function moves the specified address space from its current position * to the active list in the page cache. The active list contains frequently * accessed address spaces. * * @param[in,out] aspace Pointer to the address space to be activated * * @note Insert the address space before inactive list's head, means putting it * to t

Source from the content-addressed store, hash-verified

624 * @see dfs_aspace_inactive() for the opposite operation
625 */
626static void dfs_aspace_active(struct dfs_aspace *aspace)
627{
628 dfs_pcache_lock();
629 if (aspace->cache_node.next != RT_NULL)
630 {
631 rt_list_remove(&aspace->cache_node);
632 rt_list_insert_before(&__pcache.list_inactive, &aspace->cache_node);
633 }
634 dfs_pcache_unlock();
635}
636
637/**
638 * @brief Move an address space to inactive list

Callers 1

dfs_aspace_createFunction · 0.85

Calls 4

dfs_pcache_lockFunction · 0.85
rt_list_removeFunction · 0.85
rt_list_insert_beforeFunction · 0.85
dfs_pcache_unlockFunction · 0.85

Tested by

no test coverage detected