Update contrib.
1 // Copyright (c) 1995-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\t_exec.cpp
20 const TInt KHeapSize=0x2000;
21 const TInt KMajorVersionNumber=1;
22 const TInt KMinorVersionNumber=0;
23 const TInt KBuildVersionNumber=1;
25 LOCAL_D RTest test(_L("T_EXEC"));
26 LOCAL_D RTest testSvr(_L("Server"));
27 LOCAL_D RSemaphore semmy;
28 LOCAL_D TInt speedCount;
30 LOCAL_C TInt speedyThreadEntryPoint(TAny*)
32 // The entry point for the speed test thread.
40 for (TUint i=0;i<0xffffffff;i++)
42 r=User::UpperCase(myChar);
48 GLDEF_C TInt E32Main()
55 test.Start(_L("Creating semaphore"));
56 TInt r=semmy.CreateLocal(0);
59 test.Next(_L("Starting speedy thread"));
61 r=speedy.Create(_L("Speedy"),speedyThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,NULL);
65 test.Next(_L("Wait for speedy to start"));
68 test.Printf(_L("Starting exec speed test...\n"));
73 test.Printf(_L("Count = %d exec calls in 1 second\n"),n-b);
75 test.Next(_L("Kill speedy"));