Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 1888 → Rev 1889

/trunk/kernel/generic/src/mm/as.c
359,7 → 359,7
cond = false; /* we are almost done */
i = (start_free - b) >> PAGE_WIDTH;
if (!used_space_remove(area, start_free, c - i))
panic("Could not remove used space.");
panic("Could not remove used space.\n");
} else {
/*
* The interval of used space can be completely removed.
389,6 → 389,11
*/
tlb_invalidate_pages(AS->asid, area->base + pages*PAGE_SIZE, area->pages - pages);
tlb_shootdown_finalize();
/*
* Invalidate software translation caches (e.g. TSB on sparc64).
*/
as_invalidate_translation_cache(as, area->base + pages*PAGE_SIZE, area->pages - pages);
} else {
/*
* Growing the area.
440,7 → 445,7
/*
* Start TLB shootdown sequence.
*/
tlb_shootdown_start(TLB_INVL_PAGES, AS->asid, area->base, area->pages);
tlb_shootdown_start(TLB_INVL_PAGES, as->asid, area->base, area->pages);
 
/*
* Visit only the pages mapped by used_space B+tree.
472,9 → 477,14
/*
* Finish TLB shootdown sequence.
*/
tlb_invalidate_pages(AS->asid, area->base, area->pages);
tlb_invalidate_pages(as->asid, area->base, area->pages);
tlb_shootdown_finalize();
/*
* Invalidate potential software translation caches (e.g. TSB on sparc64).
*/
as_invalidate_translation_cache(as, area->base, area->pages);
btree_destroy(&area->used_space);
 
area->attributes |= AS_AREA_ATTR_PARTIAL;
487,11 → 497,11
/*
* Remove the empty area from address space.
*/
btree_remove(&AS->as_area_btree, base, NULL);
btree_remove(&as->as_area_btree, base, NULL);
free(area);
mutex_unlock(&AS->lock);
mutex_unlock(&as->lock);
interrupts_restore(ipl);
return 0;
}