|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32test\mmu\d_demandpaging.h |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __D_DEMANDPAGING_H__ |
|
19 #define __D_DEMANDPAGING_H__ |
|
20 |
|
21 #include <e32cmn.h> |
|
22 #ifndef __KERNEL_MODE__ |
|
23 #include <e32std.h> |
|
24 #endif |
|
25 |
|
26 _LIT(KDemandPagingTestLddName,"D_DEMANDPAGING"); |
|
27 |
|
28 class RDemandPagingTestLdd : public RBusLogicalChannel |
|
29 { |
|
30 public: |
|
31 enum TControl |
|
32 { |
|
33 ELockTest, |
|
34 ESetRealtimeTrace, |
|
35 EDoConsumeContiguousRamTest, |
|
36 ELock, |
|
37 EUnlock, |
|
38 EReadHoldingMutexTest, |
|
39 ECreatePlatHwChunk, |
|
40 EDestroyPlatHwChunk |
|
41 }; |
|
42 |
|
43 #ifndef __KERNEL_MODE__ |
|
44 public: |
|
45 inline TInt Open() |
|
46 { return DoCreate(KDemandPagingTestLddName,TVersion(),KNullUnit,NULL,NULL,EOwnerProcess,ETrue); } |
|
47 inline TInt LockTest(const TAny* aBuffer, TInt aSize) |
|
48 { return DoControl(ELockTest,(TAny*)aBuffer,(TAny*)aSize); } |
|
49 inline void SetRealtimeTrace(TBool aEnable) |
|
50 { DoControl(ESetRealtimeTrace,(TAny*)aEnable); } |
|
51 inline TInt DoConsumeContiguousRamTest(TInt aAlign, TInt aPages) |
|
52 { return DoControl(EDoConsumeContiguousRamTest,(TAny*)aAlign, (TAny*)aPages); } |
|
53 inline TInt Lock(const TAny* aBuffer, TInt aSize) |
|
54 { return DoControl(ELock,(TAny*)aBuffer,(TAny*)aSize); } |
|
55 inline TInt Unlock() |
|
56 { return DoControl(EUnlock); } |
|
57 inline TInt ReadHoldingMutexTest(TAny* aLocalBuf) |
|
58 { return DoControl(EReadHoldingMutexTest, aLocalBuf); } |
|
59 inline TInt CreatePlatHwChunk(TInt aSize, TLinAddr& aAddr) |
|
60 { return DoControl(ECreatePlatHwChunk, (TAny*)aSize, (TAny*)&aAddr); } |
|
61 inline TInt DestroyPlatHwChunk() |
|
62 { return DoControl(EDestroyPlatHwChunk); } |
|
63 #endif |
|
64 }; |
|
65 |
|
66 |
|
67 #endif |