Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/backend_anon.c

    r55b77d9 rcda1378  
    5050#include <typedefs.h>
    5151#include <align.h>
    52 #include <memstr.h>
    5352#include <arch.h>
    5453
     
    9796void anon_share(as_area_t *area)
    9897{
     98        link_t *cur;
     99
    99100        ASSERT(mutex_locked(&area->as->lock));
    100101        ASSERT(mutex_locked(&area->lock));
     
    104105         */
    105106        mutex_lock(&area->sh_info->lock);
    106         list_foreach(area->used_space.leaf_list, cur) {
     107        for (cur = area->used_space.leaf_head.next;
     108            cur != &area->used_space.leaf_head; cur = cur->next) {
    107109                btree_node_t *node;
    108110                unsigned int i;
     
    119121                                page_table_lock(area->as, false);
    120122                                pte = page_mapping_find(area->as,
    121                                     base + P2SZ(j), false);
     123                                    base + j * PAGE_SIZE);
    122124                                ASSERT(pte && PTE_VALID(pte) &&
    123125                                    PTE_PRESENT(pte));
    124126                                btree_insert(&area->sh_info->pagemap,
    125                                     (base + P2SZ(j)) - area->base,
     127                                    (base + j * PAGE_SIZE) - area->base,
    126128                                    (void *) PTE_GET_FRAME(pte), NULL);
    127129                                page_table_unlock(area->as, false);
Note: See TracChangeset for help on using the changeset viewer.