kernel/vm: Minor API changes for consistency in VMCache.
* Insert/Remove can't fail, so drop status_t return values. * "TransferAreas" is really "TakeAreasFrom", so rename it. This avoids confusion with the "transfer_area" API call, which moves an area to another address space (keeping the same cache.)
This commit is contained in:
@@ -124,9 +124,9 @@ public:
|
|||||||
|
|
||||||
void AddConsumer(VMCache* consumer);
|
void AddConsumer(VMCache* consumer);
|
||||||
|
|
||||||
status_t InsertAreaLocked(VMArea* area);
|
void InsertAreaLocked(VMArea* area);
|
||||||
status_t RemoveArea(VMArea* area);
|
void RemoveArea(VMArea* area);
|
||||||
void TransferAreas(VMCache* fromCache);
|
void TakeAreasFrom(VMCache* fromCache);
|
||||||
uint32 CountWritableAreas(VMArea* ignoreArea) const;
|
uint32 CountWritableAreas(VMArea* ignoreArea) const;
|
||||||
|
|
||||||
status_t WriteModified();
|
status_t WriteModified();
|
||||||
|
|||||||
@@ -2758,7 +2758,7 @@ vm_copy_on_write_area(VMCache* lowerCache,
|
|||||||
|
|
||||||
// transfer the lower cache areas to the upper cache
|
// transfer the lower cache areas to the upper cache
|
||||||
rw_lock_write_lock(&sAreaCacheLock);
|
rw_lock_write_lock(&sAreaCacheLock);
|
||||||
upperCache->TransferAreas(lowerCache);
|
upperCache->TakeAreasFrom(lowerCache);
|
||||||
rw_lock_write_unlock(&sAreaCacheLock);
|
rw_lock_write_unlock(&sAreaCacheLock);
|
||||||
|
|
||||||
lowerCache->AddConsumer(upperCache);
|
lowerCache->AddConsumer(upperCache);
|
||||||
|
|||||||
Reference in New Issue
Block a user