* @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
| 624 | * @see dfs_aspace_inactive() for the opposite operation |
| 625 | */ |
| 626 | static 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 |
no test coverage detected