From 5fffbbfc48280b4bd486d71526a31647bd65374b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 21 Mar 2026 12:30:02 -0400 Subject: [PATCH] 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.) --- headers/private/kernel/vm/VMCache.h | 6 +++--- src/system/kernel/vm/vm.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/headers/private/kernel/vm/VMCache.h b/headers/private/kernel/vm/VMCache.h index c816a3ae07..d3aa2a9e12 100644 --- a/headers/private/kernel/vm/VMCache.h +++ b/headers/private/kernel/vm/VMCache.h @@ -124,9 +124,9 @@ public: void AddConsumer(VMCache* consumer); - status_t InsertAreaLocked(VMArea* area); - status_t RemoveArea(VMArea* area); - void TransferAreas(VMCache* fromCache); + void InsertAreaLocked(VMArea* area); + void RemoveArea(VMArea* area); + void TakeAreasFrom(VMCache* fromCache); uint32 CountWritableAreas(VMArea* ignoreArea) const; status_t WriteModified(); diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 3ee42b1fec..55a9c4656a 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -2758,7 +2758,7 @@ vm_copy_on_write_area(VMCache* lowerCache, // transfer the lower cache areas to the upper cache rw_lock_write_lock(&sAreaCacheLock); - upperCache->TransferAreas(lowerCache); + upperCache->TakeAreasFrom(lowerCache); rw_lock_write_unlock(&sAreaCacheLock); lowerCache->AddConsumer(upperCache);