equal
deleted
inserted
replaced
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); |
541 Add pages to the array, setting each entry state as ECommitted. |
540 Add pages to the array, setting each entry state as ECommitted. |
542 |
541 |
543 @param aCount The number of pages to add. |
542 @param aCount The number of pages to add. |
544 @param aPages Pointer to list of \a aCount physical page addresses to add. |
543 @param aPages Pointer to list of \a aCount physical page addresses to add. |
545 */ |
544 */ |
546 void Add(TUint aCount, TPhysAddr* aPages); |
545 void Add(TUint aCount, const TPhysAddr* aPages); |
547 |
546 |
548 /** |
547 /** |
549 Add contiguous pages to the array, setting each entry state as ECommitted. |
548 Add contiguous pages to the array, setting each entry state as ECommitted. |
550 |
549 |
551 @param aCount The number of pages to add. |
550 @param aCount The number of pages to add. |
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 |