os/kernelhwsrv/kerneltest/e32test/demandpaging/d_pagestress.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2006-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\demandpaging\d_pagestress.h
    15 // 
    16 //
    17 
    18 #ifndef __D_PAGESTRESS_H__
    19 #define __D_PAGESTRESS_H__
    20 
    21 
    22 #include <e32cmn.h>
    23 #ifndef __KERNEL_MODE__
    24 #include <e32std.h>
    25 #endif
    26 
    27 _LIT(KPageStressTestLddName,"D_PAGESTRESS");
    28 
    29 class RPageStressTestLdd : public RBusLogicalChannel
    30 	{
    31 public:
    32 	enum TControl
    33 		{
    34 		EDoConsumeRamSetup,
    35 		EDoConsumeRamFinish,
    36 		EDoConsumeSomeRam,
    37 		EDoReleaseSomeRam,
    38 		EDoSetDebugFlag,
    39 		};
    40 
    41 #ifndef __KERNEL_MODE__
    42 public:
    43 	inline TInt Open()
    44 		{ return DoCreate(KPageStressTestLddName,TVersion(),KNullUnit,NULL,NULL,EOwnerProcess,ETrue); }
    45 	inline TInt DoConsumeRamSetup(TInt aNumPagesLeft, TInt aPagesInBlock)
    46 		{ return DoControl(EDoConsumeRamSetup,(TAny*)aNumPagesLeft, (TAny*)aPagesInBlock); }
    47 	inline TInt DoConsumeRamFinish(void)
    48 		{ return DoControl(EDoConsumeRamFinish,(TAny*)NULL, (TAny*)NULL); }
    49 	inline TInt DoConsumeSomeRam(TInt aBlocks)
    50 		{ return DoControl(EDoConsumeSomeRam,(TAny*)aBlocks, (TAny*)NULL); }
    51 	inline TInt DoReleaseSomeRam(TInt aBlocks)
    52 		{ return DoControl(EDoReleaseSomeRam,(TAny*)aBlocks, (TAny*)NULL); }
    53 	inline TInt DoSetDebugFlag(TInt aState)
    54 		{ return DoControl(EDoSetDebugFlag,(TAny*)aState, (TAny*)NULL); }
    55 #endif
    56 	};
    57 
    58 
    59 #endif // __D_PAGESTRESS_H__