[haiku-commits] Re: r35155 - in haiku/trunk: headers/private/kernel/vm src/system/kernel/arch/x86 src/system/kernel/vm

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 19 Jan 2010 11:05:01 +0100

On 2010-01-19 at 10:50:56 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> ingo_weinhold@xxxxxx wrote:
> > +    // swap the VMCacheRefs
> > +    mutex_lock(&sCacheListLock);
> > +    std::swap(fCacheRef, fromCache->fCacheRef);
> > +    fCacheRef->cache = this;
> > +    fromCache->fCacheRef->cache = fromCache;
> > +    mutex_unlock(&sCacheListLock);
> 
> So MoveAllPages() has the semantics of a ReplaceAllPages() or rather
> SwitchAllPages()?

Since it is a precondition that the cache is empty, those are equivalent.

CU, Ingo

Other related posts: