Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2984 → Rev 2985

/branches/dynload/kernel/generic/src/mm/as.c
794,7 → 794,12
uintptr_t base;
link_t *cur;
ipl_t ipl;
int page_flags;
int old_frame;
 
/* Flags for the new memory mapping */
page_flags = area_flags_to_page_flags(flags);
 
ipl = interrupts_disable();
mutex_lock(&as->lock);
 
808,6 → 813,7
if (area->sh_info || area->backend != &anon_backend) {
/* Copying shared areas not supported yet */
/* Copying non-anonymous memory not supported yet */
mutex_unlock(&area->lock);
mutex_unlock(&as->lock);
interrupts_restore(ipl);
return ENOTSUP;
839,11 → 845,13
pte = page_mapping_find(as, b + j * PAGE_SIZE);
ASSERT(pte && PTE_VALID(pte) &&
PTE_PRESENT(pte));
old_frame = PTE_GET_FRAME_ARCH(pte);
 
/* Remove old mapping and insert the new one */
page_mapping_remove(as, b + j * PAGE_SIZE);
page_mapping_insert(as, b + j * PAGE_SIZE,
PTE_GET_FRAME(pte), flags);
old_frame, page_flags);
 
page_table_unlock(as, false);
}
}