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:
Augustin Cavalier
2026-03-21 12:30:02 -04:00
parent 05f1182cca
commit 5fffbbfc48
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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();
+1 -1
View File
@@ -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);