kernel/eka/memmodel/epoc/flexible/mmu/mpagearray.h
branchRCL_3
changeset 41 0ffb4e86fcc9
parent 22 2f92ad2dc5db
equal deleted inserted replaced
39:2bb754abd467 41:0ffb4e86fcc9
   163 		{
   163 		{
   164 		return (TState)(aPage&EStateMask);
   164 		return (TState)(aPage&EStateMask);
   165 		}
   165 		}
   166 
   166 
   167 	/**
   167 	/**
   168 	Page moving has ended so set the page back to committed if no other 
       
   169 	operation has occurred/is occurring.
       
   170 
       
   171 	@param aEntry		A reference to the entry to update.
       
   172 	*/
       
   173 	static FORCE_INLINE void MovePageEnd(TPhysAddr& aEntry)
       
   174 		{
       
   175 		if (State(aEntry) == EMoving)
       
   176 			aEntry = (aEntry & ~EStateMask) | ECommitted;
       
   177 		}
       
   178 
       
   179 	/**
       
   180 	Update the physical address in the array entry \a aEntry.
   168 	Update the physical address in the array entry \a aEntry.
   181 	@param aEntry		A reference to the entry to update.
   169 	@param aEntry		A reference to the entry to update.
   182 	@param aPhysAddr	The new physical address.
   170 	@param aPhysAddr	The new physical address.
   183 	*/
   171 	*/
   184 	static FORCE_INLINE void PageMoveNewAddr(TPhysAddr& aEntry, TPhysAddr aPhysAddr)
   172 	static FORCE_INLINE void PageMoveNewAddr(TPhysAddr& aEntry, TPhysAddr aPhysAddr)
   413 	@return Pointer to the array entry, NULL if the page cannot be moved.
   401 	@return Pointer to the array entry, NULL if the page cannot be moved.
   414 	
   402 	
   415 	@see RPageArray::MovePageEnd()
   403 	@see RPageArray::MovePageEnd()
   416 	*/
   404 	*/
   417 	TPhysAddr* MovePageStart(TUint aIndex, TIter& aPageList);
   405 	TPhysAddr* MovePageStart(TUint aIndex, TIter& aPageList);
       
   406 
       
   407 
       
   408 	/**
       
   409 	Page moving has ended so set the page back to committed if no other 
       
   410 	operation has occurred/is occurring.
       
   411 
       
   412 	@param aEntry		A reference to the entry to update.
       
   413 	@param aIndex		The index of the page that was moved.
       
   414 	*/
       
   415 	void MovePageEnd(TPhysAddr& aEntry, TUint aIndex);
       
   416 
   418 
   417 
   419 	/**
   418 	/**
   420 	Return the array entry for index \a aIndex.
   419 	Return the array entry for index \a aIndex.
   421 	*/
   420 	*/
   422 	TPhysAddr Page(TUint aIndex);
   421 	TPhysAddr Page(TUint aIndex);
   859 	MmuLock::Lock();
   858 	MmuLock::Lock();
   860 	ReleasePage(aIndex,-aDelta);
   859 	ReleasePage(aIndex,-aDelta);
   861 	MmuLock::Unlock();
   860 	MmuLock::Unlock();
   862 	}
   861 	}
   863 
   862 
       
   863 FORCE_INLINE void RPageArray::MovePageEnd(TPhysAddr& aEntry, TUint aIndex)
       
   864 	{
       
   865 	__NK_ASSERT_DEBUG(PageEntry(aIndex) == &aEntry);
       
   866 	if (State(aEntry) == EMoving)
       
   867 		aEntry = (aEntry & ~EStateMask) | ECommitted;
       
   868 	ReleasePage(aIndex, 0);
       
   869 	}
       
   870 
   864 #endif
   871 #endif