Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\bench\d_kernasmbm.h
15 // Header defining interface to d_kernasmbm ldd
19 #ifndef __D_KERNASMBM_H__
20 #define __D_KERNASMBM_H__
24 _LIT(KKernAsmBmLddName,"d_kernasmbm");
26 const TInt KKernAsmBmBufferSize = 64*1024 + 32;
28 class RKernAsmBmLdd : public RBusLogicalChannel, public MBenchmarkList
40 inline virtual TInt Count();
41 inline virtual TInt Info(TInt aIndex, TBmInfo& aInfoOut);
42 inline virtual TInt Run(TInt aIndex, const TBmParams& aParams, TInt& aDeltaOut);
44 TAny* iBuf; // buffer to test kern <-> user transfers
47 #ifndef __KERNEL_MODE__
51 inline TInt RKernAsmBmLdd::Open()
53 iBuf = User::Alloc(KKernAsmBmBufferSize + 32);
56 return DoCreate(KKernAsmBmLddName,TVersion(0,1,1),KNullUnit,NULL,NULL);
59 inline void RKernAsmBmLdd::Close()
63 RBusLogicalChannel::Close();
66 inline TInt RKernAsmBmLdd::Count()
68 return DoControl(ECount);
71 inline TInt RKernAsmBmLdd::Info(TInt aIndex, TBmInfo& aInfoOut)
73 TPckg<TBmInfo> infoPckg(aInfoOut);
74 return DoControl(EInfo | (aIndex << 8), &infoPckg);
77 inline TInt RKernAsmBmLdd::Run(TInt aIndex, const TBmParams& aParams, TInt& aDeltaOut)
79 TPckgC<TBmParams> paramsPckg(aParams);
80 TInt r = DoControl(ERun | (aIndex << 8), ¶msPckg, iBuf);
82 aDeltaOut = *(TInt*)iBuf;