Update contrib.
1 // Copyright (c) 1998-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\nkern\t_implicit.cpp
16 // Test nanokernel implicit system lock
18 // NKern::LockSystem and NKern::UnlockSystem
20 // - Load and open the logical device driver ("D_IMPLICIT"). Verify results.
21 // - The LDD uses three separate threads to test the nanokernel implicit
22 // system lock with changing priorities, round-robin and a "dry run".
23 // - Close the channels and verify results are as expected.
24 // Platforms/Drives/Compatibility:
26 // Assumptions/Requirement/Pre-requisites:
27 // Failures and causes:
28 // Base Port information:
33 #include "d_implicit.h"
37 RTest test(_L("T_IMPLICIT"));
39 void Wait(TInt aSeconds)
49 TInt Display(const SStats& a)
51 test.Printf(_L("\nc1=%6d c2=%6d c3=%6d f=%6d\n"),a.iCount1,a.iCount2,a.iCount3,a.iFailCount);
55 GLDEF_C TInt E32Main()
60 if (UserSvr::HalFunction(EHalGroupKernel, EKernelHalSmpSupported, 0, 0) == KErrNone)
62 test.Printf(_L("*********************************\n"));
63 test.Printf(_L("* NOT SUPPORTED ON SMP SYSTEMS *\n"));
64 test.Printf(_L("*********************************\n"));
69 test.Start(_L("Load LDD"));
70 TInt r=User::LoadLogicalDevice(_L("D_IMPLICIT"));
71 test(r==KErrNone || r==KErrAlreadyExists);
72 test.Next(_L("Open channel"));
78 test.Next(_L("Test with changing priorities"));
79 r=impSys.Start(RImpSysTest::ETestPriority);
86 test.Next(_L("Test with round-robin"));
87 r=impSys.Start(RImpSysTest::ETestRoundRobin);
94 test.Next(_L("Dry run"));
95 r=impSys.Start(RImpSysTest::ETestDummy);
102 test.Next(_L("Close channel"));