equal
deleted
inserted
replaced
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of the License "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
28 |
28 |
29 _LIT(KThreadName, "PageCleaner"); |
29 _LIT(KThreadName, "PageCleaner"); |
30 |
30 |
31 const TInt KThreadPriority = 25; |
31 const TInt KThreadPriority = 25; |
32 |
32 |
33 // The length of time the paging device is idle before we decide to use it for cleaning dirty |
33 /// The length of time the paging device is idle before we decide to use it for cleaning dirty |
34 // pages, in milliseconds. |
34 /// pages, in milliseconds. |
35 const TInt KIdleDelayInMillis = 2; |
35 const TInt KIdleDelayInMillis = 2; |
36 |
36 |
37 class DPageCleaner |
37 class DPageCleaner |
38 { |
38 { |
39 public: |
39 public: |
61 TDfc iCleanerDfc; |
61 TDfc iCleanerDfc; |
62 TBool iRunning; |
62 TBool iRunning; |
63 |
63 |
64 // All state below is accessed with the MmuLock held. |
64 // All state below is accessed with the MmuLock held. |
65 |
65 |
66 // Whether the paging device is currently idle. |
66 /// Whether the paging device is currently idle. |
67 TBool iPagingDeviceIdle; |
67 TBool iPagingDeviceIdle; |
68 |
68 |
69 // Whether the paging device has been idle for longer than the wait period. |
69 /// Whether the paging device has been idle for longer than the wait period. |
70 TBool iIdleForAWhile; |
70 TBool iIdleForAWhile; |
71 |
71 |
72 // Whether the page cleaner is currently running. |
72 /// Whether the page cleaner is currently running. |
73 TBool iCleaningInProgress; |
73 TBool iCleaningInProgress; |
74 }; |
74 }; |
75 |
75 |
76 DPageCleaner ThePageCleaner; |
76 DPageCleaner ThePageCleaner; |
77 |
77 |