0
|
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\heap\d_kheap.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#ifndef __D_KHEAP_H__
|
|
19 |
#define __D_KHEAP_H__
|
|
20 |
|
|
21 |
#include <e32cmn.h>
|
|
22 |
#ifndef __KERNEL_MODE__
|
|
23 |
#include <e32std.h>
|
|
24 |
#endif
|
|
25 |
|
|
26 |
_LIT(KHeapTestDriverName,"d_kheap");
|
|
27 |
const TUint KHeapFailCycles = 10;
|
|
28 |
|
|
29 |
class RKHeapDevice : public RBusLogicalChannel
|
|
30 |
{
|
|
31 |
public:
|
|
32 |
enum TControl
|
|
33 |
{
|
|
34 |
ESetThreadPriorityHigh,
|
|
35 |
ECreateSharedChunk,
|
|
36 |
ECreatHwChunk,
|
|
37 |
ETestBurstFailNext,
|
|
38 |
ETestBurstDeterministic,
|
|
39 |
};
|
|
40 |
|
|
41 |
public:
|
|
42 |
#ifndef __KERNEL_MODE__
|
|
43 |
TInt Open()
|
|
44 |
{return DoCreate(KHeapTestDriverName,TVersion(1,0,0),KNullUnit,NULL,NULL);}
|
|
45 |
TInt SetThreadPriorityHigh()
|
|
46 |
{return DoControl(ESetThreadPriorityHigh);}
|
|
47 |
TInt CreateSharedChunk()
|
|
48 |
{return DoControl(ECreateSharedChunk);}
|
|
49 |
#ifdef __EPOC32__
|
|
50 |
TInt CreateHwChunk()
|
|
51 |
{return DoControl(ECreatHwChunk);}
|
|
52 |
#endif //__EPOC32__
|
|
53 |
|
|
54 |
TInt TestBurstFailNext(TUint aControl, TUint aBurst)
|
|
55 |
{return DoControl(ETestBurstFailNext, (TAny*)aControl, (TAny*)aBurst);}
|
|
56 |
|
|
57 |
TInt TestBurstDeterministic(TUint aRate, TUint aBurst)
|
|
58 |
{return DoControl(ETestBurstDeterministic, (TAny*)aRate, (TAny*)aBurst);}
|
|
59 |
#endif //__KERNEL_MODE__
|
|
60 |
};
|
|
61 |
#endif //__D_KHEAP_H__
|